Render Texture in iOS

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ajmalk
Posts: 2
Joined: Tue Jan 31, 2017 8:20 pm

Render Texture in iOS

Post by ajmalk »

I'm having trouble with rendering to an offscreen texture on opengles. I want to draw objects into a render texture and then draw using the render texture onto the screen. I'm using the ogl-es branch on iOS 10 and trying to render into a custom view in our cocoa app.

This is all I'm doing to instantiate the render target.
renderTargetTex = driver->addRenderTargetTexture(core::dimension2d<u32>(256, 256), "RTT1", video::ECF_A8R8G8B8);
video::ITexture* renderTargetDepth = driver->addRenderTargetTexture(core::dimension2d<u32>(256, 256), "DepthStencil", video::ECF_D16);

renderTarget = driver->addRenderTarget();
renderTarget->setTexture(renderTargetTex, renderTargetDepth);
When I run glCheckFramebufferStatus on the resulting frame buffer, I'm getting a GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT status. In all my research that status means one of the either the color texture or the depth texture are the wrong format or initialized improperly. What am I doing wrong here?
Post Reply