Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 549201: Implements glGetVertexAttribPointerv (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_format.h
===================================================================
--- gpu/command_buffer/common/gles2_cmd_format.h (revision 37435)
+++ gpu/command_buffer/common/gles2_cmd_format.h (working copy)
@@ -32,6 +32,18 @@
#pragma pack(push, 1)
+// Used for some glGetXXX commands that return a result through a pointer. We
+// need to know if the command succeeded or not and the size of the result. If
+// the command failed its result size will 0.
+struct SizedResult {
+ template <typename T>
+ T GetDataAs() {
+ return static_cast<T>(static_cast<void*>(&data));
+ }
+ uint32 size; // in bytes.
+ int32 data; // this is just here to get an offset.
+};
+
#include "gpu/command_buffer/common/gles2_cmd_format_autogen.h"
// These are hand written commands.
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_gen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698