def _loadLightTexture(): pixels = generateLightmap(dayTime) pixels.clip(int(minBrightness * 255), 255, pixels) GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, 16, 16, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, pixels.ravel())
def generateImage(self): pixels = generateLightmap(self.dayTime, minLight=self.minBrightness, gamma=self.gamma) return pixels