Upgrade to OpenGL ES 3.2 (#1879)
* upgrade to opengl 3.2 * cornerpin: no need for hack * renderer: Update OCIO shader language to ES 3.0 Co-authored-by: Thomas Wilshaw <thomaswilshaw@gmail.com>
This commit is contained in:
co-authored by
Thomas Wilshaw
parent
cdf9efa7f6
commit
a4056d8454
@@ -887,14 +887,9 @@ GLuint OpenGLRenderer::GetCachedTexture(int width, int height, int depth, VideoP
|
||||
GLuint OpenGLRenderer::CompileShader(GLenum type, const QString &code)
|
||||
{
|
||||
static const QString shader_preamble =
|
||||
#ifndef Q_OS_MAC
|
||||
// Use appropriate GL ES 2.0 shader header
|
||||
QStringLiteral("#version 100\n\n"
|
||||
// Use appropriate GL 3.2 shader header
|
||||
QStringLiteral("#version 150\n\n"
|
||||
"precision highp float;\n\n");
|
||||
#else
|
||||
// Use desktop GL equivalent header because apparently macOS doesn't support the ES header
|
||||
QStringLiteral("#version 120\n\n");
|
||||
#endif
|
||||
|
||||
QString complete_code;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ bool Renderer::GetColorContext(ColorProcessorPtr color_processor, Renderer::Colo
|
||||
// Create shader description
|
||||
const char* ocio_func_name = "OCIODisplay";
|
||||
auto shader_desc = OCIO::GpuShaderDesc::CreateShaderDesc();
|
||||
shader_desc->setLanguage(OCIO::GPU_LANGUAGE_GLSL_1_3);
|
||||
shader_desc->setLanguage(OCIO::GPU_LANGUAGE_GLSL_ES_3_0);
|
||||
shader_desc->setFunctionName(ocio_func_name);
|
||||
shader_desc->setResourcePrefix("ocio_");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user