Tag Archives: WPF

WPF OpenGL framework released

I’m open sourcing my WPF OpenGL framework. It’s still very rough and unpolished.

Some notes:

  • You need a decent graphics card and updated drivers (Nvidia or ATI).
  • It’s based on the OpenTK framework.
  • It still relies on WinForms. Eventually I’ll try to use purely WPF, but the hybrid works for now.
  • I definitely need to clean up the code and document it properly. Until that’s done, just email me if you have questions.
  • The structure from motion demo looks best with anti aliasing overridden at the hardware level. For Nvidia cards, go to the Nvidia control panel –> 3D settings –> Use the advanced 3D settings –> Take me there-> Antialiasing – mode = override, Antialiasing – setting >= 2x. You can hit “Restore” or reselect ‘”Let the 3D application decide” to undo this change.

 

WPFTK boxes    Shader UML

, by

Refactoring in WPF

I’ve recently encountered a lot of frustrating DX (developer experience) problems while working on my WPF OpenGL project. For those curious, I’m disentangling my personal research from the OpenGL libraries and controls (hopefully, I’ll post by Monday). These gripes have no real order, so I’ll just mention a couple:

  • Renaming a Window class.
    1. Rename the class in the .xaml.cs file. VS will nicely refactor all references including dependency properties (I hate that specific class names are needed for these).
    2. Rename the class in .xaml file. That’s right; VS doesn’t refactor XAML code. It’s not even nice enough to give you a compiler error, you have to run the program to find the unintelligable, unlocalized error. WTF?!?
    3. To maintain sanity, rename the the .xaml file with the new class name. VS is at least nice enough to rename the .xaml.cs file automatically.
    4. If you renamed the file of the startup window, you’ll get another meaningless runtime error. Yay! The fix is to open App.xaml and change the StartupUri.
    5. Compile and hope you didn’t make a single typo anywhere. Then recall fond memories of the winform days when refactoring took care of everything.
  • Converting an application project into a library. It’s simple but unintuitive. Change the “Output type” in the project properties to “class library”. Now your application will completely break. The fix is to drop app.xaml and the .cs file from the class project. We shouldn’t have to do this!
, by

A Nifty Video (WPF & OpenGL)

*Update: I released the framework.

I needed the ability to manipulate lots of geometry in WPF. Unfortunately, that’s just not feasible with the current framework, so I made this little demo to test out an OpenGL framework that I’ve been working on. It uses vertex shaders, pixel shaders, and framebuffers with some hacked together binding.

For those of you at MIX 09, this was the app that I was playing with.

Play Video

, , , by

Some pretty screen shots (teasers)

I got to the airport an hour and a half before my flight to MIX09 (very unusual for me). I actually decided to be semi-productive and threw this app together before and during the flight. Video coming soon.

MIX screenshot MIX screenshot 2MIX Screenshot Framebuffer

, , , by