OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 36 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
37 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 37 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
38 | 38 |
39 #include <GL/glew.h> | 39 #include <GL/glew.h> |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 #include <GL/wglew.h> | 41 #include <GL/wglew.h> |
42 #endif | 42 #endif |
43 #include <build/build_config.h> | 43 #include <build/build_config.h> |
44 | 44 |
45 #define GL_GLEXT_PROTOTYPES | 45 #define GL_GLEXT_PROTOTYPES 1 |
46 | 46 |
47 // Define this for extra GL error debugging (slower). | 47 // Define this for extra GL error debugging (slower). |
48 // #define GL_ERROR_DEBUGGING | 48 // #define GL_ERROR_DEBUGGING |
49 #ifdef GL_ERROR_DEBUGGING | 49 #ifdef GL_ERROR_DEBUGGING |
50 #define CHECK_GL_ERROR() do { \ | 50 #define CHECK_GL_ERROR() do { \ |
51 GLenum gl_error = glGetError(); \ | 51 GLenum gl_error = glGetError(); \ |
52 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 52 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
53 } while (0) | 53 } while (0) |
54 #else // GL_ERROR_DEBUGGING | 54 #else // GL_ERROR_DEBUGGING |
55 #define CHECK_GL_ERROR() void(0) | 55 #define CHECK_GL_ERROR() void(0) |
56 #endif // GL_ERROR_DEBUGGING | 56 #endif // GL_ERROR_DEBUGGING |
57 | 57 |
58 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 58 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |