aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-05 16:34:41 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-05 16:34:41 +0000
commit2fbc7fa460c99bffa78b9afb9aaa4dc0db68e1ba (patch)
tree0526346f894b7929425be61fdd6c47ad35221da5 /gpu/include
parent5a8a131d8a46424ae494041de2d748cdecea8ec9 (diff)
Make SampleApp build on Win32 (still requires glew, this needs to be fixed)
In fbo test funciton set min filter to nearest (for systems that don't support rendering to level of a texture that isn't mip map complete.) Add a lot more sample slides to the win32 build Fix texture red/blue color swap on windows. git-svn-id: http://skia.googlecode.com/svn/trunk@677 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include')
-rw-r--r--gpu/include/GrGLConfig.h11
-rw-r--r--gpu/include/GrUserConfig.h7
2 files changed, 12 insertions, 6 deletions
diff --git a/gpu/include/GrGLConfig.h b/gpu/include/GrGLConfig.h
index 7fab1b5189..b183892472 100644
--- a/gpu/include/GrGLConfig.h
+++ b/gpu/include/GrGLConfig.h
@@ -190,9 +190,14 @@
#error "unknown GR_TEXT_SCALAR type"
#endif
-// Pick a pixel config for 32bit bitmaps. Our default is GL_RGBA
-#ifndef SK_GL_32BPP_COLOR_FORMAT
- #define SK_GL_32BPP_COLOR_FORMAT GL_RGBA
+// Pick a pixel config for 32bit bitmaps. Our default is GL_RGBA (expect on
+// Windows where we match GDI's order).
+#ifndef GR_GL_32BPP_COLOR_FORMAT
+ #if GR_WIN32_BUILD
+ #define GR_GL_32BPP_COLOR_FORMAT GL_BGRA
+ #else
+ #define GR_GL_32BPP_COLOR_FORMAT GL_RGBA
+ #endif
#endif
////////////////////////////////////////////////////////////////////////////////
diff --git a/gpu/include/GrUserConfig.h b/gpu/include/GrUserConfig.h
index b0ea58c65d..860d2ccd40 100644
--- a/gpu/include/GrUserConfig.h
+++ b/gpu/include/GrUserConfig.h
@@ -31,10 +31,11 @@
//#define GR_FORCE_GLCHECKERR 1
/*
- * The default 32bit pixel config for texture upload is GL_RGBA. If your
- * bitmaps map to a different GL enum, specify that with this define.
+ * The default 32bit pixel config for texture upload is GL_RGBA on all
+ * platforms except on Windows where it is GL_BGRA. If your bitmaps map to a
+ * different GL enum, specify that with this define.
*/
-//#define SK_GL_32BPP_COLOR_FORMAT GL_RGBA
+//#define GR_GL_32BPP_COLOR_FORMAT GL_RGBA
/*
* To diagnose texture cache performance, define this to 1 if you want to see