Bugs? I hope no :'(

I have a strange problem. It is about glTexSubImage2d.
I have 1 texture 102410243 (RGB). I just draw it using a quad, I have 500 fps.
If I update my texture using glTexSubImage2d I only get 14fps (I have made some tests I can update 4 pixels or the whole texture I obtain the same speed)

I’ve tryed to swith to fullscreen mode but I have the same problem.

But it works fine on windows.

I also have a some strange result just on mac when I use GL_SGIS_generate_mipmap with DXTn compressed texture… (and it works on win with a Geforce TI4200)

I have a PowerBook 12’’ G4 with a geforce FX Go.

I have an other question: where can I find drivers update for my 3d card?

Tanks a lot for your answers :wink:

For glTexSubImage2d, see this sample code . There are several things you can do to improve texture upload speeds. In the example app I am getting ~600 fps on my PowerBook with 1024x1024x32 textures, about 2400 MB/sec.

For GL_SGIS_generate_mipmap, are you compressing at runtime? I have not tried that combination… generally with DXTC you save all mipmaps into the .dds on disk. I have gotten some bad results with GL_SGIS_generate_mipmap with other texture formats though (ALPHA8 for example) on certain nvidia cards, so I wouldn’t be suprised if it didn’t work quite right with DXTC. Log a bug about it if you can make a sample app showing the problem.

As for drivers, you can only get new nvidia drivers from Apple when they release OS updates. Keep waiting for 10.3.6…

thanks a lot!
I tried the app and I can’t have more than 300 fps that is your 3D card? :wink:
I don’t understand why it is so slow (30fps) when Rectangle Texture is uncheked. I must use TEXTURE_2D for tex coord reasons so have you got an idea why is it soo slow?
thanks

thats the code with it I only have 17fps!!:

 MTuint *Test;
 Test = new MTuint[1024*8];
 memset(Test,200,1024*8*4);
 glTexSubImage2D(GL_TEXTURE_2D,0,0,0,1024,8,GL_BGRA,GL_U NSIGNED_INT_8_8_8_8_REV,Test);
 delete[] Test;
	
 glFlush();

glTexSubImage2D(GL_TEXTURE_2D,0,0,0,1024,8,GL_BGRA,GL_U NSIGNED_INT_8_8_8_8_REV,Test);
Just shooting in the dark : did you try other formats such as GL_RGBA and such ?

BGRA, UNSIGNED_INT_8_8_8_8_REV should be the fastest format.

Allocating and freeing a buffer each frame is needlessly slow.

You almost certainly don’t want to be calling glFlush. It’s seldom necessary, and always slow.

yes I know for memory but it is a test and for glflush it is to execture glTexSubImage2d immediatly for bench test the problem is in glTexSubImage2d … I am sure I it is impossible to have goods perfs without using gl_rectangle_ext. But it isn’t a good solution…
So I don’t know how to bypass this bug :’(
thanks

If your limitations are only the texcoords, you can easily adapt rectangle textures by setting up the texture matrix to multiply the texcoords by the correct scale.

On the other hand if you need mipmaps or wrapping, then you can’t use rectangle textures.

I can use rectangle texture it isn’t a probleme but it’s a fake solution… perhaps the nvidia driver has a bug I think I will send a bug report to apple
thanks for your help

"
I also have a some strange result just on mac when I use GL_SGIS_generate_mipmap with DXTn compressed texture… (and it works on win with a Geforce TI4200)
"

It works (mipmap + texture compression), at least on the Geforce 4MX on my Powerbook.

This is a thing I use regulary.

The only thing is: Don’t use the Generic Compressed Internal Format GL_COMPRESSED_RGB(A)_ARB
Thoses one are buggy on mine.

As well getting the list of compressed texture format with glGetIntegerv GL_COMPRESSED_TEXTURE_FORMATS_ARB

“On the other hand if you need mipmaps or wrapping, then you can’t use rectangle textures.”

You mean ‘can’t use non power of two textures’ ?
Other thing, it thing there is restriction on the aspect ratio of the texture. This need to be verified (1024 x 8 is your texture ?)

Rectangle textures != NPOT textures .

no I have a 1024*1024 uncompressed texture.

for GL_SGIS_generate_mipmap I try it with CubeMap and DXT1 format and it doesn’t work

I will send to apple a bug repport…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.