| 1061 | } |
| 1062 | |
| 1063 | int vtkShaderProgram::FindAttributeArray(const char* cname) |
| 1064 | { |
| 1065 | if (cname == nullptr || !this->Linked) |
| 1066 | { |
| 1067 | return -1; |
| 1068 | } |
| 1069 | |
| 1070 | GLint loc = -1; |
| 1071 | |
| 1072 | IterT iter = this->AttributeLocs.find(cname); |
| 1073 | if (iter == this->AttributeLocs.end()) |
| 1074 | { |
| 1075 | loc = glGetAttribLocation(static_cast<GLuint>(Handle), static_cast<const GLchar*>(cname)); |
| 1076 | const char* allocStr = strdup(cname); |
| 1077 | this->AttributeLocs.insert(std::make_pair(allocStr, static_cast<int>(loc))); |
| 1078 | } |
| 1079 | else |
| 1080 | { |
| 1081 | loc = iter->second; |
| 1082 | } |
| 1083 | return loc; |
| 1084 | } |
| 1085 | |
| 1086 | int vtkShaderProgram::FindUniform(const char* cname) |
| 1087 | { |
no test coverage detected