mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix for panda gl compile crash in vs 2003
This commit is contained in:
parent
ab2737ac1a
commit
909b86d68e
@ -113,7 +113,7 @@ CLP(ShaderContext)(Shader *s, GSG *gsg) : ShaderContext(s) {
|
||||
for (int i = 0; i < num_uniforms; ++i) {
|
||||
int param_size;
|
||||
GLenum param_type;
|
||||
char param_name[uniform_maxlength];
|
||||
char* param_name = new char[uniform_maxlength];
|
||||
gsg->_glGetActiveUniform(_glsl_program, i, uniform_maxlength, NULL, ¶m_size, ¶m_type, param_name);
|
||||
GLint p = gsg->_glGetUniformLocation(_glsl_program, param_name);
|
||||
if (p > -1) {
|
||||
@ -224,6 +224,7 @@ CLP(ShaderContext)(Shader *s, GSG *gsg) : ShaderContext(s) {
|
||||
GLCAT.warning() << "Ignoring unrecognized GLSL parameter type!\n";
|
||||
}
|
||||
}
|
||||
delete param_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user