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
@@ -290,6 +290,8 @@ static qboolean RB_UpdateSunFlareVis(void)
|
||||
ri.Printf(PRINT_DEVELOPER, "Waited %d iterations\n", iter);
|
||||
}
|
||||
|
||||
// Note: On desktop OpenGL this is a sample count (glRefConfig.occlusionQueryTarget == GL_SAMPLES_PASSED)
|
||||
// but on OpenGL ES this is a boolean (glRefConfig.occlusionQueryTarget == GL_ANY_SAMPLES_PASSED)
|
||||
qglGetQueryObjectuiv(tr.sunFlareQuery[tr.sunFlareQueryIndex], GL_QUERY_RESULT, &sampleCount);
|
||||
return sampleCount > 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user