I want to kill textures.
I am making a simple platform game engine (sort of) and I want to have diffrent textures in diffrent levels. I refrence most of the 2D textures with a GLuint texture[TEXTURE_MAX] array. If I create a new texture refrencing a part of the array, is the old texture overwritten, destroyed, or does it stay in memory and take it space? In any case, HOW DO I KILL IT?
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
well if you bind any texture use "glBindTexture" and then call "glTexImage" it will remove that texture from texture memory and insert the new texture in it''s place. however, it does not touch the bitmap {texture} that you send to it. i''m not sure if you need to call "glBindTexture" again to solidify this action, but i do.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
1.) OpenGL maintains a copy of your texture array in system/video ram
2.) You can free the memory you allocated for your array at any time after you passed it to gl
3.) If you want gl to kill its copy of the texture, use glDeleteTextures()
2.) You can free the memory you allocated for your array at any time after you passed it to gl
3.) If you want gl to kill its copy of the texture, use glDeleteTextures()
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement