

I am testing it on iPhone 3GS with iOS 5. It works perfectly fine on the iPhone simulator but on the Device the glCheckFramebufferStatus(GL_FRAMEBUFFER) function returns GL_FRAMEBUFFER_UNSUPPORTED at the end of the FBO creation.

I'll work to resolve the two above issues (perhaps they are the crux if of it).I am creating a frame buffer object for Render to Texture setup. This caused the CPU to wait for the GPU to GPU Wait on Texture: Your app updated a texture that is currently Validation Error: glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0,ĩ60, 640, 0) : Height is not a power of twoįile://localhost/Users/xxxx/Documents/Development/xxxx.mm: warning: It is the window-system that determines which portions of this framebuffer OpenGL ES may access at any given time and that communicates to OpenGL ES how those portions are structured. I'm getting two suggestions from the Xcode OpenGLES analyzer on the copy command:įile://localhost/Users/xxxx/Documents/Development/xxxx.mm: error: The effects of OpenGL ES commands on the window-system-provided framebuffer are ultimately con-trolled by the window-system that allocates framebuffer resources. If I pull out the copy its way above 30fps. Right now pretty much just doing this step its at 14fps, which obviously is not acceptable. I have experimented with not having the 'bRenderDepth' branch, and it doesn't speed it up significantly. Gl_FragColor = vec4(texture2D(sTexture, TexCoord).rgb * LightIntensity, 1.0)

Gl_FragColor = vec4(vec3(gl_FragCoord.z), 1.0) Here is the fragment shader: uniform sampler2D sTexture GlCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, width, height, 0) GlBindTexture(GL_TEXTURE_2D, g_uiDepthBuffer) and clear it to 1.0, like how the depth buffer starts GlColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE) and for this, the color buffer needs to be on GlUniform1i(uiBaseShaderRenderDepth, true) this is a switch to cause the fragment shader to just dump out the depth component GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT) So I'm trying to write the depth component to the color buffer, then copying it: // clear everything the return value from glCheckFramebufferStatus is not GLFRAMEBUFFERCOMPLETE ).

GLINVALIDFRAMEBUFFEROPERATION is generated if the currently bound framebuffer is not framebuffer complete (i.e. Reading a related thread, it seems I can use the frame buffer and fragment shaders to extract the depth data. GLINVALIDOPERATION is generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped. However, it appears the glCopyTexImage2D is not supported on ES. Part of the sample involves copying the depth buffer to a texture: glBindTexture(GL_TEXTURE_2D, g_uiDepthBuffer) I'm trying to get some shadowing effects to work in OpenGL ES 2.0 on iOS by porting some code from standard GL.
