| 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 friend class ParamCacheCB; | 50 friend class ParamCacheCB; |
| 51 typedef command_buffer::EffectHelper EffectHelper; | 51 typedef command_buffer::EffectHelper EffectHelper; |
| 52 | 52 |
| 53 EffectCB(ServiceLocator *service_locator, RendererCB *renderer); | 53 EffectCB(ServiceLocator *service_locator, RendererCB *renderer); |
| 54 virtual ~EffectCB(); | 54 virtual ~EffectCB(); |
| 55 | 55 |
| 56 // Loads the vertex and fragment shader programs from a string containing | 56 // Loads the vertex and fragment shader programs from a string containing |
| 57 // a DirectX FX description. | 57 // a DirectX FX description. |
| 58 virtual bool LoadFromFXString(const String& effect); | 58 virtual bool LoadFromFXString(const String& effect); |
| 59 | 59 |
| 60 // Gets the ResourceID of the effect. | 60 // Gets the ResourceId of the effect. |
| 61 command_buffer::ResourceID resource_id() { return resource_id_; } | 61 command_buffer::ResourceId resource_id() { return resource_id_; } |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 // Gets info about the parameters this effect needs. | 64 // Gets info about the parameters this effect needs. |
| 65 // Overriden from Effect. | 65 // Overriden from Effect. |
| 66 virtual void GetParameterInfo(EffectParameterInfoArray* info_array); | 66 virtual void GetParameterInfo(EffectParameterInfoArray* info_array); |
| 67 | 67 |
| 68 // Gets info about the varying parameters this effects vertex shader needs. | 68 // Gets info about the varying parameters this effects vertex shader needs. |
| 69 // Parameters: | 69 // Parameters: |
| 70 // info_array: EffectStreamInfoArray to receive info. | 70 // info_array: EffectStreamInfoArray to receive info. |
| 71 virtual void GetStreamInfo(EffectStreamInfoArray* info_array); | 71 virtual void GetStreamInfo(EffectStreamInfoArray* info_array); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 void Destroy(); | 74 void Destroy(); |
| 75 // The command buffer resource ID for the effect. | 75 // The command buffer resource ID for the effect. |
| 76 command_buffer::ResourceID resource_id_; | 76 command_buffer::ResourceId resource_id_; |
| 77 std::vector<EffectHelper::EffectParamDesc> param_descs_; | 77 std::vector<EffectHelper::EffectParamDesc> param_descs_; |
| 78 std::vector<EffectHelper::EffectStreamDesc> stream_descs_; | 78 std::vector<EffectHelper::EffectStreamDesc> stream_descs_; |
| 79 // A generation counter to dirty ParamCacheCBs. | 79 // A generation counter to dirty ParamCacheCBs. |
| 80 unsigned int generation_; | 80 unsigned int generation_; |
| 81 // The renderer that created this effect. | 81 // The renderer that created this effect. |
| 82 RendererCB *renderer_; | 82 RendererCB *renderer_; |
| 83 DISALLOW_IMPLICIT_CONSTRUCTORS(EffectCB); | 83 DISALLOW_IMPLICIT_CONSTRUCTORS(EffectCB); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace o3d | 86 } // namespace o3d |
| 87 | 87 |
| 88 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_EFFECT_CB_H_ | 88 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_EFFECT_CB_H_ |
| OLD | NEW |