texture registering

until now i’ve always used gluBuild2DMipmaps() for texture registration, however when i try to register a texture object using glTexImage2D, the texture image somehow gets lost, at least i am not getting any texture when binding this texture object, although it does reserve an ID!=0


Are you filling up all mipmap levels correctly?

of course not. i don’t want to use mipmaps for this texture since it’s just for a skybox and therefore always directly in my face
do i need to set some glTexParameters for this to work?



do u use glGenTextures(…)?

Does your texture have dimensions that are a power of 2? gluBuild2DMipMaps will resize textures to be a power of 2 for you. glTexImage2D will not. And in order to work, your textures must have dimensions that are a power of 2.

Question: I know that the textures must be powers of 2, but I discover that I can’t use power greater than 8. The red book says the max power depends on opengl implementation…

1.How exactly?
2. Why is that?
3. Can I increase it?
4. How do I increase it?

It’s up to whoever is writing your implementation (the driver for your graphics card in most cases today) to choose how large textures you can use. And no, you can’t change the maximum size.

Use glGetInteger with GL_MAX_TEXTURE_SIZE to ask your implementation how large textures it can use.