Jump to content
  • Advertisement
Sign in to follow this  
aewarnick

OpenGL More concerns about using opengl for all graphical applications

This topic is 4999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Isn't there something about graphics cards not supporting images of a certain size in opengl? So I coudn't use opengl for high quality processing of images because the quality would be degraded. Am I correct?

Share this post


Link to post
Share on other sites
Advertisement
Old cards can only support power-of-two sized textures. Newer cards can do any reasonable sized image with an extension.

Share this post


Link to post
Share on other sites
Oh, so it does not matter what size the image is, even on older cards. They could be (provided memory could handle it) 998001 X 998001?

Share this post


Link to post
Share on other sites
There is absolutely no reason you can't just put your non power of 2 texture on a power of 2 'canvas'. Say you have a 130x200 texture. Copy it to a 256x256 texture, and colour all the unused pixels black with 0 alpha. Now rework your texture coords to use only the part 130x200 part of the image.

Alternatively you could pack multiple non power of 2 textures into 1 power of 2 texture. Google 'texture packing' for some more ideas.

So no, you are not correct.

Share this post


Link to post
Share on other sites
Quote:
Original post by aewarnick
Oh, so it does not matter what size the image is, even on older cards. They could be (provided memory could handle it) 998001 X 998001?


No. You can query the driver for the maximum texture size. I forget the exact token to use, so either check around the back of the gl spec, or have a look here. 2048x2048 is a common maximum.

Share this post


Link to post
Share on other sites
The number I posted above is a power of 2. That is why I chose it. I think all of you are misunderstanding my question. I read somewhere that opengl can only support textures up to a certain size like 1024 x 1024. Any image bigger than that would be degraded because it would have to be scaled down. That is my question.

Share this post


Link to post
Share on other sites
for the record, ATI has a max of 2048*2048 and NV max is 4096*4096.

and 998001 cant be a power of two texture size because it has a '1' in it [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!