Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1697)

Unified Diff: app/gfx/gl/gl_bindings.h

Issue 2134006: Added EGL based GLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/gfx/gl/generate_bindings.py ('k') | app/gfx/gl/gl_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_bindings.h
===================================================================
--- app/gfx/gl/gl_bindings.h (revision 0)
+++ app/gfx/gl/gl_bindings.h (revision 0)
@@ -0,0 +1,77 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Includes the platform independent and platform dependent GL headers.
+// Only include this in cc files. It pulls in system headers, including
+// the X11 headers on linux, which define all kinds of macros that are
+// liable to cause conflicts.
+
+#ifndef APP_GFX_GL_GL_BINDINGS_H_
+#define APP_GFX_GL_GL_BINDINGS_H_
+
+#include <GL/gl.h>
+#include <GL/glext.h>
+
+#include "build/build_config.h"
+
+// The standard OpenGL native extension headers are also included.
+#if defined(OS_WIN)
+#include <GL/wglext.h>
+#elif defined(OS_LINUX)
+#include <GL/glx.h>
+#include <GL/glxext.h>
+
+// Undefine some macros defined by X headers. This is why this file should only
+// be included in .cc files.
+#undef Bool
+#undef None
+#undef Status
+
+#elif defined(OS_MACOSX)
+#include <OpenGL/OpenGL.h>
+#endif
+
+#if defined(OS_WIN)
+#define GL_BINDING_CALL WINAPI
+#else
+#define GL_BINDING_CALL
+#endif
+
+// Forward declare OSMesa types.
+typedef struct osmesa_context *OSMesaContext;
+typedef void (*OSMESAproc)();
+
+#if defined(OS_WIN)
+
+// Forward declare EGL types.
+typedef unsigned int EGLBoolean;
+typedef unsigned int EGLenum;
+typedef int EGLint;
+typedef void *EGLConfig;
+typedef void *EGLContext;
+typedef void *EGLDisplay;
+typedef void *EGLSurface;
+typedef void *EGLClientBuffer;
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+
+#endif // OS_WIN
+
+#include "gl_bindings_autogen_gl.h"
+#include "gl_bindings_autogen_osmesa.h"
+
+#if defined(OS_WIN)
+#include "gl_bindings_autogen_egl.h"
+#include "gl_bindings_autogen_wgl.h"
+#elif defined(OS_LINUX)
+#include "gl_bindings_autogen_glx.h"
+#endif
+
+namespace gfx {
+
+// Find an entry point to the mock GL implementation.
+void* GL_BINDING_CALL GetMockGLProcAddress(const char* name);
+
+} // namespace gfx
+
+#endif // APP_GFX_GL_GL_BINDINGS_H_
Property changes on: app\gfx\gl\gl_bindings.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « app/gfx/gl/generate_bindings.py ('k') | app/gfx/gl/gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698