Jump to content
  • Advertisement
Sign in to follow this  
Vortez

Non power of 2 texture...

This topic is 3959 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

hi, i just want to know how do you use the GL_ARB_NO_POWER_OF_TWO extention, i know it's an extension, but im not sure how it work, i someone can send me a little piece of code that would be nice. Thx in advance.

Share this post


Link to post
Share on other sites
Advertisement
This is one of the easiest extensions around.

To use it, you have to do - absolutely nothing ! It's really just a flag. If the extension is available (ie. in the extension string), then that means that you can supply non power of two values to glTexImage2D and friends. That's basically it.

Share this post


Link to post
Share on other sites
hi all.
I want to ask a far question (somewhat) which is:
how the accelerator do support the non of two texture...
so is the following is true??
I think (I'm not sure again) it supports it just by resizing the texture to be power of two and then it recalcs the uv to adjust them to the new size of the texture..

and if so ... I think that we'll have a performance problem, don't we?

thanks in advanced...

Share this post


Link to post
Share on other sites
the great bane of 3d programmers is that no two implementation are the same,

some cards support NP2, some don't and some support it but it does cause a performance hit,
i don't have a source on this but i have heard of some cards that support NP2 but it causes poor light and mipmapping performance

Share this post


Link to post
Share on other sites
Quote:
Original post by DoomAngel
I think (I'm not sure again) it supports it just by resizing the texture to be power of two and then it recalcs the uv to adjust them to the new size of the texture..

Incorrect. Natively supported NPT textures are not resized in any way. The GPU has dedicated circuitry to compute the appropriate memory offsets into the NPT texture while rendering. Actually, the simple indexing is not very complex, and has been available for a long time (EXT/ARB_texture_rectangle). It's the support of mipmaps, anisotropic filtering, etc, that is the hard part.

Share this post


Link to post
Share on other sites
i done some testing a few months ago , resulkts on www.opengl.org if u care to search.

for the gf7600 NPOT sized textures were ~10% slower than power of two sized textures
texture_rect vs NPOT were approx the same speed

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!