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
diff --git a/gpu/src/GrGLVertexBuffer.cpp b/gpu/src/GrGLVertexBuffer.cpp
index ec48936..69913bf 100644
--- a/gpu/src/GrGLVertexBuffer.cpp
+++ b/gpu/src/GrGLVertexBuffer.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 @@
// Let driver know it can discard the old data
GR_GL(BufferData(GL_ARRAY_BUFFER, size(), NULL,
dynamic() ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW));
- fLockPtr = GR_GLEXT(fGL->extensions(),
- MapBuffer(GL_ARRAY_BUFFER, GR_WRITE_ONLY));
+ fLockPtr = GR_GL(MapBuffer(GL_ARRAY_BUFFER, GR_WRITE_ONLY));
return fLockPtr;
}
return NULL;
@@ -74,7 +73,7 @@
GrAssert(fGL->supportsBufferLocking());
bind();
- GR_GLEXT(fGL->extensions(), UnmapBuffer(GL_ARRAY_BUFFER));
+ GR_GL(UnmapBuffer(GL_ARRAY_BUFFER));
fLockPtr = NULL;
}