Skip to content

Instantly share code, notes, and snippets.

@adventureloop
Created April 7, 2013 10:30
Show Gist options
  • Save adventureloop/5329929 to your computer and use it in GitHub Desktop.
Save adventureloop/5329929 to your computer and use it in GitHub Desktop.
typedef struct
{
position v;
colour c;
normal n;
textureCoord t;
} vertex;
glVertexAttribPointer(0,4,GL_FLOAT,GL_FALSE,
sizeof(vertex),
(void *)offsetof(vertex,colour));
RenderObject.cpp:86:13: error: no member named 'colour' in ''
(void *)offsetof(vertex,colour));
^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/clang/4.1/include/stddef.h:52:24: note: expanded from macro
'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment