If you don’t call gluBuild2DMipmaps(), only your top-level texture will have the hole in it, and your mipmaps will remain unchanged. Chances are that you’re not seeing the change because it’s not using the top-level mipmap.
You could try copying the hole to your mipmaps with glTexSubImage2D() as well. Don’t forget to scale it, though
the image that im blitting is different for every weapon, and is either generated at run time (eg: filled circles) of is read from a targa’s alpha channel.
i thought i could generate a small copy of the main texture, draw blackness to that then use subimage to put the new copy back on to the main texture, but it seems like a waste of time when i could simply draw directly to the main texture.
oh, btw: i am only subimaging the entire image temporarily - eventually, i will only update the part that needs updating…
If you don’t call gluBuild2DMipmaps(), only your top-level texture will have the hole in it, and your mipmaps will remain unchanged. Chances are that you’re not seeing the change because it’s not using the top-level mipmap.
Originally posted by Yorvik: i’ll try that and post the results.
i tried using subimage on a few mipmaps, no effect
the texture is created using min/mag GL_LINEAR - and im only using gluBuild2DMipMaps because glTexImage2D produces a white (null) image (the texture data is read from a 32bit targa)
i have no need for mipmaps since the game is 2D, but im stuck using build2dmips at the moment
im stumped (its probably something real simple that i’ll kick myself for when it is solved!)
[This message has been edited by Yorvik (edited 02-15-2001).]
What is the width and height of your texture? If they are not a power of 2, you will not be able to load them using glTexImage2D. gluBuild2DMipMaps will automatically resize the images to powers of two for you. So… if your image doesn’t have dimensions in a power of two, glTexImage2D won’t work but gluBuild2DMipMaps will.