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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 inline unsigned int GetAttribIndex(vertex_struct::Semantic semantic, | 235 inline unsigned int GetAttribIndex(vertex_struct::Semantic semantic, |
236 unsigned int semantic_index) { | 236 unsigned int semantic_index) { |
237 switch (semantic) { | 237 switch (semantic) { |
238 case vertex_struct::POSITION: | 238 case vertex_struct::POSITION: |
239 DCHECK_EQ(semantic_index, 0); | 239 DCHECK_EQ(semantic_index, 0); |
240 return 0; | 240 return 0; |
241 case vertex_struct::NORMAL: | 241 case vertex_struct::NORMAL: |
242 DCHECK_EQ(semantic_index, 0); | 242 DCHECK_EQ(semantic_index, 0); |
243 return 2; | 243 return 2; |
244 case vertex_struct::COLOR: | 244 case vertex_struct::COLOR: |
245 DCHECK_LT(semantic_index, 2); | 245 DCHECK_LT(semantic_index, 2U); |
246 return 3 + semantic_index; | 246 return 3 + semantic_index; |
247 case vertex_struct::TEX_COORD: | 247 case vertex_struct::TEX_COORD: |
248 DCHECK_LT(semantic_index, 8); | 248 DCHECK_LT(semantic_index, 8U); |
249 return 8 + semantic_index; | 249 return 8 + semantic_index; |
250 default: | 250 default: |
251 DLOG(FATAL) << "Not reached."; | 251 DLOG(FATAL) << "Not reached."; |
252 return 0; | 252 return 0; |
253 } | 253 } |
254 } | 254 } |
255 | 255 |
256 inline void ExtractSizeTypeNormalized(vertex_struct::Type type, | 256 inline void ExtractSizeTypeNormalized(vertex_struct::Type type, |
257 GLint *size, | 257 GLint *size, |
258 GLenum *gl_type, | 258 GLenum *gl_type, |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 return BufferSyncInterface::kParseInvalidArguments; | 544 return BufferSyncInterface::kParseInvalidArguments; |
545 } | 545 } |
546 glDrawRangeElements(gl_mode, min_index, max_index, count, index_type, | 546 glDrawRangeElements(gl_mode, min_index, max_index, count, index_type, |
547 OffsetToPtr(offset)); | 547 OffsetToPtr(offset)); |
548 CHECK_GL_ERROR(); | 548 CHECK_GL_ERROR(); |
549 return BufferSyncInterface::kParseNoError; | 549 return BufferSyncInterface::kParseNoError; |
550 } | 550 } |
551 | 551 |
552 } // namespace command_buffer | 552 } // namespace command_buffer |
553 } // namespace o3d | 553 } // namespace o3d |
OLD | NEW |