diff options
author | 2011-03-14 21:23:01 +0000 | |
---|---|---|
committer | 2011-03-14 21:23:01 +0000 | |
commit | 59a190bcab5d4b2bf03f8f10cb6a581d19fed403 (patch) | |
tree | 86335475250c187f467aeff3bfb8d81084016c1f /gpu/src/GrGLIndexBuffer.cpp | |
parent | cd9d69b9ce7eb301a9fd8d91b9f95fd99b07bae5 (diff) |
Implementation of a GL-virtualization layer for Skia. This allows for
environments using skia to specify a GL implementation at run-time, instead of
relying on the linker to pull in the appropriate GL impl.
A new structure, GrGLInterface is exposed. This struct contains a set of
function pointers that should point to an appropriate GL implementation.
This change also removes the reliance on GLew on windows builds.
Review: http://codereview.appspot.com/4254059/
git-svn-id: http://skia.googlecode.com/svn/trunk@937 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGLIndexBuffer.cpp')
-rw-r--r-- | gpu/src/GrGLIndexBuffer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gpu/src/GrGLIndexBuffer.cpp b/gpu/src/GrGLIndexBuffer.cpp index 2dc4154209..9539c8a2a1 100644 --- a/gpu/src/GrGLIndexBuffer.cpp +++ b/gpu/src/GrGLIndexBuffer.cpp @@ -1,5 +1,5 @@ /* - Copyright 2010 Google Inc. + Copyright 2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,8 +57,7 @@ void* GrGLIndexBuffer::lock() { // Let driver know it can discard the old data GR_GL(BufferData(GL_ELEMENT_ARRAY_BUFFER, size(), NULL, dynamic() ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW)); - fLockPtr = GR_GLEXT(fGL->extensions(), - MapBuffer(GL_ELEMENT_ARRAY_BUFFER, GR_WRITE_ONLY)); + fLockPtr = GR_GL(MapBuffer(GL_ELEMENT_ARRAY_BUFFER, GR_WRITE_ONLY)); return fLockPtr; } @@ -75,7 +74,7 @@ void GrGLIndexBuffer::unlock() { GrAssert(fGL->supportsBufferLocking()); bind(); - GR_GLEXT(fGL->extensions(), UnmapBuffer(GL_ELEMENT_ARRAY_BUFFER)); + GR_GL(UnmapBuffer(GL_ELEMENT_ARRAY_BUFFER)); fLockPtr = NULL; } |