aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_context.h')
-rw-r--r--mesalib/src/mesa/vbo/vbo_context.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_context.h b/mesalib/src/mesa/vbo/vbo_context.h
index 6099b56e6..a376efe34 100644
--- a/mesalib/src/mesa/vbo/vbo_context.h
+++ b/mesalib/src/mesa/vbo/vbo_context.h
@@ -146,6 +146,7 @@ vbo_attrtype_to_integer_flag(GLenum format)
{
switch (format) {
case GL_FLOAT:
+ case GL_DOUBLE:
return GL_FALSE;
case GL_INT:
case GL_UNSIGNED_INT:
@@ -156,6 +157,22 @@ vbo_attrtype_to_integer_flag(GLenum format)
}
}
+static inline GLboolean
+vbo_attrtype_to_double_flag(GLenum format)
+{
+ switch (format) {
+ case GL_FLOAT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ return GL_FALSE;
+ case GL_DOUBLE:
+ return GL_TRUE;
+ default:
+ assert(0);
+ return GL_FALSE;
+ }
+}
+
/**
* Return default component values for the given format.
* The return type is an array of fi_types, because that's how we declare