TextureBufferTransitPtr DeferredShadingStage::createGBuffer( UInt32 index, Int32 width, Int32 height) { TextureBufferTransitPtr buf = TextureBuffer ::createLocal(); TextureObjChunkUnrecPtr bufTex = TextureObjChunk::createLocal(); ImageUnrecPtr bufImg = Image ::createLocal(); bufImg->set(_mfPixelFormats[index], width, height, 1, 1, 1, 0.0f, NULL, _mfPixelTypes[index], false, 1); bufTex->setImage (bufImg ); bufTex->setTarget (GL_TEXTURE_RECTANGLE_ARB); bufTex->setMinFilter(GL_NEAREST ); bufTex->setMagFilter(GL_NEAREST ); bufTex->setWrapS (GL_CLAMP ); bufTex->setWrapT (GL_CLAMP ); bufTex->setScale (false ); buf ->setTexture (bufTex ); // START DEBUG GLenum internalFormat; GLenum externalFormat; bufTex->determineFormats(internalFormat, externalFormat); FLOG(("DSStage::createGBuffer: IF [%s] EF [%s]\n", GLDefineMapper::the()->toString(internalFormat).c_str(), GLDefineMapper::the()->toString(externalFormat).c_str() )); // END DEBUG return buf; }