Original Post
Hello! I have the following problem: I want to render my total screen(framebuffer) into a texture. This texture I try to apply on a quad. I try: //init func glGenTextures(3, &color_tex); glBindTexture(GL_TEXTURE_2D, color_tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); //reshape func color =(unsigned int*)new GLuint[((width * height)* 4 * sizeof(unsigned int))]; glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, color); delete [] color; //display func glutSolidTeapot(3.0f); glBindTexture(GL_TEXTURE_2D, color_tex); glCopyTexSubImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, m_width, m_height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); float aspectRatio = (float) m_width / (float) m_height; gluPerspective( 60.0, // Field of view in degree aspectRatio, // Aspect ratio 0.1, // Z near 100.0); // Z far glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0, 0, 10, 0.0 ,0.0, 0.0, // XYZ view center 0.0, 1.0, 0.0); // Up is in positive Y direction glClear(GL_COLOR_BUFFER_BIT); glDisable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glBindTexture(GL_TEXTURE_2D, color_tex); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glEnable(GL_TEXTURE_2D); glFrontFace(GL_CW); glBegin(GL_QUADS); glVertex3f(-2.0,-1.0,0.0); glVertex3f(-2.0,1.0,0.0); glVertex3f(0.0,1.0,0.0); glVertex3f(0.0,-1.0,0.0); glEnd(); But the quad stay white!!!!!! Thanks for help!!! Froni