Skip to main content
gamedev.net
🔒 Locked

Texturing?

Started by foobar_ Jun 20, 2002 at 8:57 AM 4 replies 600+ views
Original Post
foobar_
foobar_
I am a OpenGL beginner, but I just want to know what is the best(fastest) choice for texturing.Is there any better(FASTER) way than using GLAUX(like in NeHe tutorial 6),... Thanks in advance.
weasalmongler
weasalmongler
What do you mean by faster? Faster to load? Faster to render?

It doesn''t matter what library u use, it should always render at about the same speed as those librarys just load the image.

I personally find the CGLBMP library very good. It allows for easy texture loading of "bmp", "tga", "png", and "jpg" files and then offers easy ways of generating OpenGL textures from it.

I do NOT recommend using the GLAUX library as it is depreciated and from what I have heard, is buggy and have memory leak problems.

- Weasalmongler
foobar_
foobar_
Yeah, I mean faster to render.It is running on about ~20-28 FPS on my computer.I know it is old(P3 450, 128 MB RAM, V3 3000), but why then I can run Quake III on ~70 FPS? And it is not just one quad with a texture :-)
weasalmongler
weasalmongler
OK, a few things to think about:

- How often are you switching textures with glBindTexture()? It is a very slow function and should be called only when necessary. Try grouping you polygons by texture and then rendering them all at once without switching texture before changing for the next batch of polys.

- Are you loading the image each frame? (I doubt this as u are getting 28 FPS)

- How much stuff are you drawing? You might want to consider some form of culling e.g. frustrum or octree culling.

- Are you using vertex arrays?

- Are you drawing with GL_TRIANGLES, or GL_TRIANGLE_STRIP, as the strip version is much faster.


-Weasalmongler

davepermen
davepermen
are you drawing BIG objects? as your system is old (the gpu as well) the speed depends VERY VERY VERY VERY VERY much on how much you draw. not how much geometry, not how much textures, but how much pixels finally want to get onto screen.if you draw for example several fullscreen quads over eachother with blending, then you can''t get much speed, no chance..

but glaux doesn''t change anything. describe what you do in your code, then we can point out possible speedkillers.

some tipps: does changing the screenres change the speed?
does changing the filtermode (from GL_LINEAR or GL_LINEAR_MIPMAP_LINEAR or such to GL_POINT or such) change the speed? (i dont say wich is faster/fastest, cause it depends on hw)
do you cull/occlude or just draw everything.
do you draw much objects? lonely objects? all in own small glBegin/glEnd pairs?
do you sort by texture?

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
foobar_
foobar_
The code is pretty much the same as is in NeHe Tutorial 6 but I draw just a quad (no triangle(s))...and map a texture to it(the image that is with the tutorial 6)...
I use GL_QUADS.

Thanks.

Topic Locked

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

Sign in to reply to this topic.