Tag Archives: opengl
Porting the render to texture code to OpenGL, and a lot of small problems appeared… of course… This is what I wanted as end result: This is what I get: I seem to have a lot of issues… 1) It seems I have no Z-buffering: The wall that should be to the left of the […]
Just finished porting the per-pixel shaders to OpenGL, as well as the normal+depth shader: It was actually easier than to make the Direct3D shaders, since I already knew where the traps were! Next step is to get render to texture working on D3D and OpenGL and see if I can use the results of a […]
Yay! And what better way to start New Year than to have finished the worse task on my task list, the OpenGL port! It still has some stuff that has to be reviewed, optimized, etc, but it’s functional and almost undistinguishable visually from the Direct3D version! Now, I just have to decide on what’s the […]
Happy New Year’s Eve! Not much time today to work on the game, just made a couple of shaders and fixed some minor things… I’m almost calling the OpenGL renderer done (although it still has some work with optimization, since it’s quite slower than the DirectX one). I’m having some trouble with the last shader, […]
I can smell it already! It’s actually cool (after all the pain) to have a game running on two separate renderers and trying to spot the differences… There’s not much work remaining to be done on the OpenGL renderer, besides testing… I’m finally seeing the end of the road on this one, so much that […]
A couple more bugs down, a few dozens to go! Today was rather productive… Fixed the sampling system (didn’t notice there was a sampler object in OpenGL that kind of makes it more similar to DirectX in terms of sampling properties), fixed the 2d render accuracy (needed to offset the coordinates a bit to make […]
One more small step! This one was hard… Some geometry wasn’t being drawn, and I thought it was something to do with the bounding box (would be silly), but symptoms were similar to that sort of issues… It ended up because I didn’t know that glVertexAttribPointer has to be called after the buffer in question […]
More progress done on the OpenGL renderer… Today I managed to make lighting work again… Issue was the variable naming… In DirectX, when you have a structure array, there’s a constant binding with that name (for example, “lights”), for the whole array. OpenGL does it slightly different: it creates different variables for each sub-entry, so […]
And back to normal programming… Not much, but some! Got some more stuff working on the OpenGL renderer… This time, I found out that I can’t set vertex/pixel constants before I actually set the program! This is the current status, getting closer to an actual working renderer! There’s a screwup somewhere on the lightning (obviously), […]
Finally, got the first decent screenshot for the OpenGL renderer: The biggest problems was I was using glBindAttribLocation in the wrong place, after the shader linkage was done… No error was returned, but the bind wasn’t being made… I just don’t know how the UVs were being displayed properly… The 3d part is still a […]