OpenGL porting – Part 3
Today was a wasted day… :\
Decided to see if my changes screwed up the D3D renderer, and boy did they!
This is what I had waiting for me, instead of the main menu:
Booted up Pix, and found out that I had a the declaration of the alpha test reversed, so no big deal… Menu was back and going into the game, I had this waiting:
It seemed the Z-buffer wasn’t working, but all the sets were there, and Pix wasn’t reporting anything wrong…
After a lot of scrounging around, I finally figured out… I have a function to set renderstates (so that it checks for redundant sets, etc), but in the function that set the z-state, instead of using that function, I was using directly the device function… That wouldn’t be a problem, if I didn’t read from another variable… Which meant the setting I was placing wasn’t being acknowledged by the system, which meant that basically setting the state to true wasn’t working, but setting it to false was…
So, I got this working:
But, when working on the last issue, I noticed that Pix was still just showing the yellow screen… Everything seems to be correct, the output color of the shaders for specific functions was set correctly, etc, but no display…
After loads more time (also due to the fact that I used the wrong DirectX control panel to turn on debug mode), I figured out I had a define with the wrong name (_USE_D3D9 instead of USE_D3D9), which meant index buffers weren’t being unlocked, which led to the weird behavior on Pix (although it didn’t cause problems running the game stand-alone).
So, today was pretty much a waste…
Now listening to “Somewhere in Time” by “Iron Maiden”
Comment
You must be logged in to post a comment.