| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // This file implements the OpenGL versions of the render surface resources, | 33 // This file implements the OpenGL versions of the render surface resources, |
| 34 // as well as the related GAPIGL function implementations. | 34 // as well as the related GAPIGL function implementations. |
| 35 | 35 |
| 36 #include "command_buffer/service/cross/gl/gapi_gl.h" | 36 #include "command_buffer/service/cross/gl/gapi_gl.h" |
| 37 #include "command_buffer/service/cross/gl/render_surface_gl.h" | 37 #include "command_buffer/service/cross/gl/render_surface_gl.h" |
| 38 | 38 |
| 39 | 39 |
| 40 namespace o3d { | 40 namespace o3d { |
| 41 namespace command_buffer { | 41 namespace command_buffer { |
| 42 namespace o3d { |
| 42 | 43 |
| 43 RenderSurfaceGL::RenderSurfaceGL(int width, | 44 RenderSurfaceGL::RenderSurfaceGL(int width, |
| 44 int height, | 45 int height, |
| 45 int mip_level, | 46 int mip_level, |
| 46 int side, | 47 int side, |
| 47 TextureGL *texture) | 48 TextureGL *texture) |
| 48 : width_(width), height_(height), mip_level_(mip_level), texture_(texture) { | 49 : width_(width), height_(height), mip_level_(mip_level), texture_(texture) { |
| 49 } | 50 } |
| 50 | 51 |
| 51 RenderSurfaceGL* RenderSurfaceGL::Create(int width, | 52 RenderSurfaceGL* RenderSurfaceGL::Create(int width, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 current_depth_surface_id_ = depth_stencil_id; | 250 current_depth_surface_id_ = depth_stencil_id; |
| 250 return parse_error::kParseNoError; | 251 return parse_error::kParseNoError; |
| 251 } | 252 } |
| 252 | 253 |
| 253 void GAPIGL::SetBackSurfaces() { | 254 void GAPIGL::SetBackSurfaces() { |
| 254 // Bind the default context, and restore the default front-face winding. | 255 // Bind the default context, and restore the default front-face winding. |
| 255 ::glBindFramebufferEXT(GL_FRAMEBUFFER, 0); | 256 ::glBindFramebufferEXT(GL_FRAMEBUFFER, 0); |
| 256 glFrontFace(GL_CCW); | 257 glFrontFace(GL_CCW); |
| 257 } | 258 } |
| 258 | 259 |
| 260 } // namespace o3d |
| 259 } // namespace command_buffer | 261 } // namespace command_buffer |
| 260 } // namespace o3d | 262 } // namespace o3d |
| 261 | 263 |
| OLD | NEW |