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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 void SamplerGL::SetStates(sampler::AddressingMode addressing_u, | 150 void SamplerGL::SetStates(sampler::AddressingMode addressing_u, |
151 sampler::AddressingMode addressing_v, | 151 sampler::AddressingMode addressing_v, |
152 sampler::AddressingMode addressing_w, | 152 sampler::AddressingMode addressing_w, |
153 sampler::FilteringMode mag_filter, | 153 sampler::FilteringMode mag_filter, |
154 sampler::FilteringMode min_filter, | 154 sampler::FilteringMode min_filter, |
155 sampler::FilteringMode mip_filter, | 155 sampler::FilteringMode mip_filter, |
156 unsigned int max_anisotropy) { | 156 unsigned int max_anisotropy) { |
157 // These are validated in GAPIDecoder.cc | 157 // These are validated in GAPIDecoder.cc |
158 DCHECK_NE(mag_filter, sampler::NONE); | 158 DCHECK_NE(mag_filter, sampler::NONE); |
159 DCHECK_NE(min_filter, sampler::NONE); | 159 DCHECK_NE(min_filter, sampler::NONE); |
160 DCHECK_GT(max_anisotropy, 0); | 160 DCHECK_GT(max_anisotropy, 0U); |
161 gl_wrap_s_ = GLAddressMode(addressing_u); | 161 gl_wrap_s_ = GLAddressMode(addressing_u); |
162 gl_wrap_t_ = GLAddressMode(addressing_v); | 162 gl_wrap_t_ = GLAddressMode(addressing_v); |
163 gl_wrap_r_ = GLAddressMode(addressing_w); | 163 gl_wrap_r_ = GLAddressMode(addressing_w); |
164 gl_mag_filter_ = GLMagFilter(mag_filter); | 164 gl_mag_filter_ = GLMagFilter(mag_filter); |
165 gl_min_filter_ = GLMinFilter(min_filter, mip_filter); | 165 gl_min_filter_ = GLMinFilter(min_filter, mip_filter); |
166 gl_max_anisotropy_ = max_anisotropy; | 166 gl_max_anisotropy_ = max_anisotropy; |
167 } | 167 } |
168 | 168 |
169 void SamplerGL::SetBorderColor(const RGBA &color) { | 169 void SamplerGL::SetBorderColor(const RGBA &color) { |
170 gl_border_color_[0] = color.red; | 170 gl_border_color_[0] = color.red; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 return BufferSyncInterface::kParseInvalidArguments; | 229 return BufferSyncInterface::kParseInvalidArguments; |
230 // Dirty effect, because this sampler id may be used. | 230 // Dirty effect, because this sampler id may be used. |
231 DirtyEffect(); | 231 DirtyEffect(); |
232 sampler->SetTexture(texture_id); | 232 sampler->SetTexture(texture_id); |
233 return BufferSyncInterface::kParseNoError; | 233 return BufferSyncInterface::kParseNoError; |
234 } | 234 } |
235 | 235 |
236 | 236 |
237 } // namespace command_buffer | 237 } // namespace command_buffer |
238 } // namespace o3d | 238 } // namespace o3d |
OLD | NEW |