Skip to content

Commit 31abafd

Browse files
committed
Some changes to the OpenGL renderer.
1 parent e5856f2 commit 31abafd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/qt/qt_openglrenderer.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,10 @@ OpenGLRenderer::initialize()
873873

874874
glw.initializeOpenGLFunctions();
875875

876+
glw.glClearColor(0, 0, 0, 1);
877+
878+
glw.glClear(GL_COLOR_BUFFER_BIT);
879+
876880
ogl3_log("OpenGL information: [%s] %s (%s)\n", glw.glGetString(GL_VENDOR), glw.glGetString(GL_RENDERER), glw.glGetString(GL_VERSION));
877881
gl_version[0] = gl_version[1] = -1;
878882
glw.glGetIntegerv(GL_MAJOR_VERSION, &gl_version[0]);
@@ -905,12 +909,12 @@ OpenGLRenderer::initialize()
905909
scene_texture.data = NULL;
906910
scene_texture.width = 2048;
907911
scene_texture.height = 2048;
908-
scene_texture.internal_format = GL_RGB8;
909-
scene_texture.format = GL_BGR;
912+
scene_texture.internal_format = GL_RGBA8;
913+
scene_texture.format = GL_RGBA;
910914
scene_texture.type = GL_UNSIGNED_INT_8_8_8_8_REV;
911915
scene_texture.wrap_mode = GL_CLAMP_TO_BORDER;
912916
scene_texture.min_filter = scene_texture.mag_filter = video_filter_method ? GL_LINEAR : GL_NEAREST;
913-
scene_texture.mipmap = 0;
917+
scene_texture.mipmap = 0;
914918

915919
create_texture(&scene_texture);
916920

@@ -1104,10 +1108,6 @@ OpenGLRenderer::initialize()
11041108

11051109
emit initialized();
11061110

1107-
glw.glClearColor(0, 0, 0, 1);
1108-
1109-
glw.glClear(GL_COLOR_BUFFER_BIT);
1110-
11111111
context->swapBuffers(this);
11121112
} catch (const opengl_init_error &e) {
11131113
/* Mark all buffers as in use */

0 commit comments

Comments
 (0)