Hi guys! I have some problems while trying to display some simple graphics( I am using OpenGL and c++ ).
I have this simple code :
glBegin( GL_QUADS );
glTexCoord2f( 0.0, 0.0 ); glVertex2f( -1.0, -1.0 );
glTexCoord2f( 0.0, 1.0 ); glVertex2f( -1.0, 1.0 );
glTexCoord2f( 1.0, 1.0 ); glVertex2f( 1.0, 1.0 );
glTexCoord2f( 1.0, 0.0 ); glVertex2f( 1.0, -1.0 );
glEnd();
I want to apply texture on whole screen and It runs veeery slow( with 4~10 fps )! Whats the problem ???
First step is to ensure your video card drivers are up-to-date and that you're not defaulting to OpenGL 1.1. Check the values returned for glGetString(GL_VENDOR), and glGetString(GL_VERSION). If you get something like "Microsoft Corp.", and "1.1.0" for vendor/version, you need to update drivers, since the default GL drivers on Windows are slooooow.
What do you mean you want to "apply texture to the whole screen" ? You mean draw ONE quad that covers the whole screen? Because from your next post it sounds like you're drawing many quads. Or what exactly are you doing? Can you post more code or the full drawing code?
1. check that you're not loading the texture every frame (or doing something every frame that can be done once in initialization)
2. check if the texture size is bigger than the desired quad size. If so, reduce it. (what size is the texture?)