-# Example GLIAR configuration
-# Copyright: Canonical Ltd, 2013
-# Author: Eleni Maria Stea <elene.mst@gmail.com>
+# example GLIAR configuration that emulates the asus eee GPU
+# copyright]Canonical Ltd, 2013
+# author]Eleni Maria Stea <elene.mst@gmail.com>
#
# Instructions:
-# Copy this file to ~/.gliar.conf or to gliar.conf in the
-# libgliar directory. Then run:
+# Copy this file to ~/.gliar.con[f or to gliar.conf in the
+# libgliar directory. Then run]
# gliar <opengl_program_name>
#
GL_ARB_texture_storage
GL_ARB_invalidate_subdata
+[major version]
+2
+
+[minor version]
+1
+
+[max texture units]
+8
+
+[max texture image units]
+16
+
+[max combined texture image units]
+32
+
+[max vertex texture image units]
+16
+
[max texture size]
8192
-[max texture units]
+[max cube map texture size]
+8192
+
+[max texture coordinates]
8
+
+[max vertex attributes]
+16
+
+[max vertex uniform vectors]
+4096
+
+[max fragment uniform vectors]
+4096
+
+[max varying vectors]
+32
+
+[max color attachments]
+8
+
+[max renderbuffer size ext]
+8192
+
+[max program attribs arb]
+8
+
+[v max program instructions arb]
+16384
+
+[v max program native instructions arb]
+1048576
+
+[v max program temporaries arb]
+256
+
+[v max program native temporaries arb]
+256
+
+[v max program program parameters arb]
+32384
+
+[v max program native parameters arb]
+32384
+
+[v max program attribs arb]
+16
+
+[v max program native attribs arb]
+32
+
+[v max program address registers arb]
+1
+
+[v max program native address registers arb]
+16
+
+[v max program local parameters arb]
+4096
+
+[v max program env parameters arb]
+256
+
+[v max program alu instructions arb]
+256
+
+[v max program native alu instructions arb]
+256
+
+[f max program instructions arb]
+16384
+
+[f max program native instructions arb]
+1048576
+
+[f max program temporaries arb]
+256
+
+[f max program native temporaries arb]
+256
+
+[f max program program parameters arb]
+32384
+
+[f max program native parameters arb]
+32384
+
+[f max program attribs arb]
+12
+
+[f max program native attribs arb]
+32
+
+[f max program address registers arb]
+0
+
+[f max program native address registers arb]
+16
+
+[f max program local parameters arb]
+4096
+
+[f max program en[v parameters arb]
+256
+
+[f max program alu instructions arb]
+16384
+
+[f max program native alu instructions arb]
+1048576
init();
if(!gl_get_programiv) {
- fprintf(stderr, "Unable to fake the %s function. It is not supported by your OpenGL implementation.\n", __func__);
+ fprintf(stderr, "GLIAR: Unable to fake the %s function. It is not supported by your OpenGL implementation.\n", __func__);
return;
}
void *glXGetProcAddress(const unsigned char *procname)
{
- if(!glx_get_proc_address) {
- glx_get_proc_address = dlsym(RTLD_NEXT, "glXGetProcAddress");
- if(!glx_get_proc_address) {
- return 0;
- }
- }
+ init();
- if(!strcmp((char*)procname, "glGetProgramivARB")) {
- char *overr_name = "gl_get_programiv";
- return glx_get_proc_address((unsigned char*)overr_name);
+ if(!strcmp((char*)procname, "glGetProgramivARB") || !strcmp((char*)procname, "glGetProgramiv")) {
+ return glGetProgramivARB;
}
return glx_get_proc_address(procname);
}
+
+void *glXGetProcAddressARB(const unsigned char *procname)
+{
+ return glXGetProcAddress(procname);
+}
*/
#include <stdio.h>
-#include <GL/glew.h>
+//#include <GL/glew.h>
#include <GL/glut.h>
+#include <GL/glx.h>
#define GET_INTEGER(x) (glGetIntegerv(x, &val), val)
-#define GET_PROGRAMIV_ARB_V(x) (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, x, &val), val)
-#define GET_PROGRAMIV_ARB_F(x) (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, x, &val), val)
+#define GET_PROGRAMIV_ARB_V(x) (gl_get_progiv(GL_VERTEX_PROGRAM_ARB, x, &val), val)
+#define GET_PROGRAMIV_ARB_F(x) (gl_get_progiv(GL_FRAGMENT_PROGRAM_ARB, x, &val), val)
int main(int argc, char **argv)
{
int val;
+ void (*gl_get_progiv)(GLuint, GLenum, GLint*);
+
glutInit(&argc, argv);
glutCreateWindow("glinfo");
- glewInit();
+// glewInit();
+
+ gl_get_progiv = glXGetProcAddress("glGetProgramivARB");
printf("vendor: %s\n", glGetString(GL_VENDOR));
printf("renderer: %s\n", glGetString(GL_RENDERER));