2 // Copyright (c) 2002-2010 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.
10 #define LIBEGL_MAIN_H_
13 #include <EGL/eglext.h>
22 EGLSurface drawSurface;
23 EGLSurface readSurface;
26 void setCurrentError(EGLint error);
27 EGLint getCurrentError();
29 void setCurrentAPI(EGLenum API);
30 EGLenum getCurrentAPI();
32 void setCurrentDisplay(EGLDisplay dpy);
33 EGLDisplay getCurrentDisplay();
35 void setCurrentDrawSurface(EGLSurface surface);
36 EGLSurface getCurrentDrawSurface();
38 void setCurrentReadSurface(EGLSurface surface);
39 EGLSurface getCurrentReadSurface();
41 void error(EGLint errorCode);
44 const T &error(EGLint errorCode, const T &returnValue)
52 const T &success(const T &returnValue)
54 egl::setCurrentError(EGL_SUCCESS);
61 #endif // LIBEGL_MAIN_H_