Qt: DisplayGL cleanup

This commit is contained in:
Jeffrey Pfau 2015-04-18 03:49:48 -07:00
parent d4ab0564eb
commit b81f045d27
2 changed files with 3 additions and 5 deletions

View File

@ -139,16 +139,15 @@ void Painter::setContext(GBAThread* context) {
} }
void Painter::setBacking(const uint32_t* backing) { void Painter::setBacking(const uint32_t* backing) {
m_backing = backing;
makeCurrent(); makeCurrent();
#ifdef COLOR_16_BIT #ifdef COLOR_16_BIT
#ifdef COLOR_5_6_5 #ifdef COLOR_5_6_5
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_backing); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, backing);
#else #else
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, m_backing); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, backing);
#endif #endif
#else #else
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_backing); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, backing);
#endif #endif
doneCurrent(); doneCurrent();
} }

View File

@ -74,7 +74,6 @@ private:
QTimer* m_drawTimer; QTimer* m_drawTimer;
GBAThread* m_context; GBAThread* m_context;
const uint32_t* m_backing;
GLuint m_tex; GLuint m_tex;
QSize m_size; QSize m_size;
bool m_lockAspectRatio; bool m_lockAspectRatio;