Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 273 vs 277 for /trunk/Source Code/Hardware/Video/OpenGL/Shaders/glShaderProgram.cpp

Diff revisions: vs.
  @@ -408,6 +408,21 @@
408 408 }
409 409 }
410 410
411 + U32 glShaderProgram::GetSubroutineUniformCount(ShaderType type) const {
412 + DIVIDE_ASSERT(_linked, "glShaderProgram error: tried to query subroutines on an unlinked program!");
413 +
414 + I32 subroutineCount = 0;
415 + glGetProgramStageiv(_shaderProgramId, _shaderStageTable[type], GL_ACTIVE_SUBROUTINE_UNIFORMS, &subroutineCount);
416 +
417 + return std::max(subroutineCount, 0);
418 + }
419 +
420 + U32 glShaderProgram::GetSubroutineUniformIndex(ShaderType type, const std::string& name) const {
421 + DIVIDE_ASSERT(_linked, "glShaderProgram error: tried to query subroutines on an unlinked program!");
422 +
423 + return glGetSubroutineUniformLocation(_shaderProgramId, _shaderStageTable[type], name.c_str());
424 + }
425 +
411 426 U32 glShaderProgram::GetSubroutineIndex(ShaderType type, const std::string& name) const {
412 427 DIVIDE_ASSERT(_linked, "glShaderProgram error: tried to query subroutines on an unlinked program!");
413 428