|
@@ -122,13 +122,10 @@ void OpenGLTexture::setGLInfo(GLuint textureID, GLuint frameBufferID) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void OpenGLTexture::setTextureData(char *data) {
|
|
void OpenGLTexture::setTextureData(char *data) {
|
|
|
-/*
|
|
|
|
|
|
|
+ memcpy(textureData, data, width * height * pixelSize);
|
|
|
|
|
+
|
|
|
glBindTexture(GL_TEXTURE_2D, textureID);
|
|
glBindTexture(GL_TEXTURE_2D, textureID);
|
|
|
- glDrawBuffer(GL_AUX0);
|
|
|
|
|
- glDrawPixels(width, height, glTextureType, pixelType, data);
|
|
|
|
|
- glReadBuffer(GL_AUX0);
|
|
|
|
|
-// glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 128, 128, 0);
|
|
|
|
|
-*/
|
|
|
|
|
|
|
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, glTextureType, pixelType, textureData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
OpenGLTexture::~OpenGLTexture() {
|
|
OpenGLTexture::~OpenGLTexture() {
|