Some changes to the OpenGL renderer.

This commit is contained in:
OBattler
2025-11-25 06:21:43 +01:00
parent e5856f21b3
commit 31abafdfed

View File

@@ -873,6 +873,10 @@ OpenGLRenderer::initialize()
glw.initializeOpenGLFunctions();
glw.glClearColor(0, 0, 0, 1);
glw.glClear(GL_COLOR_BUFFER_BIT);
ogl3_log("OpenGL information: [%s] %s (%s)\n", glw.glGetString(GL_VENDOR), glw.glGetString(GL_RENDERER), glw.glGetString(GL_VERSION));
gl_version[0] = gl_version[1] = -1;
glw.glGetIntegerv(GL_MAJOR_VERSION, &gl_version[0]);
@@ -905,12 +909,12 @@ OpenGLRenderer::initialize()
scene_texture.data = NULL;
scene_texture.width = 2048;
scene_texture.height = 2048;
scene_texture.internal_format = GL_RGB8;
scene_texture.format = GL_BGR;
scene_texture.internal_format = GL_RGBA8;
scene_texture.format = GL_RGBA;
scene_texture.type = GL_UNSIGNED_INT_8_8_8_8_REV;
scene_texture.wrap_mode = GL_CLAMP_TO_BORDER;
scene_texture.min_filter = scene_texture.mag_filter = video_filter_method ? GL_LINEAR : GL_NEAREST;
scene_texture.mipmap = 0;
scene_texture.mipmap = 0;
create_texture(&scene_texture);
@@ -1104,10 +1108,6 @@ OpenGLRenderer::initialize()
emit initialized();
glw.glClearColor(0, 0, 0, 1);
glw.glClear(GL_COLOR_BUFFER_BIT);
context->swapBuffers(this);
} catch (const opengl_init_error &e) {
/* Mark all buffers as in use */