glTexSubImage2D && SGIS_generate_mipmap

Hello.
I read that
glTexSubImage2D is ‘better’ than glTexImage2D. I changed it in my TextureLoader and all textures went white. Or they weren’t there I guess.
Is there any tutorial on this

I also read SGIS_generate_mipmap is ‘better’ than gluBuild2DMipmaps. Unfortunately I could not use it at all. Is there any good tutorial that helps me to use this?
As you might guess I am still pretty new to all this OpenGL-Stuff…
Well, help would be great!

I believe you can only use glTexSubImage to alter images that have already been set with glTexImage, so the two calls aren’t always interchangeable. glTexSubImage is good for cases where you are dynamically changing a texture and need to re-load the image data often.

So far as SGIS_generate_mipmap, I’ve never used it myself so I can’t help much. Are you sure that your card supports that extension, though?

Thanks for the info about the TextureImage.

About the SGIS_generate_mipmap:
No, I am not sure if is supported by my card.
(I have a GeForce2)
Is this SGIS some workstation thing?
If anybody knows if SGIS_generate_mipmap is supported by ‘normal’ graphic-cards I would like to know how to use it.

Thanks.

I don’t remember if my GF2 supports that extension or not, and I’m not home to check. But if you want to see all the extensions your card supports, you can use glGetString(GL_EXTENSIONS).

‘54 GL_SGIS_generate_mipmap’
Is that what we are looking for?

Hi,

I’m using the “SGIS_generate_mipmap” extension for my 3D Engine, this extension is supported by my 3D card, simply test if the extension is supported then, use this params in your texture loading function :

GL_GENERATE_MIPMAP_SGIS

Try this, and if it’s not OK for you, I’ll post more code.

Hey.
Some more code would be great as I get an ‘undeclared identifier’-ERROR.
Thanks for the help!

[Just by the way: Are you the slug guy?
I saw your IOD on flipcode and downloaded your demo, couldn’t run it, though. ‘fmod.dll’ or so was missing…]

[This message has been edited by B_old (edited 10-28-2002).]

Hi,

You error comes from that you need to include “GLExt.h” file. I hope that you’ve this file.

Next, here’s the code (it comes from my engine, but you can use it) :

glGenTextures(1, &Texture_TGA[i].Texture_ID);
glBindTexture(GL_TEXTURE_2D, Texture_TGA[i].Texture_ID);
glTexParameteri(GL_TEXTURE_2D,GL_GENERATE_MIPMAP_SGIS,GL_TRUE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Texture_TGA[i].width, Texture_TGA[i].height, 0, GL_RGB, GL_UNSIGNED_BYTE, Texture_TGA[i].imageData);

Yeah, I’m the Slug Guy I’ve sended a mail to you with a document on SGIS MipMapping, the MFOD.DLL and the Demo.

I hope that you’ll try it for me.

Thanks.

Don’t forget to test if you 3D Card supports this extension :

SGIS_generate_mipmap

My GeForce 1 256 DDR supports the extension but not my TNT2 M64

OK, great!
Thank you very much.