\r
if(static_cast<egl::Surface*>(getCurrentDrawSurface()) == this)\r
{\r
- gl::makeCurrent(gl::getCurrentContext(), static_cast<egl::Display*>(getCurrentDisplay()), this);\r
+ gl::makeCurrent(static_cast<gl::Context*>(getCurrentContext()), static_cast<egl::Display*>(getCurrentDisplay()), this);\r
}\r
\r
return true;\r
\r
try\r
{\r
- EGLContext context = gl::getCurrentContext();\r
+ EGLContext context = egl::getCurrentContext();\r
\r
return success(context);\r
}\r
gl::createDevice = (gl::Device*(*)())getProcAddress(libGLESv2, "createDevice");\r
gl::createContext = (gl::Context *(*)(const egl::Config*, const gl::Context*))getProcAddress(libGLESv2, "glCreateContext");\r
gl::makeCurrent = (void (*)(gl::Context*, egl::Display*, egl::Surface*))getProcAddress(libGLESv2, "glMakeCurrent");\r
- gl::getCurrentContext = (gl::Context *(*)())getProcAddress(libGLESv2, "glGetCurrentContext");\r
gl::getProcAddress = (__eglMustCastToProperFunctionPointerType (*)(const char*))getProcAddress(libGLESv2, "glGetProcAddress");\r
gl::createBackBuffer = (gl::Image *(*)(int, int, const egl::Config*))getProcAddress(libGLESv2, "createBackBuffer");\r
gl::createFrameBuffer = (sw::FrameBuffer *(*)(EGLNativeDisplayType, EGLNativeWindowType, int, int))getProcAddress(libGLESv2, "createFrameBuffer");\r
return current->display;\r
}\r
\r
+void setCurrentContext(EGLContext ctx)\r
+{\r
+ Current *current = eglGetCurrent();\r
+\r
+ current->context = ctx;\r
+}\r
+\r
+EGLDisplay getCurrentContext()\r
+{\r
+ Current *current = eglGetCurrent();\r
+\r
+ return current->context;\r
+}\r
+\r
void setCurrentDrawSurface(EGLSurface surface)\r
{\r
Current *current = eglGetCurrent();\r
EGLint error;
EGLenum API;
EGLDisplay display;
+ EGLContext context;
EGLSurface drawSurface;
EGLSurface readSurface;
};
void setCurrentDisplay(EGLDisplay dpy);
EGLDisplay getCurrentDisplay();
+ void setCurrentContext(EGLContext ctx);
+ EGLContext getCurrentContext();
+
void setCurrentDrawSurface(EGLSurface surface);
EGLSurface getCurrentDrawSurface();
extern Context *(*createContext)(const egl::Config *config, const Context *shareContext);
extern void (*bindTexImage)(egl::Surface *surface);
extern void (*makeCurrent)(Context *context, egl::Display *display, egl::Surface *surface);
- extern Context *(*getCurrentContext)();
extern __eglMustCastToProperFunctionPointerType (*getProcAddress)(const char *procname);
extern Image *(*createBackBuffer)(int width, int height, const egl::Config *config);
extern sw::FrameBuffer *(*createFrameBuffer)(EGLNativeDisplayType display, EGLNativeWindowType window, int width, int height);
{\r
gl::makeCurrent(context, display, surface);\r
}\r
-\r
- gl::Context *glGetCurrentContext()\r
- {\r
- return gl::getContext();\r
- }\r
}\r
; EGL dependencies
glCreateContext @144
glMakeCurrent @146
- glGetCurrentContext @147
glGetProcAddress @148
glBindTexImage @158
{\r
gl::makeCurrent(context, display, surface);\r
}\r
-\r
- gl::Context *glGetCurrentContext()\r
- {\r
- return gl::getContext();\r
- }\r
}\r
; EGL dependencies
glCreateContext @144
glMakeCurrent @146
- glGetCurrentContext @147
glGetProcAddress @148
glBindTexImage @158