1

I am working on a GUI of image visualization using OpenGL by Python 3.6. I installed OpenGL (3.1.1a1) on Miniconda. My program had complied and worked before. I reinstalled miniconda a couple of weeks ago. However, I got the error today. I am not sure if the error is similar to the question. How can I fix the bug?

Thanks

Part of the code and Error:

1 from OpenGL import GL

142 # Set up primary geotiff texture
143 self.gtifTex = GL.glGenTextures(1)
144 GL.glActiveTexture(GL.GL_TEXTURE0)
145 GL.glBindTexture(GL.GL_TEXTURE_2D, self.gtifTex)
146 self.pixStateArr = np.zeros(mapRaster.shape[0:2], dtype=np.uint8)
147 self.gtifW = mapRaster.shape[1]
148 self.gtifH = mapRaster.shape[0]
149 GL.glTexStorage2D(GL.GL_TEXTURE_2D, 2, GL.GL_RGB8UI, self.gtifW, self.gtifH)
150 GL.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, self.gtifW, self.gtifH, GL.GL_BGR_INTEGER, GL.GL_UNSIGNED_BYTE, mapRaster)

------------Error--------------------

Traceback (most recent call last):
  File "geotiffLabelUtil_RS2.py", line 615, in <module>
    wind = MainWindow(data[0], data[1], sys.argv[1], sys.argv[1]+".csv")
  File "geotiffLabelUtil_RS2.py", line 144, in __init__
    GL.glActiveTexture(GL.GL_TEXTURE0)
  File "C:\Users\xxx\Miniconda3\envs\py36\lib\site-packages\OpenGL\platform\baseplatform.py", line 407, in __call__
    self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glActiveTexture, check for bool(glActiveTexture) before calling
Yuhao Wu
  • 11
  • 2

0 Answers0