| 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 19 matching lines...) Expand all Loading... |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 | 32 |
| 33 // This file contains the RendererCB::StateManager class, managing states for | 33 // This file contains the RendererCB::StateManager class, managing states for |
| 34 // the command-buffer renderer. | 34 // the command-buffer renderer. |
| 35 | 35 |
| 36 #ifndef O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ | 36 #ifndef O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ |
| 37 #define O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ | 37 #define O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ |
| 38 | 38 |
| 39 #include "core/cross/command_buffer/renderer_cb.h" | 39 #include "core/cross/command_buffer/renderer_cb.h" |
| 40 #include "command_buffer/common/cross/cmd_buffer_format.h" | 40 #include "command_buffer/common/cross/o3d_cmd_format.h" |
| 41 #include "command_buffer/client/cross/cmd_buffer_helper.h" | 41 #include "command_buffer/client/cross/cmd_buffer_helper.h" |
| 42 | 42 |
| 43 namespace o3d { | 43 namespace o3d { |
| 44 | 44 |
| 45 // This class manages the states for the command-buffer renderer. It takes care | 45 // This class manages the states for the command-buffer renderer. It takes care |
| 46 // of the registration of the state handlers, as well as the sending of | 46 // of the registration of the state handlers, as well as the sending of |
| 47 // commands to commit modified states. | 47 // commands to commit modified states. |
| 48 class RendererCB::StateManager { | 48 class RendererCB::StateManager { |
| 49 public: | 49 public: |
| 50 StateManager() { } | 50 StateManager() { } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 80 return command_; | 80 return command_; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool *dirty_ptr() { return &dirty_; } | 83 bool *dirty_ptr() { return &dirty_; } |
| 84 private: | 84 private: |
| 85 bool dirty_; | 85 bool dirty_; |
| 86 CommandType command_; | 86 CommandType command_; |
| 87 DISALLOW_COPY_AND_ASSIGN(StateHelper); | 87 DISALLOW_COPY_AND_ASSIGN(StateHelper); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 StateHelper<command_buffer::cmd::SetPointLineRaster> point_line_helper_; | 90 StateHelper<command_buffer::o3d::SetPointLineRaster> point_line_helper_; |
| 91 StateHelper<command_buffer::cmd::SetPolygonOffset> poly_offset_helper_; | 91 StateHelper<command_buffer::o3d::SetPolygonOffset> poly_offset_helper_; |
| 92 StateHelper<command_buffer::cmd::SetPolygonRaster> poly_raster_helper_; | 92 StateHelper<command_buffer::o3d::SetPolygonRaster> poly_raster_helper_; |
| 93 StateHelper<command_buffer::cmd::SetAlphaTest> alpha_test_helper_; | 93 StateHelper<command_buffer::o3d::SetAlphaTest> alpha_test_helper_; |
| 94 StateHelper<command_buffer::cmd::SetDepthTest> depth_test_helper_; | 94 StateHelper<command_buffer::o3d::SetDepthTest> depth_test_helper_; |
| 95 StateHelper<command_buffer::cmd::SetStencilTest> stencil_test_helper_; | 95 StateHelper<command_buffer::o3d::SetStencilTest> stencil_test_helper_; |
| 96 StateHelper<command_buffer::cmd::SetColorWrite> color_write_helper_; | 96 StateHelper<command_buffer::o3d::SetColorWrite> color_write_helper_; |
| 97 StateHelper<command_buffer::cmd::SetBlending> blending_helper_; | 97 StateHelper<command_buffer::o3d::SetBlending> blending_helper_; |
| 98 StateHelper<command_buffer::cmd::SetBlendingColor> blending_color_helper_; | 98 StateHelper<command_buffer::o3d::SetBlendingColor> blending_color_helper_; |
| 99 DISALLOW_COPY_AND_ASSIGN(StateManager); | 99 DISALLOW_COPY_AND_ASSIGN(StateManager); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace o3d | 102 } // namespace o3d |
| 103 | 103 |
| 104 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ | 104 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_STATES_CB_H_ |
| OLD | NEW |