Как заставить этот код работать на Mesa3d? - PullRequest
3 голосов
/ 01 марта 2011

Этот код GLSL компилируется и запускается без предупреждения в OpenGL от ATI:

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;
}

Почему происходит сбой в mesa?Как расшифровать это сообщение об ошибке и сделать его совместимым с реализацией Mesa?

Compilation log:
0:1(88): error: Could not implicitly convert operands to arithmetic operator
0:1(89): error: Operands to arithmetic operators must be numeric
0:1(97): error: type mismatch

1 Ответ

3 голосов
/ 02 марта 2011

Попробуйте изменить 1 s на 1.0 s.

...