OpenGL2: Add OpenGL ES 2.0+ support
This mainly targets OpenGL ES 2.0 but it also supports compiling GLSL as ESSL 3.00. It's missing support for framebuffer objects which should be possible on ES 2. (Though using renderbuffers instead of textures.) opengl1 cvars that are not supported will display a message and disable the cvar. This has not been reviewed for new opengl2 cvars. Enabling cvars may cause rendering issues. Some of the broken cvars may be possible to support using OpenGL ES 3 features. The game displays okay with the default cvars.
This commit is contained in:
1 parent
1fc83e4845
commit
3b984d2b51
14 files changed
+658
-167
No files matched your search
@@ -348,7 +348,13 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
||||
//
|
||||
if ( r_measureOverdraw->integer )
|
||||
{
|
||||
if ( glConfig.stencilBits < 4 )
|
||||
if ( qglesMajorVersion >= 1 && !glRefConfig.readStencil )
|
||||
{
|
||||
ri.Printf( PRINT_WARNING, "OpenGL ES needs GL_NV_read_stencil to read stencil bits to measure overdraw\n" );
|
||||
ri.Cvar_Set( "r_measureOverdraw", "0" );
|
||||
r_measureOverdraw->modified = qfalse;
|
||||
}
|
||||
else if ( glConfig.stencilBits < 4 )
|
||||
{
|
||||
ri.Printf( PRINT_ALL, "Warning: not enough stencil bits to measure overdraw: %d\n", glConfig.stencilBits );
|
||||
ri.Cvar_Set( "r_measureOverdraw", "0" );
|
||||
@@ -426,6 +432,13 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qglesMajorVersion >= 1 && r_anaglyphMode->integer)
|
||||
{
|
||||
ri.Printf( PRINT_WARNING, "OpenGL ES does not support drawing to separate buffer for anaglyph mode\n" );
|
||||
ri.Cvar_Set( "r_anaglyphMode", "0" );
|
||||
r_anaglyphMode->modified = qfalse;
|
||||
}
|
||||
|
||||
if(r_anaglyphMode->integer)
|
||||
{
|
||||
if(r_anaglyphMode->modified)
|
||||
|
||||
Reference in new issue
Block a user