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:
emufan4568
2022-10-14 16:02:11 +03:00
committed by GPUCode
parent 2a4f0ce8de
commit 159809eb32
3 changed files with 7 additions and 9 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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