Skip to content

Commit 95aff8f

Browse files
committed
Fix scanlines with some OGL drivers
1 parent 229b3b2 commit 95aff8f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

platforms/shared/desktop/ogl_renderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ static uint32_t frame_buffer_object;
4040
static GG_Runtime_Info current_runtime;
4141
static bool first_frame;
4242
static bool mix_round_error = false;
43-
static u32 scanlines[16] = {
44-
0x00000000, 0x00000000, 0x00000000, 0x00000000,
45-
0x00000000, 0x00000000, 0x00000000, 0x00000000,
46-
0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF,
47-
0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF};
43+
static u8 scanlines[64] = {
44+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
45+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46+
0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255,
47+
0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255};
4848

4949
static uint32_t quad_shader_program = 0;
5050
static uint32_t quad_vao = 0;
@@ -267,7 +267,7 @@ static void init_scanlines_texture(void)
267267
{
268268
glGenTextures(1, &scanlines_texture);
269269
glBindTexture(GL_TEXTURE_2D, scanlines_texture);
270-
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, (GLvoid*) scanlines);
270+
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*) scanlines);
271271
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
272272
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
273273
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);

0 commit comments

Comments
 (0)