Jump to content
  • Advertisement
Sign in to follow this  
gl_beginner

OpenGL texturing problems

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

Hello, I'm new here, I have a project to make a scene in openGL, and im doing ok so far, I have a little village with basics houses and partly textured with .raw files. Problem is, I added another .raw to the side of my house object and now my program is running horribly slow. I am using "FreeTexture(texture[7]);" to delete my texture from memory in the glutMainLoop, so why is this one texture having such an impact? Its 1536 by 512, which is large, but my other textures are nearly as large and no problems with them. Without this one texture the program is completely smooth. I'm so stuck, can anyone help?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

your Texture is not pow of 2 it must be supported by hardware and it could be that your loader does not transform your texture in a opengl compatible format, than you have to rewrite your loader ;).

i use texture size 2048x2048 with about 1129 FPS on a GeForce 7600 ;)

Share this post


Link to post
Share on other sites
Hey, that makes sense, about needing to be a power of two. I use the HL2 engine alot and when i make textures for that i always have to make them power of two. Thanks for the help! I will give it a try!

Share this post


Link to post
Share on other sites
Are you saying you're deleting the texture each frame? and then making a new one? This seems expensive, and not a good design. We would need to seem more code I am thinking. If you want to just use gluBuild2DMipmaps() and this will take care of the NPOT issues you may have, just realize that the image will be scaled to the nearest POT size. GF6 series and newer have NPOT support, ATI IIRC x1900 and newer have NPOT support but don't quote me on that been awhile since I have used ATI.

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!