| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 // Creates an effect parameter of the specified name. | 110 // Creates an effect parameter of the specified name. |
| 111 EffectParamGL *CreateParamByName(const char *name); | 111 EffectParamGL *CreateParamByName(const char *name); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 struct LowLevelParam { | 114 struct LowLevelParam { |
| 115 const char *name; | 115 const char *name; |
| 116 CGparameter vp_param; | 116 CGparameter vp_param; |
| 117 CGparameter fp_param; | 117 CGparameter fp_param; |
| 118 int num_elements; | 118 int num_elements; |
| 119 std::vector<ResourceID> sampler_ids; | 119 std::vector<ResourceId> sampler_ids; |
| 120 }; | 120 }; |
| 121 typedef std::vector<LowLevelParam> LowLevelParamList; | 121 typedef std::vector<LowLevelParam> LowLevelParamList; |
| 122 typedef std::vector<EffectParamGL *> ParamList; | 122 typedef std::vector<EffectParamGL *> ParamList; |
| 123 typedef std::vector<effect_stream::Desc> StreamList; | 123 typedef std::vector<effect_stream::Desc> StreamList; |
| 124 | 124 |
| 125 static CGparameter GetEitherCgParameter( | 125 static CGparameter GetEitherCgParameter( |
| 126 const LowLevelParam &low_level_param) { | 126 const LowLevelParam &low_level_param) { |
| 127 return low_level_param.vp_param ? | 127 return low_level_param.vp_param ? |
| 128 low_level_param.vp_param : low_level_param.fp_param; | 128 low_level_param.vp_param : low_level_param.fp_param; |
| 129 } | 129 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 156 | 156 |
| 157 friend class EffectParamGL; | 157 friend class EffectParamGL; |
| 158 DISALLOW_COPY_AND_ASSIGN(EffectGL); | 158 DISALLOW_COPY_AND_ASSIGN(EffectGL); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 | 161 |
| 162 } // namespace command_buffer | 162 } // namespace command_buffer |
| 163 } // namespace o3d | 163 } // namespace o3d |
| 164 | 164 |
| 165 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GL_EFFECT_GL_H_ | 165 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GL_EFFECT_GL_H_ |
| OLD | NEW |