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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 #include <build/build_config.h> | 35 #include <build/build_config.h> |
36 #include "command_buffer/service/cross/gl/gapi_gl.h" | 36 #include "command_buffer/service/cross/gl/gapi_gl.h" |
37 | 37 |
38 #ifdef OS_LINUX | 38 #ifdef OS_LINUX |
39 #include "command_buffer/service/linux/x_utils.h" | 39 #include "command_buffer/service/linux/x_utils.h" |
40 #endif // OS_LINUX | 40 #endif // OS_LINUX |
41 | 41 |
42 namespace o3d { | 42 namespace o3d { |
43 namespace command_buffer { | 43 namespace command_buffer { |
| 44 namespace o3d { |
44 | 45 |
45 GAPIGL::GAPIGL() | 46 GAPIGL::GAPIGL() |
46 #ifdef OS_LINUX | 47 #ifdef OS_LINUX |
47 : window_(NULL), | 48 : window_(NULL), |
48 #endif | 49 #endif |
49 : anti_aliased_(false), | 50 : anti_aliased_(false), |
50 cg_context_(NULL), | 51 cg_context_(NULL), |
51 current_vertex_struct_(kInvalidResource), | 52 current_vertex_struct_(kInvalidResource), |
52 validate_streams_(true), | 53 validate_streams_(true), |
53 max_vertices_(0), | 54 max_vertices_(0), |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 unsigned int stencil) { | 403 unsigned int stencil) { |
403 glClearColor(color.red, color.green, color.blue, color.alpha); | 404 glClearColor(color.red, color.green, color.blue, color.alpha); |
404 glClearDepth(depth); | 405 glClearDepth(depth); |
405 glClearStencil(stencil); | 406 glClearStencil(stencil); |
406 glClear((buffers & kColor ? GL_COLOR_BUFFER_BIT : 0) | | 407 glClear((buffers & kColor ? GL_COLOR_BUFFER_BIT : 0) | |
407 (buffers & kDepth ? GL_DEPTH_BUFFER_BIT : 0) | | 408 (buffers & kDepth ? GL_DEPTH_BUFFER_BIT : 0) | |
408 (buffers & kStencil ? GL_STENCIL_BUFFER_BIT : 0)); | 409 (buffers & kStencil ? GL_STENCIL_BUFFER_BIT : 0)); |
409 CHECK_GL_ERROR(); | 410 CHECK_GL_ERROR(); |
410 } | 411 } |
411 | 412 |
| 413 } // namespace o3d |
412 } // namespace command_buffer | 414 } // namespace command_buffer |
413 } // namespace o3d | 415 } // namespace o3d |
OLD | NEW |