renderer_opengl: Fix OpenGLES issues
* Always request a 4.4 context until I figure out how to get Qt to cooperate * Use RGBA for BGR since the converted table will do that conversion
This commit is contained in:
@ -121,12 +121,8 @@ public:
|
||||
explicit OpenGLSharedContext(QSurface* surface) : surface(surface) {
|
||||
QSurfaceFormat format;
|
||||
|
||||
if (Settings::values.graphics_api == Settings::GraphicsAPI::OpenGLES) {
|
||||
format.setVersion(3, 2);
|
||||
} else {
|
||||
format.setVersion(4, 4);
|
||||
format.setProfile(QSurfaceFormat::CoreProfile);
|
||||
}
|
||||
format.setVersion(4, 4);
|
||||
format.setProfile(QSurfaceFormat::CoreProfile);
|
||||
|
||||
if (Settings::values.renderer_debug) {
|
||||
format.setOption(QSurfaceFormat::FormatOption::DebugContext);
|
||||
|
@ -79,8 +79,10 @@ Driver::Driver(bool gles, bool enable_debug) : is_gles{gles} {
|
||||
* Qualcomm has some spammy info messages that are marked as errors but not important
|
||||
* https://developer.qualcomm.com/comment/11845
|
||||
*/
|
||||
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
glDebugMessageCallback(DebugHandler, nullptr);
|
||||
if (!gles) {
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
glDebugMessageCallback(DebugHandler, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
ReportDriverInfo();
|
||||
|
@ -30,7 +30,7 @@ static constexpr std::array COLOR_TUPLES = {
|
||||
|
||||
static constexpr std::array COLOR_TUPLES_OES = {
|
||||
FormatTuple{GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}, // RGBA8
|
||||
FormatTuple{GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE}, // RGB8
|
||||
FormatTuple{GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}, // RGB8
|
||||
FormatTuple{GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1}, // RGB5A1
|
||||
FormatTuple{GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}, // RGB565
|
||||
FormatTuple{GL_RGBA4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4}, // RGBA4
|
||||
|
Reference in New Issue
Block a user