🔒 Locked
Texture update
Advertisement
Original Post
ah, but there is a way to update :D
there is an extension, supported by probably every card out there called GL_SGIS_generate_mipmap which can be used to generate the mipmaps whenever the base texture is updated.
for other details do a search on the extension on google, i''m sure it will turn up something
there is an extension, supported by probably every card out there called GL_SGIS_generate_mipmap which can be used to generate the mipmaps whenever the base texture is updated.
glBindTexture( GL_TEXTURE2D, tid );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR_MIPMAP_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 32, 32, 0, GL_RGBA,
GL_UNSIGNED_BYTE, image[0] );
// Automatic Mipmap Generation for
// Dynamic Textures
// Render some geometry to a buffer.
glBindTexture( GL_TEXTURE2D, tid );
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS,
GL_TRUE );
glCopyTexSubImage2D( GL_TEXTURE_2D, … );
// Render the scene that utilizes the mipmapped dynamic texture.
for other details do a search on the extension on google, i''m sure it will turn up something
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement