Wednesday, October 10, 2007

then there was a window!

I finally got an opengl window open in nebula3. I know it doesn’t sound like much - but it is. I had a window open sometime last week but I just wasn’t happy with the way I had structured the code. I had some of the opengl details in the Win32DisplayDevice class because it was easier but it wasn’t very flexible on the Win32RenderDevice side. I also did a quick implementation of an opengl render target just to get the window working.

After cleaning up the code a bit more yesterday, I think its working almost as well as the Direct X implementation. The issue I’m having now is that windows returns two display adapters on my PC. I suppose this is accurate since my graphics card has two monitor slots. The problem is that’s when I ask windows for the second adapter’s display mode it gives me negative invalid numbers for the width, height and color depth which causes an assert. I’ve put in a hack to fix it temporarily as I look for a solution.

Next stop, primitives.

Here is a screenshot.

No comments: