Skip to main content

Posts

Showing posts from 2011

FXAA Shader Anti-aliasing in XNA 4.0 Winforms

I had the challenge of trying to get some type of anti-aliasing in a project that uses the winforms method of XNA 4 that was being run on a laptop in REACH mode. My first step was figuring out a method to use. I found quite a few shader based methods available, but I could get none of them to work. FXAA written by a engineer at NVIDIA seemed like the best option, so I went with that. I wrote up a question on Stack Overflow to see if anyone could help. Eventually with enough research and …playing around… with the code I have it functioning. Here is an example to help anyone who might be interested in doing the same thing. —————————————————- I’m using this example project’s XNA 4.0 form control in an application I’m writing: http://creators.xna.com/en-US/sample/winforms_series1 If you are unfamiliar with FXAA, check out the creator’s site: http://timothylottes.blogspot.com/2011/03/nvidia-fxaa.html I’ve spent quite a bit of time so far trying to figure out to use it without any luck...

XNA 4.0 Red X Exceptions

So I’m developing a windows application that uses XNA 4.0 embedded in a custom windows control. The main issue I have is when the code inside that embedded control errors out, the windows form and control result in a big red X across the control instead of stopping and going to the debugger so I can find out where the issue is. I’m using Visual Studio 2010 Express since my copy of VS2008 doesn’t work with XNA 4.0 (why do that to us Microsoft?). Anyways… Information about running XNA in a windows form: http://creators.xna.com/en-US/sample/winforms_series1 http://creators.xna.com/en-US/sample/winforms_series2 On your keyboard do the key-press combination of: CTRL-ALT-E That opens up the “Exceptions” window. The odd thing is I can’t find the menu item for that window. In the Exceptions window I have two main checkboxes, but the important one for this issue is: “Common Language Runtime Exceptions” Check the box for “thrown” so we can receive internal exceptions. Now instead of getting ...

Fixing Wordpress Database Collation for Foreign Fonts

I wanted to write Japanese in one of my wordpress blogs. The issue was that the encoding was in latin1. Here are the steps I used below. Keep in mind that this is a potentially dangerous modification where you could easily lose your data. Be careful and if you try this, you do it at your own risk! Make a complete backup of your site by whatever methods you normally use. Also make a backup of your wordpress site’s database. Login into CPanel and select phpMyAdmin. Click the SQL tab around the top of the page on the right panel. This is where you can execute SQL code. ALTER DATABASE dbname DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; (where dbname is the name of your database) That line fixes the existing database by changing the default encoding. In my case I had a latin1 variant. That step above is to avoid completely dropping and re-creating the database. Login into CPanel again and download a copy of the database using the backup wizard. This consists of a tar.gz (zip...

First Android Application Released: River Water Level Stations

Update: I gifted this code and basically the entire project with related software tools I had made to my friend who I was trying to start a business with after we decided to stop. The app is still active and available on the market under his account and not “CWSolver” anymore. A friend and I just finished our first Application targeted for the Android marketplace. The application basically allows the user to monitor the level of rivers in the United States thanks to publicly available data that is updated frequently. This is useful to anyone who does boating among other various activities that have some relation to rivers. Here is the link to Water Level Stations on the Android market. Here is our official description: “Do you fish and hunt? Are you out on the river frequently for business or pleasure? It is important to know what the level and flow of the river is, so you can stay safe and maximize your enjoyment. We have an application tailor made for you.Water Level Stations allow...

A little rant about Android SDK, Java, and Eclipse

I don’t often rant nor say the work “sucks” very often. However as any programmer knows, some tools just frustrate you to no end. Java, the Android SDK, and the Eclipse IDE are something I need to use, but are frequently on my “sucky tools” list. I’ve used a lot of programming languages and tools in my day, and these have made the frustrating Sh** king-of-the-mountain where things like Cobol and JCL reside. Here is an email rant I made recently: Wasted the whole day trying to get the settings activity working as I initially designed it. I eventually dropped that after wasting a large amount of time “playing” around with the code, so now the unit conversions happen outside of the settings activity. In the settings activity, it is just cut-and-dry select setting and select type of units. There is no unit conversion and re-selection of a setting value in the spinner as I had attempted to do earlier. For example, 10 for the search distance will me km or miles depending on if the use...