Remove dependence on platform GL headers. Remove code that attempts to infer GL function pointers on various platforms. Instead add platform-specific implementations for Windows and Mac. (GLX coming)
Review URL: http://codereview.appspot.com/4354048/
git-svn-id: http://skia.googlecode.com/svn/trunk@1045 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLUtil.cpp b/gpu/src/GrGLUtil.cpp
index 8b68845..5234453 100644
--- a/gpu/src/GrGLUtil.cpp
+++ b/gpu/src/GrGLUtil.cpp
@@ -15,6 +15,11 @@
*/
#include "GrGLConfig.h"
+#include "GrGLInterface.h"
+
+void GrGLClearErr() {
+ while (GR_GL_NO_ERROR != GrGLGetGLInterface()->fGetError()) {}
+}
void GrGLCheckErr(const char* location, const char* call) {
uint32_t err = GrGLGetGLInterface()->fGetError();
@@ -30,6 +35,12 @@
}
}
+void GrGLRestoreResetRowLength() {
+ if (GR_GL_SUPPORT_DESKTOP) {
+ GR_GL(PixelStorei(GR_GL_UNPACK_ROW_LENGTH, 0));
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
bool gLogCallsGL = !!(GR_GL_LOG_CALLS_START);