This is a notepad for my journey to learn opengl's programmable pipeline
- http://learningwebgl.com/
- http://www.opengl.org/wiki/VBO_-_just_examples
- http://starstonesoftware.com/OpenGL/
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
typedef int GLsizei;
typedef unsigned char GLubyte;
typedef unsigned short GLushort;
typedef unsigned int GLuint;
typedef float GLfloat;
typedef float GLclampf;
typedef double GLdouble;
typedef double GLclampd;
typedef void GLvoid;
typedef long GLintptr;
typedef long GLsizeiptr;
These are homogeneous coordinates : http://en.wikipedia.org/wiki/Homogeneous_coordinates
You need to enable the vertex attrib for the shader param that controls the texture.
GLint textureAttribute = glGetAttribLocation(program, name);
// ...
glEnableVertexAttribArray(textureAttribute);
The link under the tutorials section above is amazing. I've read a couple pages, and I now already understand: vector maths, OpenGL binding/object manipulation, and OpenGL's internal structure. This will help a lot with my projects, so thanks to the writer, and to the owner of this gist :)