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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 O3DCmdHelper( | 50 O3DCmdHelper( |
51 NPP npp, | 51 NPP npp, |
52 const gpu_plugin::NPObjectPointer<NPObject>& command_buffer) | 52 const gpu_plugin::NPObjectPointer<NPObject>& command_buffer) |
53 : CommandBufferHelper(npp, command_buffer) { | 53 : CommandBufferHelper(npp, command_buffer) { |
54 } | 54 } |
55 virtual ~O3DCmdHelper() { | 55 virtual ~O3DCmdHelper() { |
56 } | 56 } |
57 | 57 |
58 // ------------------ Individual commands ---------------------- | 58 // ------------------ Individual commands ---------------------- |
59 | 59 |
60 void Noop(uint32 skip_count) { | |
61 o3d::Noop& cmd = GetImmediateCmdSpace<o3d::Noop>( | |
62 skip_count * sizeof(CommandBufferEntry)); | |
63 cmd.Init(skip_count); | |
64 } | |
65 | |
66 void SetToken(uint32 token) { | |
67 o3d::SetToken& cmd = GetCmdSpace<o3d::SetToken>(); | |
68 cmd.Init(token); | |
69 } | |
70 | |
71 void BeginFrame() { | 60 void BeginFrame() { |
72 o3d::BeginFrame& cmd = GetCmdSpace<o3d::BeginFrame>(); | 61 o3d::BeginFrame& cmd = GetCmdSpace<o3d::BeginFrame>(); |
73 cmd.Init(); | 62 cmd.Init(); |
74 } | 63 } |
75 | 64 |
76 | 65 |
77 void EndFrame() { | 66 void EndFrame() { |
78 o3d::EndFrame& cmd = GetCmdSpace<o3d::EndFrame>(); | 67 o3d::EndFrame& cmd = GetCmdSpace<o3d::EndFrame>(); |
79 cmd.Init(); | 68 cmd.Init(); |
80 } | 69 } |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 o3d::SetBackSurfaces& cmd = GetCmdSpace<o3d::SetBackSurfaces>(); | 628 o3d::SetBackSurfaces& cmd = GetCmdSpace<o3d::SetBackSurfaces>(); |
640 cmd.Init(); | 629 cmd.Init(); |
641 } | 630 } |
642 }; | 631 }; |
643 | 632 |
644 } // namespace command_buffer | 633 } // namespace command_buffer |
645 } // namespace o3d | 634 } // namespace o3d |
646 | 635 |
647 #endif // O3D_COMMAND_BUFFER_CLIENT_CROSS_O3D_CMD_HELPER_H_ | 636 #endif // O3D_COMMAND_BUFFER_CLIENT_CROSS_O3D_CMD_HELPER_H_ |
648 | 637 |
OLD | NEW |