summaryrefslogtreecommitdiff
path: root/epilogue.c
diff options
context:
space:
mode:
Diffstat (limited to 'epilogue.c')
-rw-r--r--epilogue.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/epilogue.c b/epilogue.c
index e2837f3..6b144c4 100644
--- a/epilogue.c
+++ b/epilogue.c
@@ -9,6 +9,51 @@ __GLXextFuncPtr glXGetProcAddress(const GLubyte *name)
return glXGetProcAddressARB(name);
}
+typedef struct
+{
+ struct
+ {
+ GLenum type;
+ GLint num_components;
+ GLint enabled;
+ }
+ attrib[16];
+}
+vertex_array_format;
+
+static void vertex_array_get_format(vertex_array_format* f)
+{
+ int a;
+ for(a = 0 ; a < 16 ; a++)
+ {
+ glGetVertexAttribiv(a, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &f->attrib[a].enabled);
+ if (f->attrib[a].enabled)
+ {
+ glGetVertexAttribiv(a, GL_VERTEX_ATTRIB_ARRAY_SIZE, &f->attrib[a].num_components);
+ glGetVertexAttribiv(a, GL_VERTEX_ATTRIB_ARRAY_TYPE, &f->attrib[a].type);
+ printf("attrib %d %d %x\n",a,f->attrib[a].num_components,f->attrib[a].type);
+ }
+ else
+ {
+ f->attrib[a].num_components = 0;
+ f->attrib[a].type = 0;
+ }
+ }
+}
+
+static void vertex_array_add(vertex_array_format* f, int num)
+{
+}
+
+static void add_array(int num_elements)
+{
+ vertex_array_format f;
+ vertex_array_get_format(&f);
+ vertex_array_add(&f, num_elements);
+}
+
+
+
static void (*rtld_fini_func)(void);
static int compare(const void* a, const void* b)