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

Side by Side Diff: gpu/command_buffer/service/gl_utils.h

Issue 557087: Fixed compile error for unit-tests on linux. We do not include any glew file ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include <build/build_config.h>
12
11 #if defined(UNIT_TEST) 13 #if defined(UNIT_TEST)
12 #include "gpu/command_buffer/service/gl_mock.h" 14 #include "gpu/command_buffer/service/gl_mock.h"
13 #else 15 #else
14 #include <GL/glew.h> 16 #include <GL/glew.h>
15 #if defined(OS_WIN) 17 #if defined(OS_WIN)
16 #include <GL/wglew.h> 18 #include <GL/wglew.h>
17 #endif 19 #elif defined(OS_LINUX)
18 #include <build/build_config.h> 20 #include <GL/glxew.h>
19 #endif 21 #endif // OS_WIN
22 #endif // UNIT_TEST
20 23
21 #define GL_GLEXT_PROTOTYPES 1 24 #define GL_GLEXT_PROTOTYPES 1
22 25
23 // Define this for extra GL error debugging (slower). 26 // Define this for extra GL error debugging (slower).
24 // #define GL_ERROR_DEBUGGING 27 // #define GL_ERROR_DEBUGGING
25 #ifdef GL_ERROR_DEBUGGING 28 #ifdef GL_ERROR_DEBUGGING
26 #define CHECK_GL_ERROR() do { \ 29 #define CHECK_GL_ERROR() do { \
27 GLenum gl_error = glGetError(); \ 30 GLenum gl_error = glGetError(); \
28 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ 31 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \
29 } while (0) 32 } while (0)
30 #else // GL_ERROR_DEBUGGING 33 #else // GL_ERROR_DEBUGGING
31 #define CHECK_GL_ERROR() void(0) 34 #define CHECK_GL_ERROR() void(0)
32 #endif // GL_ERROR_DEBUGGING 35 #endif // GL_ERROR_DEBUGGING
33 36
34 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ 37 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698