opengl - How to make this code work on Mesa3d? -


this glsl code compile , run warningless in ati's opengl:

void main() {   vec4 tmp = gl_modelviewmatrix * gl_vertex;   tmp.xyz = tmp.xyz / (1 - tmp.w);   tmp.w = 1;   gl_position = gl_projectionmatrix * tmp;   gl_frontcolor = gl_color; } 

why fail mesa? how decrypt error message , make mesa's implementation compliant?

compilation log: 0:1(88): error: not implicitly convert operands arithmetic operator 0:1(89): error: operands arithmetic operators must numeric 0:1(97): error: type mismatch 

try changing 1s 1.0s.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -