Spellcaster Studios

Make it happen…

Render to texture: OpenGL edition

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:

screen385

This is what I get:

screen386

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 player isn’t displaying, probably because it was displayed and then got removed by the floor (because that’s drawn afterwards)
2) There seems to be inverted back face culling (I’m seeing the back face of stuff, not the front face, except for objects that don’t use back face culling like the player)
3) Not really noticeable, but the “floating point texture” is not floating point (probably something wrong with the creation, but I’m really confused about the use of the 3rd parameter of glTexImage2D).

Tomorrow I’ll get back to it…

Now listening to “Blackwater Park” by “Opeth”

Comment