diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index 708dc15b7..6d6a0d8f2 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -142,7 +142,7 @@ following: -------------------------------------------- | ------ @extension{ARB,ES2_compatibility} | only float depth clear @extension{ARB,get_program_binary} | | -@extension{ARB,separate_shader_objects} | | +@extension{ARB,separate_shader_objects} | only direct uniform binding @extension{ARB,shader_precision} | done (shading language only) @extension{ARB,vertex_attrib_64bit} | done @extension{ARB,viewport_array} | | @@ -286,7 +286,7 @@ Only extensions not already listed in above tables are included here. @es_extension{EXT,texture_format_BGRA8888} | done @es_extension{EXT,read_format_bgra} | done @es_extension{EXT,disjoint_timer_query} | only time elapsed query -@es_extension{EXT,separate_shader_objects} | | +@es_extension{EXT,separate_shader_objects} | only direct uniform binding @es_extension{EXT,sRGB} | done @es_extension{EXT,multisampled_render_to_texture} | only renderbuffer storage @es_extension{EXT,robustness} | done diff --git a/src/Magnum/AbstractShaderProgram.cpp b/src/Magnum/AbstractShaderProgram.cpp index b3bc39a7e..4d1e966cf 100644 --- a/src/Magnum/AbstractShaderProgram.cpp +++ b/src/Magnum/AbstractShaderProgram.cpp @@ -321,9 +321,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform1fv(location, count, values); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const GLfloat* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform1fv(_id, location, count, values); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform1fvEXT(_id, location, count, values); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLfloat* const values) { - glProgramUniform1fv(_id, location, count, values); + glProgramUniform1fvEXT(_id, location, count, values); } #endif @@ -336,9 +349,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform2fv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<2, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform2fv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform2fvEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLfloat>* const values) { - glProgramUniform2fv(_id, location, count, values[0].data()); + glProgramUniform2fvEXT(_id, location, count, values[0].data()); } #endif @@ -351,9 +377,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform3fv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<3, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform3fv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform3fvEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLfloat>* const values) { - glProgramUniform3fv(_id, location, count, values[0].data()); + glProgramUniform3fvEXT(_id, location, count, values[0].data()); } #endif @@ -366,9 +405,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform4fv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<4, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform4fv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform4fvEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLfloat>* const values) { - glProgramUniform4fv(_id, location, count, values[0].data()); + glProgramUniform4fvEXT(_id, location, count, values[0].data()); } #endif @@ -381,9 +433,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform1iv(location, count, values); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const GLint* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform1iv(_id, location, count, values); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform1ivEXT(_id, location, count, values); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLint* const values) { - glProgramUniform1iv(_id, location, count, values); + glProgramUniform1ivEXT(_id, location, count, values); } #endif @@ -396,9 +461,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform2iv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<2, GLint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform2iv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform2ivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLint>* const values) { - glProgramUniform2iv(_id, location, count, values[0].data()); + glProgramUniform2ivEXT(_id, location, count, values[0].data()); } #endif @@ -411,9 +489,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform3iv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<3, GLint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform3iv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform3ivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLint>* const values) { - glProgramUniform3iv(_id, location, count, values[0].data()); + glProgramUniform3ivEXT(_id, location, count, values[0].data()); } #endif @@ -426,9 +517,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform4iv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<4, GLint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform4iv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform4ivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLint>* const values) { - glProgramUniform4iv(_id, location, count, values[0].data()); + glProgramUniform4ivEXT(_id, location, count, values[0].data()); } #endif @@ -442,9 +546,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform1uiv(location, count, values); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const GLuint* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform1uiv(_id, location, count, values); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform1uivEXT(_id, location, count, values); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLuint* const values) { - glProgramUniform1uiv(_id, location, count, values); + glProgramUniform1uivEXT(_id, location, count, values); } #endif @@ -457,9 +574,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform2uiv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<2, GLuint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform2uiv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform2uivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLuint>* const values) { - glProgramUniform2uiv(_id, location, count, values[0].data()); + glProgramUniform2uivEXT(_id, location, count, values[0].data()); } #endif @@ -472,9 +602,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform3uiv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<3, GLuint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform3uiv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform3uivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLuint>* const values) { - glProgramUniform3uiv(_id, location, count, values[0].data()); + glProgramUniform3uivEXT(_id, location, count, values[0].data()); } #endif @@ -487,9 +630,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform4uiv(location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<4, GLuint>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniform4uiv(_id, location, count, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniform4uivEXT(_id, location, count, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLuint>* const values) { - glProgramUniform4uiv(_id, location, count, values[0].data()); + glProgramUniform4uivEXT(_id, location, count, values[0].data()); } #endif #endif @@ -504,10 +660,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform1dv(location, count, values); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLdouble* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const GLdouble* const values) { glProgramUniform1dv(_id, location, count, values); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLdouble* const values) { + glProgramUniform1dvEXT(_id, location, count, values); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::Vector<2, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniform2dvImplementation)(location, count, values); } @@ -517,10 +677,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform2dv(location, count, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<2, GLdouble>* const values) { glProgramUniform2dv(_id, location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLdouble>* const values) { + glProgramUniform2dvEXT(_id, location, count, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::Vector<3, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniform3dvImplementation)(location, count, values); } @@ -530,10 +694,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform3dv(location, count, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<3, GLdouble>* const values) { glProgramUniform3dv(_id, location, count, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLdouble>* const values) { + glProgramUniform3dvEXT(_id, location, count, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::Vector<4, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniform4dvImplementation)(location, count, values); } @@ -543,9 +711,13 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniform4dv(location, count, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::Vector<4, GLdouble>* const values) { glProgramUniform4dv(_id, location, count, values[0].data()); } + +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLdouble>* const values) { + glProgramUniform4dvEXT(_id, location, count, values[0].data()); +} #endif void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<2, 2, Float>* const values) { @@ -557,9 +729,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix2fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix2fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* const values) { - glProgramUniformMatrix2fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix2fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -572,9 +757,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix3fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix3fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* const values) { - glProgramUniformMatrix3fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix3fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -587,9 +785,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix4fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix4fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* const values) { - glProgramUniformMatrix4fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix4fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -603,9 +814,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2x3fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix2x3fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix2x3fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* const values) { - glProgramUniformMatrix2x3fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix2x3fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -618,9 +842,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3x2fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix3x2fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix3x2fv(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* const values) { - glProgramUniformMatrix3x2fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix3x2fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -633,9 +870,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2x4fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix2x4fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix2x4fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* const values) { - glProgramUniformMatrix2x4fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix2x4fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -648,9 +898,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4x2fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix4x2fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix4x2fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* const values) { - glProgramUniformMatrix4x2fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix4x2fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -663,9 +926,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3x4fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix3x4fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix3x4fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* const values) { - glProgramUniformMatrix3x4fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix3x4fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif @@ -678,9 +954,22 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4x3fv(location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* const values) { + /** @todo Enable when extension loader for ES is available */ + #ifndef MAGNUM_TARGET_GLES + glProgramUniformMatrix4x3fv(_id, location, count, GL_FALSE, values[0].data()); + #else + CORRADE_INTERNAL_ASSERT(false); + //glProgramUniformMatrix4x3fvEXT(_id, location, count, GL_FALSE, values[0].data()); + static_cast(location); + static_cast(count); + static_cast(values); + #endif +} + #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* const values) { - glProgramUniformMatrix4x3fv(_id, location, count, GL_FALSE, values[0].data()); + glProgramUniformMatrix4x3fvEXT(_id, location, count, GL_FALSE, values[0].data()); } #endif #endif @@ -695,10 +984,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* const values) { glProgramUniformMatrix2dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* const values) { + glProgramUniformMatrix2dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<3, 3, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix3dvImplementation)(location, count, values); } @@ -708,10 +1001,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* const values) { glProgramUniformMatrix3dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* const values) { + glProgramUniformMatrix3dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<4, 4, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix4dvImplementation)(location, count, values); } @@ -721,10 +1018,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* const values) { glProgramUniformMatrix4dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* const values) { + glProgramUniformMatrix4dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<2, 3, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix2x3dvImplementation)(location, count, values); } @@ -734,10 +1035,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2x3dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* const values) { glProgramUniformMatrix2x3dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* const values) { + glProgramUniformMatrix2x3dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<3, 2, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix3x2dvImplementation)(location, count, values); } @@ -747,10 +1052,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3x2dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* const values) { glProgramUniformMatrix3x2dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* const values) { + glProgramUniformMatrix3x2dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<2, 4, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix2x4dvImplementation)(location, count, values); } @@ -760,10 +1069,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix2x4dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* const values) { glProgramUniformMatrix2x4dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* const values) { + glProgramUniformMatrix2x4dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<4, 2, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix4x2dvImplementation)(location, count, values); } @@ -773,10 +1086,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4x2dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* const values) { glProgramUniformMatrix4x2dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* const values) { + glProgramUniformMatrix4x2dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<3, 4, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix3x4dvImplementation)(location, count, values); } @@ -786,10 +1103,14 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix3x4dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* const values) { glProgramUniformMatrix3x4dv(_id, location, count, GL_FALSE, values[0].data()); } +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* const values) { + glProgramUniformMatrix3x4dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} + void AbstractShaderProgram::setUniform(const Int location, const UnsignedInt count, const Math::RectangularMatrix<4, 3, Double>* const values) { (this->*Context::current()->state().shaderProgram->uniformMatrix4x3dvImplementation)(location, count, values); } @@ -799,9 +1120,13 @@ void AbstractShaderProgram::uniformImplementationDefault(const GLint location, c glUniformMatrix4x3dv(location, count, GL_FALSE, values[0].data()); } -void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* const values) { +void AbstractShaderProgram::uniformImplementationSSO(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* const values) { glProgramUniformMatrix4x3dv(_id, location, count, GL_FALSE, values[0].data()); } + +void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* const values) { + glProgramUniformMatrix4x3dvEXT(_id, location, count, GL_FALSE, values[0].data()); +} #endif namespace Implementation { diff --git a/src/Magnum/AbstractShaderProgram.h b/src/Magnum/AbstractShaderProgram.h index fcf00d4bf..09bc42fd9 100644 --- a/src/Magnum/AbstractShaderProgram.h +++ b/src/Magnum/AbstractShaderProgram.h @@ -809,6 +809,28 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<2, GLdouble>* values); void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<3, GLdouble>* values); void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<4, GLdouble>* values); + #endif + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const GLfloat* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<2, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<3, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<4, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const GLint* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<2, GLint>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<3, GLint>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<4, GLint>* values); + #ifndef MAGNUM_TARGET_GLES2 + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const GLuint* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<2, GLuint>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<3, GLuint>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<4, GLuint>* values); + #endif + #ifndef MAGNUM_TARGET_GLES + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const GLdouble* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<2, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<3, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::Vector<4, GLdouble>* values); + #endif + #ifndef MAGNUM_TARGET_GLES void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const GLfloat* values); void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<2, GLfloat>* values); void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<3, GLfloat>* values); @@ -848,6 +870,30 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* values); void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* values); void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* values); + #endif + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* values); + #ifndef MAGNUM_TARGET_GLES2 + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* values); + #endif + #ifndef MAGNUM_TARGET_GLES + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* values); + void MAGNUM_LOCAL uniformImplementationSSO(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* values); + #endif + #ifndef MAGNUM_TARGET_GLES void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* values); void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* values); void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* values); diff --git a/src/Magnum/Implementation/ShaderProgramState.cpp b/src/Magnum/Implementation/ShaderProgramState.cpp index 9ef01e4b6..3e375e8c0 100644 --- a/src/Magnum/Implementation/ShaderProgramState.cpp +++ b/src/Magnum/Implementation/ShaderProgramState.cpp @@ -39,13 +39,66 @@ ShaderProgramState::ShaderProgramState(Context& context, std::vector() || - context.isExtensionSupported()) + if(context.isExtensionSupported()) + #else + if(context.isExtensionSupported()) + #endif { - extensions.push_back(context.isExtensionSupported() ? - Extensions::GL::ARB::separate_shader_objects::string() : Extensions::GL::EXT::direct_state_access::string()); + #ifndef MAGNUM_TARGET_GLES + extensions.push_back(Extensions::GL::ARB::separate_shader_objects::string()); + #else + extensions.push_back(Extensions::GL::EXT::separate_shader_objects::string()); + #endif + + uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform2fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform3fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform4fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform1ivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform2ivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform3ivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform4ivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #ifndef MAGNUM_TARGET_GLES2 + uniform1uivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform2uivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform3uivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform4uivImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #endif + #ifndef MAGNUM_TARGET_GLES + uniform1dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform2dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform3dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniform4dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #endif + + uniformMatrix2fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #ifndef MAGNUM_TARGET_GLES2 + uniformMatrix2x3fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3x2fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix2x4fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4x2fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3x4fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4x3fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #endif + #ifndef MAGNUM_TARGET_GLES + uniformMatrix2dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix2x3dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3x2dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix2x4dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4x2dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix3x4dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + uniformMatrix4x3dvImplementation = &AbstractShaderProgram::uniformImplementationSSO; + #endif + } + + #ifndef MAGNUM_TARGET_GLES + else if(context.isExtensionSupported()) { + extensions.push_back(Extensions::GL::EXT::direct_state_access::string()); uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDSA; uniform2fvImplementation = &AbstractShaderProgram::uniformImplementationDSA; @@ -82,14 +135,10 @@ ShaderProgramState::ShaderProgramState(Context& context, std::vector(context); - static_cast(extensions); - #endif + else { uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDefault; uniform2fvImplementation = &AbstractShaderProgram::uniformImplementationDefault; uniform3fvImplementation = &AbstractShaderProgram::uniformImplementationDefault;