Thanks for posting those LookAt and Perspective routines. They're kind of needed with OpenGL ES 2.0, as it no longer has matrix modes. You need to build your own perspective and model view matrices and pass them to your vertex shaders as uniforms.
uniform mat4 modelview; // modelview matrix uniform uniform mat4 projection; // projection matrix uniform attribute vec3 xyz; // vertex position attribute attribute vec2 uv; // uv texture coordinate attribute varying vec2 texcoord; // varying texture coordinate void main() { vec4 vertex = modelview * vec4(xyz, 1.0); // transform vertex with modelview matrix uniform gl_Position = projection * vertex; // project the transformed vertex and write it to gl_Position texcoord = uv; // assign the uv texture coordinate to the varying } By the way, what's stopping you guys from using OpenGL ES 2.0? It works on most all Windows, Mac, and Linux systems, and it's the only 3D graphics API on Raspberry Pi and most smart phones/tablets.
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal