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

Side by Side Diff: core/cross/gl/buffer_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 namespace { 50 namespace {
51 51
52 GLenum BufferAccessModeToGLenum(Buffer::AccessMode access_mode) { 52 GLenum BufferAccessModeToGLenum(Buffer::AccessMode access_mode) {
53 switch (access_mode) { 53 switch (access_mode) {
54 case Buffer::READ_ONLY: 54 case Buffer::READ_ONLY:
55 return GL_READ_ONLY_ARB; 55 return GL_READ_ONLY_ARB;
56 case Buffer::WRITE_ONLY: 56 case Buffer::WRITE_ONLY:
57 return GL_WRITE_ONLY_ARB; 57 return GL_WRITE_ONLY_ARB;
58 case Buffer::READ_WRITE: 58 case Buffer::READ_WRITE:
59 return GL_READ_WRITE_ARB; 59 return GL_READ_WRITE_ARB;
60 case Buffer::NONE:
61 break;
60 } 62 }
61 DCHECK(false); 63 DCHECK(false);
62 return GL_READ_WRITE_ARB; 64 return GL_READ_WRITE_ARB;
63 } 65 }
64 66
65 } // anonymous namespace 67 } // anonymous namespace
66 68
67 // Vertex Buffers -------------------------------------------------------------- 69 // Vertex Buffers --------------------------------------------------------------
68 70
69 // Initializes the O3D VertexBuffer object but does not allocate an 71 // Initializes the O3D VertexBuffer object but does not allocate an
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } else { 245 } else {
244 O3D_ERROR( 246 O3D_ERROR(
245 service_locator()) << "Unable to unlock a GL Element Array Buffer"; 247 service_locator()) << "Unable to unlock a GL Element Array Buffer";
246 } 248 }
247 return false; 249 return false;
248 } 250 }
249 CHECK_GL_ERROR(); 251 CHECK_GL_ERROR();
250 return true; 252 return true;
251 } 253 }
252 } // namespace o3d 254 } // namespace o3d
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698