• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
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.
5 //
6 
7 // main.h: Management of thread-local data.
8 
9 #ifndef LIBGLESV2_MAIN_H_
10 #define LIBGLESV2_MAIN_H_
11 
12 #define GL_APICALL
13 #include <GLES2/gl2.h>
14 #include <GLES2/gl2ext.h>
15 
16 #include "common/debug.h"
17 #include "libEGL/Display.h"
18 
19 #include "libGLESv2/Context.h"
20 
21 namespace gl
22 {
23 struct Current
24 {
25     Context *context;
26     egl::Display *display;
27 };
28 
29 void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface);
30 
31 Context *getContext();
32 egl::Display *getDisplay();
33 
34 IDirect3DDevice9 *getDevice();
35 }
36 
37 void error(GLenum errorCode);
38 
39 template<class T>
error(GLenum errorCode,const T & returnValue)40 const T &error(GLenum errorCode, const T &returnValue)
41 {
42     error(errorCode);
43 
44     return returnValue;
45 }
46 
47 #endif   // LIBGLESV2_MAIN_H_
48