shoppingolz.blogg.se

Opengl es 2.0 framebuffer depth textures
Opengl es 2.0 framebuffer depth textures









opengl es 2.0 framebuffer depth textures opengl es 2.0 framebuffer depth textures

c of each renderer, initFixedRenderer and initProgrRenderer only expose the function address via the pointer.

opengl es 2.0 framebuffer depth textures

The "implementation" of every function is hidden in the. Void initProgrRenderer(renderer_t* renderer) Void initFixedRenderer(renderer_t* renderer) Void (*UpLoadTextureToGpu)(texture_t* texture) The rendering path is abstracted via a C struct containing function pointers a la Quake 2. Your browser does not support the video tag. IPhone 2G/3G fixed pipeline, running at 45fps. iPHone 3GS programmable pipeline, running at 27fps. The shadow is generated via a shadowmap ( because render to depth texture is not supported on iPhone ( GL_OES_depth_texture), depth value are packed in a R8G8B8A8 color texture twice the size of the screen). The materials all feature a diffuse map, a normal map and a specular map ( up to 512x512 ). The following videos show characters from Doom3 that I used to test the engine, the HellKnight is 2200 poly, the rest of the room visible is 1000. The OpenGL ES 2.0 renderer feature uber-shaders: Depending on the material currently renderered a shader is recompiled on the fly in order to avoid branching.īrowse the source code on gitHub : Get it from GIT command line :

opengl es 2.0 framebuffer depth textures

The overall code quality is far from exceptionnal (support for two object types WTF ?!?)but I consider it a good tutorial for OpenGL ES 2.0, you can read about bump-mapping and shadow-mapping with a fun example from a Doom 3 level. Note that shadow mapping was achieved by packing the depth informations in a color texture but now you have access to GL_OES_depth_texture so you should be able to gain some speed. It was the first renderer to feature Shadow Mapping and Bump Mapping on iPhone at the time. I've decided to release the source code of the OpenGS ES 1.0/2.0 renderers I wrote in the summer of 2009 nicknamed "dEngine". April 28th, 2011 dEngine: iOS 3D renderer source code











Opengl es 2.0 framebuffer depth textures