| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // A semi-generic header file that can be used to isolate platform differences | |
| 6 // for OpenGL headers. | |
| 7 #ifndef EMBEDDERS_OPENGLUI_COMMON_OPENGL_H_ | |
| 8 #define EMBEDDERS_OPENGLUI_COMMON_OPENGL_H_ | |
| 9 | |
| 10 #if defined(__APPLE__) | |
| 11 # ifdef GL_ES_VERSION_2_0 | |
| 12 # include <OpenGLES/ES2/gl.h> | |
| 13 # else | |
| 14 # include <Glut/glut.h> | |
| 15 # include <OpenGL/gl.h> | |
| 16 # endif | |
| 17 # define GLSwapBuffers() glutSwapBuffers() | |
| 18 #elif defined(_WIN32) || defined(_WIN64) | |
| 19 # include <GL/glew.h> | |
| 20 # include <GL/wglew.h> | |
| 21 # include <GLUT/glut.h> | |
| 22 # include <Windows.h> | |
| 23 # define GLSwapBuffers() glutSwapBuffers() | |
| 24 #elif defined(__ANDROID__) | |
| 25 # include <EGL/egl.h> | |
| 26 # include <GLES2/gl2.h> | |
| 27 # include <GLES2/gl2ext.h> | |
| 28 # define GLSwapBuffers() \ | |
| 29 do {\ | |
| 30 EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); \ | |
| 31 EGLSurface surface = eglGetCurrentSurface(EGL_DRAW); \ | |
| 32 eglSwapBuffers(display, surface); \ | |
| 33 } while (0); | |
| 34 #else // Linux. | |
| 35 # define GL_GLEXT_PROTOTYPES 1 | |
| 36 # include <GL/gl.h> | |
| 37 # include <GL/glext.h> | |
| 38 # include <GL/glut.h> | |
| 39 # define GLSwapBuffers() glutSwapBuffers() | |
| 40 #endif | |
| 41 | |
| 42 #include "core/SkCanvas.h" | |
| 43 #include "core/SkGraphics.h" | |
| 44 #include "core/SkPaint.h" | |
| 45 #include "core/SkTypeface.h" | |
| 46 #include "effects/SkBlurDrawLooper.h" | |
| 47 #include "effects/SkDashPathEffect.h" | |
| 48 #include "effects/SkGradientShader.h" | |
| 49 #include "gpu/SkGpuDevice.h" | |
| 50 #include "gpu/GrContext.h" | |
| 51 #include "gpu/GrRenderTarget.h" | |
| 52 #include "gpu/gl/GrGLInterface.h" | |
| 53 #include "gpu/gl/SkNativeGLContext.h" | |
| 54 #include "images/SkImageDecoder.h" | |
| 55 | |
| 56 #endif // EMBEDDERS_OPENGLUI_COMMON_OPENGL_H_ | |
| 57 | |
| OLD | NEW |