Skip to content

Commit 6c2a9e5

Browse files
committed
Do not use MSAA under OpenGL ES, at least for now
MSAA will need an alternative path for GL ES using GL_EXT_multisampled_render_to_texture and GL_EXT_multisampled_render_to_texture2
1 parent 369f772 commit 6c2a9e5

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

code/graphics/opengl/es_compatibility.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
#define GLAD_GL_ARB_timer_query 0
2525
#define GL_DOUBLE 0x140A
2626
#define GL_TIMESTAMP 1
27-
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x1CCC
28-
#define GL_UNSIGNED_INT_8_8_8_8_REV 0xBAAA
29-
#define GL_BGR 0x2CCA
27+
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
28+
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
29+
#define GL_BGR 0x80E0
30+
#define GL_MULTISAMPLE 0x809D
3031

3132
//Enums
3233
#define GL_CLIP_DISTANCE0 GL_CLIP_DISTANCE0_EXT // GL_EXT_clip_cull_distance

code/graphics/opengl/gropengldraw.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,15 @@ void opengl_setup_scene_textures()
353353
return;
354354
}
355355

356+
#ifdef USE_OPENGL_ES
357+
if (Cmdline_msaa_enabled > 0) {
358+
Cmdline_msaa_enabled = 0;
359+
Warning(LOCATION, "MSAA is not currently supported under OpenGL ES. Disabling MSAA.");
360+
}
361+
#endif
362+
356363
if (Cmdline_msaa_enabled > 0) {
357-
#ifndef USE_OPENGL_ES
358364
glEnable(GL_MULTISAMPLE);
359-
#endif
360365

361366
// Make sure our MSAA setting are valid
362367
int maxSamples;

0 commit comments

Comments
 (0)