2 // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // main.h: Management of thread-local data.
9 #ifndef LIBGLESV2_MAIN_H_
10 #define LIBGLESV2_MAIN_H_
12 #include "common/debug.h"
14 #include <GLES2/gl2.h>
30 egl::Display *display;
33 void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface);
35 Context *getContext();
36 Context *getNonLostContext();
37 egl::Display *getDisplay();
39 void error(GLenum errorCode);
42 const T &error(GLenum errorCode, const T &returnValue)
58 // Exported functions for use by EGL
59 gl::Context *glCreateContext(int clientVersion, const gl::Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess);
60 void glDestroyContext(gl::Context *context);
61 void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface);
62 gl::Context *glGetCurrentContext();
63 rx::Renderer *glCreateRenderer(egl::Display *display, EGLNativeDisplayType nativeDisplay, EGLint requestedDisplayType);
64 void glDestroyRenderer(rx::Renderer *renderer);
66 __eglMustCastToProperFunctionPointerType __stdcall glGetProcAddress(const char *procname);
67 bool __stdcall glBindTexImage(egl::Surface *surface);
70 #endif // LIBGLESV2_MAIN_H_