Log in or register to post comments

cubeshaders.h

January 5, 2012 - 10:26am #1

i found a file cubeshaders.hin frame markers and other samples.What is that file? Every line has the code starting with '/'. what is that? I am not at understanding that file.

Re: cubeshaders.h

January 5, 2012 - 3:32pm #2

These are very simple vertex and fragment shaders for use with OpenGL ES 2.0. The vertex shader sets the position of each vertex by multiplying with the modelViewProjection matrix. The fragment shader maps the texture onto the object using the texCoord values.

Each line starts with a "\" because the entire shader is stored in a single character array. That just lets us break it up over multiple lines.

- Kim

Log in or register to post comments