Skip to main content
gamedev.net
🔒 Locked

texturing problems

Started by gl_beginner Apr 8, 2007 at 2:19 PM 2 replies 650+ views
Original Post
gl_beginner
gl_beginner
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?
KDSBest
KDSBest
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 ;)
gl_beginner
gl_beginner
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!
MARS_999
MARS_999
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.