How to get texture data using textureID's in openGL

前端 未结 2 1885
不思量自难忘°
不思量自难忘° 2020-12-05 13:31

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 text

2条回答
  •  长情又很酷
    2020-12-05 14:19

    You are probably looking for glGetTexImage (see https://www.khronos.org/opengl/wiki/GLAPI/glGetTexImage for further information).

    Before using glGetTexImage, don't forget to use glBindTexture (https://www.khronos.org/opengl/wiki/GLAPI/glBindTexture) with your texture ID.

提交回复
热议问题