Code: Select all
colorBufferMaterial.Wireframe = false;
colorBufferMaterial.Lighting = false;
colorBufferMaterial.ZWriteEnable = false;
colorBufferMaterial.AntiAliasing = 0;
colorBufferMaterial.MaterialType = coreManager->GetShadersManager()->GetShaderMaterial(8);
colorBufferMaterial.TextureLayer[0].BilinearFilter=(settings->renderQuality!=1);
colorBufferMaterial.TextureLayer[0].TrilinearFilter=false;
colorBufferMaterial.TextureLayer[0].AnisotropicFilter=false;
colorBufferMaterial.setTexture(0, colorBuffer);
vertices[0] = video::S3DVertex2TCoords(-1,-1,0,0,0,1,video::SColor(255,255,255,255),0,1);
vertices[1] = video::S3DVertex2TCoords(1,-1,0,0,0,1,video::SColor(255,255,255,255),1,1);
vertices[2] = video::S3DVertex2TCoords(1,1,0,0,0,1,video::SColor(255,255,255,255),1,0);
vertices[3] = video::S3DVertex2TCoords(-1,1,0,0,0,1,video::SColor(255,255,255,255),0,0);
indices[0] = 0; indices[1] = 3; indices[2] = 2; indices[3] = 0; indices[4] = 2; indices[5] = 1;
Code: Select all
driver->setMaterial(colorBufferMaterial);
driver->setTransform(video::ETS_PROJECTION, core::IdentityMatrix);
driver->setTransform(video::ETS_VIEW, core::IdentityMatrix);
driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
driver->drawIndexedTriangleList(vertices, 4, indices, 2);
Code: Select all
void main()
{
gl_Position = ftransform();
gl_TexCoord[0]=gl_MultiTexCoord0;
}
Code: Select all
uniform sampler2D Texture0;
void main()
{
gl_FragColor = texture2D(Texture0,gl_TexCoord[0].st);
}