gfx/angle/src/libGLESv2/main.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 //
     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.
     5 //
     7 // main.h: Management of thread-local data.
     9 #ifndef LIBGLESV2_MAIN_H_
    10 #define LIBGLESV2_MAIN_H_
    12 #include "common/debug.h"
    13 #include "common/system.h"
    15 namespace egl
    16 {
    17 class Display;
    18 class Surface;
    19 }
    21 namespace gl
    22 {
    23 class Context;
    25 struct Current
    26 {
    27     Context *context;
    28     egl::Display *display;
    29 };
    31 void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface);
    33 Context *getContext();
    34 Context *getNonLostContext();
    35 egl::Display *getDisplay();
    37 void error(GLenum errorCode);
    39 template<class T>
    40 const T &error(GLenum errorCode, const T &returnValue)
    41 {
    42     error(errorCode);
    44     return returnValue;
    45 }
    47 }
    49 namespace rx
    50 {
    51 class Renderer;
    52 }
    54 extern "C"
    55 {
    56 // Exported functions for use by EGL
    57 gl::Context *glCreateContext(const gl::Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess);
    58 void glDestroyContext(gl::Context *context);
    59 void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface);
    60 gl::Context *glGetCurrentContext();
    61 rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayType displayId);
    62 void glDestroyRenderer(rx::Renderer *renderer);
    64 __eglMustCastToProperFunctionPointerType __stdcall glGetProcAddress(const char *procname);
    65 bool __stdcall glBindTexImage(egl::Surface *surface);
    66 }
    68 #endif   // LIBGLESV2_MAIN_H_

mercurial