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?
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.
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).
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.