glBindTexture(GL_TEXTURE_2D, TextureID);
glBegin(GL_TRIANGLES);
//First one
glTexCoord2f(0.0f, 1.0f); glVertex3f(X , Y , 0.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(X , Y-Height, 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(X+Width, Y-Height, 0.0f);
//Second one
glTexCoord2f(1.0f, 1.0f); glVertex3f(X+Width, Y , 0.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(X , Y , 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(X+Width, Y-Height, 0.0f);
glEnd();
Veerrrryyyyyy lllloooowwwww frame rate
Hello i made a opengl programm that run in
windowed mode draws two triangles over the whole
screen and covers them with a texture wich is 800x600.
It sounds fine to me but when i run it it goes at
a framerate less then 0:S. So why i know the counter
is good becouse the programm runs very lagy.
here is the render code
I don't see any problem.
That is obviously not the source of your rendering issue than. comment that code out and just test your FPS with the screen simply switching buffers. I assue you that you will find the program still has low FPS. From then on it's a matter of profiling your code to find the culprit.
Is the texture 800x600 or the window? Did you check if you're rendering in software mode? What video card do you have? Have you installed the latest drivers?
The texture and the window are 800x600 and i have an Ati Redeon 9600 xt 256mb
with the latest drivers i think.
with the latest drivers i think.
Quote:Original post by TjaalieAre you using a NPOT texture extension or gluBuild2DMipmaps?
The texture and the window are 800x600
Quote:Original post by Tjaalieand i have an Ati Redeon 9600 xt 256mb with the latest drivers i think.The Catalyst 5.8 drivers were released today. If those aren't the ones you have installed, I recommend downloading them from ATI and installing them.
I got the VTune profiler and i can't let it to do what i want.
How do i get it to show the names of the functions and not some
hex decimal numbers??? Are there better profilers out there????
How do i get it to show the names of the functions and not some
hex decimal numbers??? Are there better profilers out there????
Quote:Original post by Tjaalie
The texture and the window are 800x600 and i have an Ati Redeon 9600 xt 256mb
with the latest drivers i think.
Make your texture power-of-two (ie 512x512 or 1024x1024). Newer drivers have a nasty habit of falling back to some kind of emulation for non-power-of-two textures if they can't support them, which is dog slow.
That means that the problem is somewhere else in your code - it probably has little to nothing to do with the rendering code. Check your code profiler and see what functions take the longest. You'll probably find your problem there.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement