mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge of GL-AutoChoose.
This branch is the final step of fully supporting both OpenGL and OpenGL ES in the same binary. This of course only applies to EGL and won't work for GLX/AGL/WGL since they don't really support GL ES. The changes here actually aren't too terrible, basically change every #ifdef USE_GLES to a runtime check. This adds a DetectMode() function to the EGL context backend. EGL will iterate through each of the configs and check for GL, GLES3_KHR, and GLES2 bits After that it'll change the mode from _DETECT to whichever one is the best supported. After that point we'll just create a context with the mode that was detected
This commit is contained in:
@ -29,7 +29,7 @@ unsigned int VideoBackend::PeekMessages()
|
||||
void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||
{
|
||||
char temp[100];
|
||||
snprintf(temp, sizeof temp, "%s | OpenGL | %s", scm_rev_str, text);
|
||||
snprintf(temp, sizeof temp, "%s | %s | %s", scm_rev_str, GetDisplayName().c_str(), text);
|
||||
return GLInterface->UpdateFPSDisplay(temp);
|
||||
}
|
||||
|
||||
@ -122,21 +122,6 @@ GLuint OpenGL_ReportGLError(const char *function, const char *file, int line)
|
||||
return err;
|
||||
}
|
||||
|
||||
void OpenGL_ReportARBProgramError()
|
||||
{
|
||||
#ifndef USE_GLES
|
||||
const GLubyte* pstr = glGetString(GL_PROGRAM_ERROR_STRING_ARB);
|
||||
if (pstr != NULL && pstr[0] != 0)
|
||||
{
|
||||
GLint loc = 0;
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
||||
ERROR_LOG(VIDEO, "Program error at %d: ", loc);
|
||||
ERROR_LOG(VIDEO, "%s", (char*)pstr);
|
||||
ERROR_LOG(VIDEO, "\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool OpenGL_ReportFBOError(const char *function, const char *file, int line)
|
||||
{
|
||||
unsigned int fbo_status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
|
||||
@ -151,14 +136,12 @@ bool OpenGL_ReportFBOError(const char *function, const char *file, int line)
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
|
||||
error = "INCOMPLETE_MISSING_ATTACHMENT";
|
||||
break;
|
||||
#ifndef USE_GLES
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
|
||||
error = "INCOMPLETE_DRAW_BUFFER";
|
||||
break;
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
|
||||
error = "INCOMPLETE_READ_BUFFER";
|
||||
break;
|
||||
#endif
|
||||
case GL_FRAMEBUFFER_UNSUPPORTED:
|
||||
error = "UNSUPPORTED";
|
||||
break;
|
||||
|
Reference in New Issue
Block a user