Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for type comparison for glsl programs #1650

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/MaterialXRenderGlsl/GlslProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,19 +1040,19 @@ int GlslProgram::mapTypeToOpenGLType(const TypeDesc* type)
{
if (type == Type::INTEGER)
return GL_INT;
else if (type == Type::BOOLEAN)
else if (type->getName() == Type::BOOLEAN->getName())
return GL_BOOL;
else if (type == Type::FLOAT)
else if (type->getName() == Type::FLOAT->getName())
return GL_FLOAT;
else if (type->isFloat2())
return GL_FLOAT_VEC2;
else if (type->isFloat3())
return GL_FLOAT_VEC3;
else if (type->isFloat4())
return GL_FLOAT_VEC4;
else if (type == Type::MATRIX33)
else if (type->getName() == Type::MATRIX33->getName())
return GL_FLOAT_MAT3;
else if (type == Type::MATRIX44)
else if (type->getName() == Type::MATRIX44->getName())
return GL_FLOAT_MAT4;
else if (type == Type::FILENAME)
{
Expand Down