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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "core/cross/command_buffer/texture_cb.h" | 49 #include "core/cross/command_buffer/texture_cb.h" |
50 #include "core/cross/command_buffer/display_window_cb.h" | 50 #include "core/cross/command_buffer/display_window_cb.h" |
51 #include "core/cross/renderer_platform.h" | 51 #include "core/cross/renderer_platform.h" |
52 #include "gpu_plugin/command_buffer.h" | 52 #include "gpu_plugin/command_buffer.h" |
53 #include "gpu_plugin/gpu_processor.h" | 53 #include "gpu_plugin/gpu_processor.h" |
54 #include "gpu_plugin/np_utils/np_browser.h" | 54 #include "gpu_plugin/np_utils/np_browser.h" |
55 #include "gpu_plugin/np_utils/np_utils.h" | 55 #include "gpu_plugin/np_utils/np_utils.h" |
56 #include "gpu_plugin/system_services/shared_memory.h" | 56 #include "gpu_plugin/system_services/shared_memory.h" |
57 | 57 |
58 namespace o3d { | 58 namespace o3d { |
59 using command_buffer::GAPIInterface; | 59 using command_buffer::o3d::GAPIInterface; |
60 using command_buffer::O3DCmdHelper; | 60 using command_buffer::O3DCmdHelper; |
61 using gpu_plugin::CommandBuffer; | 61 using gpu_plugin::CommandBuffer; |
62 using gpu_plugin::GPUProcessor; | 62 using gpu_plugin::GPUProcessor; |
63 using gpu_plugin::NPBrowser; | 63 using gpu_plugin::NPBrowser; |
64 using gpu_plugin::NPCreateObject; | 64 using gpu_plugin::NPCreateObject; |
65 using gpu_plugin::NPGetProperty; | 65 using gpu_plugin::NPGetProperty; |
66 using gpu_plugin::NPInvoke; | 66 using gpu_plugin::NPInvoke; |
67 using gpu_plugin::NPInvokeVoid; | 67 using gpu_plugin::NPInvokeVoid; |
68 using gpu_plugin::NPObjectPointer; | 68 using gpu_plugin::NPObjectPointer; |
69 using gpu_plugin::SharedMemory; | 69 using gpu_plugin::SharedMemory; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 return true; | 124 return true; |
125 } | 125 } |
126 | 126 |
127 // Adds the CLEAR command to the command buffer. | 127 // Adds the CLEAR command to the command buffer. |
128 void RendererCB::PlatformSpecificClear(const Float4 &color, | 128 void RendererCB::PlatformSpecificClear(const Float4 &color, |
129 bool color_flag, | 129 bool color_flag, |
130 float depth, | 130 float depth, |
131 bool depth_flag, | 131 bool depth_flag, |
132 int stencil, | 132 int stencil, |
133 bool stencil_flag) { | 133 bool stencil_flag) { |
134 uint32 buffers = (color_flag ? command_buffer::kColor : 0) | | 134 uint32 buffers = (color_flag ? command_buffer::o3d::kColor : 0) | |
135 (depth_flag ? command_buffer::kDepth : 0) | | 135 (depth_flag ? command_buffer::o3d::kDepth : 0) | |
136 (stencil_flag ? command_buffer::kStencil : 0); | 136 (stencil_flag ? command_buffer::o3d::kStencil : 0); |
137 helper_->Clear(buffers, color[0], color[1], color[2], color[3], | 137 helper_->Clear(buffers, color[0], color[1], color[2], color[3], |
138 depth, stencil); | 138 depth, stencil); |
139 } | 139 } |
140 | 140 |
141 void RendererCB::PlatformSpecificEndDraw() { | 141 void RendererCB::PlatformSpecificEndDraw() { |
142 } | 142 } |
143 | 143 |
144 // Adds the BeginFrame command to the command buffer. | 144 // Adds the BeginFrame command to the command buffer. |
145 bool RendererCB::PlatformSpecificStartRendering() { | 145 bool RendererCB::PlatformSpecificStartRendering() { |
146 // Any device issues are handled in the command buffer backend | 146 // Any device issues are handled in the command buffer backend |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 } | 445 } |
446 | 446 |
447 return shared_memory; | 447 return shared_memory; |
448 } | 448 } |
449 | 449 |
450 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { | 450 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { |
451 return RendererCBLocal::CreateDefault(service_locator); | 451 return RendererCBLocal::CreateDefault(service_locator); |
452 } | 452 } |
453 | 453 |
454 } // namespace o3d | 454 } // namespace o3d |
OLD | NEW |