123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef __EGLUTILS_H__
- #define __EGLUTILS_H__
- #include <EGL/egl.h>
- class EglUtils {
- public:
- EglUtils();
- virtual ~EglUtils();
-
- virtual bool createWindow( int displayId, int handle );
- virtual bool swapBuffers();
-
- virtual bool setCurrent();
-
- virtual bool clearContext();
-
- virtual void clear( float r=0, float g=0, float b =0) = 0;
-
- virtual int loadTexture(const char *filename)=0;
-
- virtual void releaseTexture(int textureHandle)=0;
- protected:
- bool fatalError();
- bool testEGLError(const char* pszLocation);
- EGLNativeWindowType storedWindowHandle;
-
- EGLDisplay eglDisplay;
- EGLConfig eglConfig;
- EGLSurface eglSurface;
- EGLContext eglContext;
- };
- #endif
|