/* scivi - visualization plugin for XMMS * Copyright (C) 2003 Vitaly V. Bursov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef GLSTUFF_H #define GLSTUFF_H #include #include #include #include #include extern int scivi_gl_has_GL_ARB_imaging; extern int scivi_gl_has_GL_SGIS_generate_mipmap; #define GL_HAS(e) (scivi_gl_has_##e) int scivi_check_gl_extensions(); int scivi_initialize_gl_funcs(const char *libglso); void scivi_finalize_gl_funcs(); /* GL functions */ void (*sc_glMatrixMode)(GLenum mode); void (*sc_glLoadIdentity)(); void (*sc_glOrtho)( GLdouble left,GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val); void (*sc_glPushMatrix)(); void (*sc_glPopMatrix)(); void (*sc_glLightModelfv)(GLenum pname, const GLfloat *params); void (*sc_glTexEnvi)(GLenum target, GLenum pname, GLint param); void (*sc_glBlendFunc)(GLenum sfactor, GLenum dfactor); void (*sc_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height); void (*sc_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void (*sc_glTexParameteri)(GLenum target, GLenum pname, GLint param); void (*sc_glScalef)(GLfloat x, GLfloat y, GLfloat z); void (*sc_glRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); void (*sc_glTranslatef)(GLfloat x, GLfloat y, GLfloat z); void (*sc_glLineWidth)(GLfloat width); void (*sc_glPointSize)(GLfloat size); void (*sc_glBegin)(GLenum mode); void (*sc_glTexCoord2f)(GLfloat s, GLfloat t); void (*sc_glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params); void (*sc_glVertex2f)(GLfloat x, GLfloat y); void (*sc_glEnd)(); void (*sc_glPushAttrib)(GLbitfield mask); void (*sc_glPopAttrib)(); void (*sc_glNewList)(GLuint list, GLenum mode); void (*sc_glCallList)(GLuint list); void (*sc_glEndList)(); void (*sc_glBindTexture)(GLenum target, GLuint texture); void (*sc_glEnable)(GLenum cap); void (*sc_glDisable)(GLenum cap); void (*sc_glBlendEquation)(GLenum mode); void (*sc_glClear)(GLbitfield mask); void (*sc_glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); void (*sc_glDeleteTextures)(GLsizei n, const GLuint *textures); void (*sc_glGenTextures)(GLsizei n, GLuint *textures); GLuint (*sc_glGenLists)( GLsizei range ); void (*sc_glDeleteLists)(GLuint list, GLsizei range); void (*sc_glFlush)(); const GLubyte* (*sc_glGetString)(GLenum name); GLenum (*sc_glGetError)(void); /* GLX functions */ GLXFBConfig * (*sc_glXGetFBConfigs) (Display *dpy, int screen, int *nelements); GLXFBConfig * (*sc_glXChooseFBConfig) (Display *dpy, int screen, const int *attrib_list, int *nelements); int (*sc_glXGetFBConfigAttrib) (Display *dpy, GLXFBConfig config, int attribute, int *value); XVisualInfo * (*sc_glXGetVisualFromFBConfig) (Display *dpy, GLXFBConfig config); GLXWindow (*sc_glXCreateWindow) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); void (*sc_glXDestroyWindow) (Display *dpy, GLXWindow win); GLXPixmap (*sc_glXCreatePixmap) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); void (*sc_glXDestroyPixmap) (Display *dpy, GLXPixmap pixmap); GLXPbuffer (*sc_glXCreatePbuffer) (Display *dpy, GLXFBConfig config, const int *attrib_list); void (*sc_glXDestroyPbuffer) (Display *dpy, GLXPbuffer pbuf); void (*sc_glXQueryDrawable) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); GLXContext (*sc_glXCreateNewContext) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); Bool (*sc_glXMakeContextCurrent) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx); GLXDrawable (*sc_glXGetCurrentReadDrawable) (void); Display * (*sc_glXGetCurrentDisplay) (void); int (*sc_glXQueryContext) (Display *dpy, GLXContext ctx, int attribute, int *value); void (*sc_glXSelectEvent) (Display *dpy, GLXDrawable draw, unsigned long event_mask); void (*sc_glXGetSelectedEvent) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); void (*(*sc_glXGetProcAddress)(const GLubyte *procname))(void); void (*sc_glXSwapBuffers)(Display *dpy, GLXDrawable drawable); XVisualInfo* (*sc_glXChooseVisual)(Display *dpy, int screen, int *attribList); GLXContext (*sc_glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct); Bool (*sc_glXMakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx); Bool (*sc_glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase); Bool (*sc_glXQueryVersion)(Display *dpy, int *major, int *minor); void (*sc_glXDestroyContext)(Display *dpy, GLXContext ctx); int (*sc_glXGetVideoSyncSGI)(unsigned int *); int (*sc_glXWaitVideoSyncSGI)(int, int, unsigned int *); Bool (*sc_glXIsDirect)(Display *dpy, GLXContext ctx); GLXPixmap (*sc_glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap); #endif /* GLSTUFF_H */