glTexImage2D performance issues (long post)

Started by
14 comments, last by zedzeek 19 years, 4 months ago
Oh! now I get it. Sorry for being a little dense, I am still rather newbiesque.

I'll reply back when it's done.

Thanks for your patience.

Lwi

Advertisement
Oooookk... it's done.

- I now create 3 textures it the init stage.
- I have an updateTexture method that fills the 3 existing textures with only calls to glBindTexture and glTexSubImage2D.
- my paintGL function is now of the form:

updateTextures;
multitexturing;
apply it on a quad;

The call to glTexSubImage2D still takes around 0.04 seconds. Darn diddly-arn.

Right now I'm guessing my real problem is the fact the I use float image data, and that my images are 720x460, which might be a bit much. is it?

Lwi
Try changing your glTexSubImage2D calls to:
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, GL_UNSIGNED_BYTE, pixels);

and time it. It's completely wrong and will give you completely useless output, but it'll highlight whether using floats is the main cause of the slowdown or not.

Enigma
Changing GL_FLOAT to GL_UNSIGNED_BYTE had no effect. However, as expected, changing the width and the height affected the performance a lot.

So I'm not really *there* yet.

[Edited by - lwi on December 1, 2004 12:38:57 PM]
Ok... I'm not getting any replies, so I'll throw another idea:

What if I took on a completly different approach and used gldrawpixels to display my images in a 2D context?

the last post in this thread seems to indicate it would be faster:
http://groups.google.ca/groups?hl=en&lr=&threadm=bhi9l2%24tus%2401%241%40news.t-online.com&rnum=3&prev=/groups%3Fq%3Dopengl%2Bvideo%2BglTexSubImage2D%26hl%3Den%26lr%3D%26selm%3Dbhi9l2%2524tus%252401%25241%2540news.t-online.com%26rnum%3D3

any thoughts?
perhaps use drawpixels though texsubimage shouldnt be slow (unless youre doing it wrong on my gffx5900 i can get (RGB) ~300 million texels/second + 1billion with packed pixels

This topic is closed to new replies.

Advertisement