I'm writing some code where all I have access to is a textureID to get access to the required texture. Is there any way that I can get access to the RGB values of this texture so I can perform some computations on it?
EDIT: I am looking for the inverse of glTexSubImage2D
. I want to get the texture data rather than replace it.
in display() function : GLuint texture; texture = LoadTexture("bubble. png"); glBindTexture(GL_TEXTURE_2D, texture);
A Sampler Object is an OpenGL Object that stores the sampling parameters for a Texture access inside of a shader.
OpenGL 3. x defines the minimum number for the per-stage limit to be 16, so hardware cannot have fewer than 16 textures-per-stage.
You are probably looking for glGetTexImage
Before using glGetTexImage
, don't forget to use glBindTexture
with your texture ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With