Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Opengl factoids


This is a notepad for my journey to learn opengl's programmable pipeline


Examples & Tutorials




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;



Why do some of the examples I see have 4D's?

These are homogeneous coordinates :

Why is only one pixel of my texture being rendered?

You need to enable the vertex attrib for the shader param that controls the texture.

GLint textureAttribute = glGetAttribLocation(program, name);
// ...

This comment has been minimized.

Copy link

@Ratstail91 Ratstail91 commented May 17, 2012

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 :)


This comment has been minimized.

Copy link
Owner Author

@tmpvar tmpvar commented May 17, 2012

awesome! happy I could help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment