| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file includes all the necessary GL headers and implements some useful | 5 // This file includes all the necessary GL headers and implements some useful |
| 6 // utilities. | 6 // utilities. |
| 7 | 7 |
| 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| 9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #define glRenderbufferStorageEXT glRenderbufferStorage | 47 #define glRenderbufferStorageEXT glRenderbufferStorage |
| 48 | 48 |
| 49 // Texture Objects | 49 // Texture Objects |
| 50 #define glGenerateMipmapEXT glGenerateMipmap | 50 #define glGenerateMipmapEXT glGenerateMipmap |
| 51 | 51 |
| 52 #else // !GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 | 52 #else // !GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 |
| 53 #include <GL/glew.h> // NOLINT | 53 #include <GL/glew.h> // NOLINT |
| 54 #include <GL/osmew.h> | 54 #include <GL/osmew.h> |
| 55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 56 #include <GL/wglew.h> // NOLINT | 56 #include <GL/wglew.h> // NOLINT |
| 57 #include <windows.h> // NOLINT | |
| 58 #elif defined(OS_LINUX) | 57 #elif defined(OS_LINUX) |
| 59 #include <GL/glxew.h> // NOLINT | 58 #include <GL/glxew.h> // NOLINT |
| 60 #include <GL/glx.h> // NOLINT | |
| 61 #elif defined(OS_MACOSX) | |
| 62 #include <OpenGL/OpenGL.h> // NOLINT | |
| 63 #endif // OS_WIN | 59 #endif // OS_WIN |
| 64 | 60 |
| 65 // GLES2 defines not part of Desktop GL | 61 // GLES2 defines not part of Desktop GL |
| 66 // Shader Precision-Specified Types | 62 // Shader Precision-Specified Types |
| 67 #define GL_LOW_FLOAT 0x8DF0 | 63 #define GL_LOW_FLOAT 0x8DF0 |
| 68 #define GL_MEDIUM_FLOAT 0x8DF1 | 64 #define GL_MEDIUM_FLOAT 0x8DF1 |
| 69 #define GL_HIGH_FLOAT 0x8DF2 | 65 #define GL_HIGH_FLOAT 0x8DF2 |
| 70 #define GL_LOW_INT 0x8DF3 | 66 #define GL_LOW_INT 0x8DF3 |
| 71 #define GL_MEDIUM_INT 0x8DF4 | 67 #define GL_MEDIUM_INT 0x8DF4 |
| 72 #define GL_HIGH_INT 0x8DF5 | 68 #define GL_HIGH_INT 0x8DF5 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 90 #ifdef GL_ERROR_DEBUGGING | 86 #ifdef GL_ERROR_DEBUGGING |
| 91 #define CHECK_GL_ERROR() do { \ | 87 #define CHECK_GL_ERROR() do { \ |
| 92 GLenum gl_error = glGetError(); \ | 88 GLenum gl_error = glGetError(); \ |
| 93 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 89 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
| 94 } while (0) | 90 } while (0) |
| 95 #else // GL_ERROR_DEBUGGING | 91 #else // GL_ERROR_DEBUGGING |
| 96 #define CHECK_GL_ERROR() void(0) | 92 #define CHECK_GL_ERROR() void(0) |
| 97 #endif // GL_ERROR_DEBUGGING | 93 #endif // GL_ERROR_DEBUGGING |
| 98 | 94 |
| 99 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 95 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| OLD | NEW |