Sign in to follow this  
Kimmen

OpenGL GL_TEXTURE_RECTANGLE_EXT and ATI?

Recommended Posts

Hi there, I am currently developing a 2d isometric game in c# (.net 2.0) and I am using the Tao framework. All pictures used in the game are rectangles and that is why I use GL_TEXTURE_RECTANGLE_EXT. I was just wondering if ATI has some problem with GL_TEXTURE_RECTANGLE_EXT? Because in school there's nothing wrong with the graphics and it also works correctly on a friends computer, in both cases NVidia is used. However on my own computer, with an ATI x700 graphic card, almost all graphics doesn't show up at all. Do you have some experience with GL_TEXTURE_RECTANGLE_EXT and knows what the problem could be? As a side note I can also say that on another friends computer no graphics generated by OpenGL is shown at all (the window becomes transparent and only the exit button shows (which is drawn with GDI+), any ideas there? He also use an NVidia graphic card. If you want I can post up some screenshots if you want to see the problem, both problems. thanks in advance, Kimmen

Share this post


Link to post
Share on other sites
Are you checking for the existance of the extension before using it? Could be you should use just straight GL_TEXTURE_RECTANGLE or GL_TEXTURE_RECTANGLE_ARB.
You really should try and use power of 2 textures, even if you don't want a square area. Just adjust your UVs or stretch your image. You get better performance.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kimmen
All pictures used in the game are rectangles and that is why I use GL_TEXTURE_RECTANGLE_EXT.
This sounds like you could be using non-square power-of-two textures (ie: 128x64). For this you don't need to use any extensions; vanilla OpenGL supports textures with power-of-two dimensions, but the dimensions don't have to be equal. I just wanted to say that because it sounds like that might be your case.

As for your problem, I don't know what might be wrong. That is pretty odd that it doesn't work on an x700 unless you are doing something else wrong that NVIDIA is silently ignoring but ATI is yelling at you for. Are you checking for OpenGL errors? What specific NVIDIA cards is this being tested on?

Share this post


Link to post
Share on other sites
Try this before drawing anything with texture rectangles;

glDisable(GL_TEXTURE_RECTANGLE_EXT);
glEnable(GL_TEXTURE_RECTANGLE_EXT);
DrawPrimtive();

I know there is a bug with rects and the driver state/cache (ATI told me).

Share this post


Link to post
Share on other sites
Hi again!

aaah.. thanks Sunray, it did the trick!

Have to say thank you to bluntman and Kalidor for helping as well.

/Kimmen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this