| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "command_buffer/common/cross/gapi_interface.h" | 42 #include "command_buffer/common/cross/gapi_interface.h" |
| 43 #include "command_buffer/client/cross/o3d_cmd_helper.h" | 43 #include "command_buffer/client/cross/o3d_cmd_helper.h" |
| 44 | 44 |
| 45 // TODO: add unit tests. | 45 // TODO: add unit tests. |
| 46 | 46 |
| 47 namespace o3d { | 47 namespace o3d { |
| 48 | 48 |
| 49 using command_buffer::ResourceId; | 49 using command_buffer::ResourceId; |
| 50 using command_buffer::O3DCmdHelper; | 50 using command_buffer::O3DCmdHelper; |
| 51 using command_buffer::CommandBufferEntry; | 51 using command_buffer::CommandBufferEntry; |
| 52 using command_buffer::GAPIInterface; | 52 using command_buffer::o3d::GAPIInterface; |
| 53 using command_buffer::kInvalidResource; | 53 using command_buffer::kInvalidResource; |
| 54 namespace vertex_struct = command_buffer::vertex_struct; | 54 namespace vertex_struct = command_buffer::vertex_struct; |
| 55 | 55 |
| 56 StreamBankCB::StreamBankCB(ServiceLocator* service_locator, | 56 StreamBankCB::StreamBankCB(ServiceLocator* service_locator, |
| 57 RendererCB *renderer) | 57 RendererCB *renderer) |
| 58 : StreamBank(service_locator), | 58 : StreamBank(service_locator), |
| 59 renderer_(renderer), | 59 renderer_(renderer), |
| 60 vertex_struct_id_(kInvalidResource) { | 60 vertex_struct_id_(kInvalidResource) { |
| 61 } | 61 } |
| 62 | 62 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 void StreamBankCB::BindStreamsForRendering() { | 191 void StreamBankCB::BindStreamsForRendering() { |
| 192 if (vertex_struct_id_ == kInvalidResource) | 192 if (vertex_struct_id_ == kInvalidResource) |
| 193 CreateVertexStruct(); | 193 CreateVertexStruct(); |
| 194 O3DCmdHelper* helper = renderer_->helper(); | 194 O3DCmdHelper* helper = renderer_->helper(); |
| 195 helper->SetVertexStruct(vertex_struct_id_); | 195 helper->SetVertexStruct(vertex_struct_id_); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace o3d | 198 } // namespace o3d |
| OLD | NEW |