Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: core/cross/gl/utils_gl.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 // Given a vertex attribute stream, convert it to a Stream::Semantic number 188 // Given a vertex attribute stream, convert it to a Stream::Semantic number
189 // and index. This is an imprecise operation. 189 // and index. This is an imprecise operation.
190 Stream::Semantic GLVertexAttributeToStream(const unsigned int attr, 190 Stream::Semantic GLVertexAttributeToStream(const unsigned int attr,
191 int *index) { 191 int *index) {
192 // kMaxAttrIndex is available from: 192 // kMaxAttrIndex is available from:
193 // glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs); 193 // glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);
194 // 194 //
195 // TODO: make this a runtime provided value discovered during 195 // TODO: make this a runtime provided value discovered during
196 // Renderer creation. 196 // Renderer creation.
197 const int kMaxAttrIndex = 15; 197 const unsigned int kMaxAttrIndex = 15u;
198 if (attr > kMaxAttrIndex) { 198 if (attr > kMaxAttrIndex) {
199 //TODO: Figure out how to get errors out of here to the client. 199 //TODO: Figure out how to get errors out of here to the client.
200 DLOG(ERROR) << "Invalid vertex attribute index."; 200 DLOG(ERROR) << "Invalid vertex attribute index.";
201 *index = 0; 201 *index = 0;
202 return Stream::UNKNOWN_SEMANTIC; 202 return Stream::UNKNOWN_SEMANTIC;
203 } 203 }
204 *index = attr_map_vp_40[attr].index; 204 *index = attr_map_vp_40[attr].index;
205 return attr_map_vp_40[attr].semantic; 205 return attr_map_vp_40[attr].semantic;
206 } 206 }
207 207
(...skipping 11 matching lines...) Expand all
219 DLOG(ERROR) << logmessage << ": " << error_string; 219 DLOG(ERROR) << logmessage << ": " << error_string;
220 if (error == CG_COMPILER_ERROR) { 220 if (error == CG_COMPILER_ERROR) {
221 DLOG(ERROR) << "Compiler message:\n" << cgGetLastListing(cg_context); 221 DLOG(ERROR) << "Compiler message:\n" << cgGetLastListing(cg_context);
222 } 222 }
223 } 223 }
224 } 224 }
225 225
226 #endif 226 #endif
227 227
228 } // namespace o3d 228 } // namespace o3d
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698