Index: gpu/command_buffer/service/context_state.h |
diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h |
index 32bef4cea3ec3f9099eb087b40090f22f2ec41bb..a4a8eda250d4e105f46e9ca7ed1e716a2d12d654 100644 |
--- a/gpu/command_buffer/service/context_state.h |
+++ b/gpu/command_buffer/service/context_state.h |
@@ -102,13 +102,23 @@ struct GPU_EXPORT TextureUnit { |
}; |
struct Vec4 { |
+ enum DataType { |
+ kFloat, |
+ kInt, |
+ kUInt, |
+ }; |
+ |
Vec4() { |
v[0] = 0.0f; |
v[1] = 0.0f; |
v[2] = 0.0f; |
v[3] = 1.0f; |
+ type = kFloat; |
} |
+ // Use double type here so when storing data of type GLfloat, GLint, |
+ // or GLuint, there will be no data loss. |
piman
2015/05/13 01:47:45
Or you could use a union.
Zhenyao Mo
2015/05/13 16:52:25
Done.
|
float v[4]; |
+ DataType type; |
}; |
struct GPU_EXPORT ContextState { |