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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #include <map> | 36 #include <map> |
37 | 37 |
38 #include "base/cross/std_functional.h" | 38 #include "base/cross/std_functional.h" |
39 #include "command_buffer/service/cross/gl/effect_gl.h" | 39 #include "command_buffer/service/cross/gl/effect_gl.h" |
40 #include "command_buffer/service/cross/gl/gapi_gl.h" | 40 #include "command_buffer/service/cross/gl/gapi_gl.h" |
41 #include "command_buffer/service/cross/effect_utils.h" | 41 #include "command_buffer/service/cross/effect_utils.h" |
42 | 42 |
43 namespace o3d { | 43 namespace o3d { |
44 namespace command_buffer { | 44 namespace command_buffer { |
| 45 namespace o3d { |
45 | 46 |
46 EffectParamGL::EffectParamGL(effect_param::DataType data_type, | 47 EffectParamGL::EffectParamGL(effect_param::DataType data_type, |
47 EffectGL *effect, | 48 EffectGL *effect, |
48 unsigned int param_index) | 49 unsigned int param_index) |
49 : EffectParam(data_type), | 50 : EffectParam(data_type), |
50 effect_(effect), | 51 effect_(effect), |
51 low_level_param_index_(param_index) { | 52 low_level_param_index_(param_index) { |
52 DCHECK(effect_); | 53 DCHECK(effect_); |
53 effect_->LinkParam(this); | 54 effect_->LinkParam(this); |
54 } | 55 } |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 // Should only be called if the current effect is not valid. | 840 // Should only be called if the current effect is not valid. |
840 bool GAPIGL::ValidateEffect() { | 841 bool GAPIGL::ValidateEffect() { |
841 DCHECK(validate_effect_); | 842 DCHECK(validate_effect_); |
842 DCHECK(!current_effect_); | 843 DCHECK(!current_effect_); |
843 current_effect_ = effects_.Get(current_effect_id_); | 844 current_effect_ = effects_.Get(current_effect_id_); |
844 if (!current_effect_) return false; | 845 if (!current_effect_) return false; |
845 validate_effect_ = false; | 846 validate_effect_ = false; |
846 return current_effect_->Begin(this); | 847 return current_effect_->Begin(this); |
847 } | 848 } |
848 | 849 |
| 850 } // namespace o3d |
849 } // namespace command_buffer | 851 } // namespace command_buffer |
850 } // namespace o3d | 852 } // namespace o3d |
OLD | NEW |