EmptyGL is an empty implementation to allow to compile and run the Bullet demos on platforms that lack OpenGL and Glut.

This commit is contained in:
erwin.coumans
2008-11-04 03:31:21 +00:00
parent 8f181b5604
commit 2b21eb5605
8 changed files with 1750 additions and 0 deletions

47
Glut/EmptyGL/GL/gl.h Normal file
View File

@@ -0,0 +1,47 @@
#ifndef __EGL_H
#define __EGL_H
// include types and defines
#include <GL/egl_defs.h>
// include log tokens
#include <GL/egl_tokens.h>
// include simple void functions we ignore
#include <GL/egl_void.h>
// include functions that need a bit of work, but we don't log
#include <GL/egl_cpx.h>
// include functions we log
#ifdef EGL_LOG_PTR
extern unsigned int *EGL_LOG_PTR;
inline void xGLL(int a) { *EGL_LOG_PTR=(unsigned int)a; EGL_LOG_PTR++; };
inline void xGLL(unsigned int a) { *EGL_LOG_PTR=a; EGL_LOG_PTR++; };
inline void xGLL(float a) { *(float *)EGL_LOG_PTR=a; EGL_LOG_PTR++; };
inline void xGLL(double a) { *(float *)EGL_LOG_PTR=(float)a; EGL_LOG_PTR++; };
inline void xGLL(const float *a) { for(int t=0;t!=16;t++) xGLL(a[t]); };
inline void xGLL(const double *a) { for(int t=0;t!=16;t++) xGLL(a[t]); };
#else
inline void xGLL(int a) {};
inline void xGLL(unsigned int a) {};
inline void xGLL(float a) {};
inline void xGLL(double a) {};
inline void xGLL(const float *a) {};
inline void xGLL(const double *a) {};
#endif
// functions we might log
#include <GL/egl_logged.h>
#endif