3 //! The public interface for 3D graphics is based on a command buffer.
5 //! This was chosen because it provides an easy way to separate the process of
6 //! writing commands from the process of reading those commands without
7 //! requiring too much overhead to keep the two processes in sync.
9 //! You can use this info to write commands yourself. Most developers will use
10 //! the provided OpenGL ES 2.0 implementation that issues these commands for
13 //! Each command starts with a header. The header is 32 bits, where the first 21
14 //! bits define the number of 32 bit entries, including the header, the command
15 //! represents. The last 11 bits specify the command.
17 //! Commands that send a variable amount of data have 1 to 3 ways to send that
20 //! Many commands can send their data in shared memory. The command will take
21 //! an id of the shared memory and an offset into that shared memory of where
22 //! the data lives. Commands are executed asynchronously, so the client
23 //! program must be careful to leave the data available until the command has
26 //! Some commands have an 'immediate' version where the data appears directly
27 //! after the command in memory.
29 //! A 3rd way of passing data is through Buckets. Buckets are identified by
30 //! number. You create a bucket with the command SetBucketSize, you can then
31 //! fill the bucket with SetBucketData commands. Once you've sent all your
32 //! data you can then issue a command that uses the bucket and takes a bucket
33 //! id for which bucket to use.
35 //! Receiving data works similarly. Some commands return their data to shared
36 //! memory. Other commands return their data through buckets which can then be
37 //! queried with the GetBucketSize and GetBucketData commands. In either case
38 //! the data will not be available until the command executes.
40 //! All commands and arguments are validated. If a command fails validation the
41 //! service will stop processing commands. It is the responsibility of the
42 //! client to never issue an invalid command.
44 //! Examples of invalid commands.
45 //! - A command's size does not match the command.
46 //! - A command's size would address memory outside the command buffer
47 //! - A shared memory id is invalid
48 //! - A shared memory offset is out of range for the given shared memory
49 //! - The size of the data a command would access in shared memory is out of
50 //! range for the given shared memory buffer.
51 //! - A result (in the transfer buffer) is not initialized to the
52 //! failure case. For example, any command that returns a SizedResult
53 //! will take a shared memory id and offset to where to store the result.
54 //! That size field of the result must be set to 0 before issuing the
55 //! the command. That way, if the command buffer service fails the
56 //! client will see a 0 size.
58 //! The docs are a little terse. For any command that corresponds to an OpenGL
59 //! ES 2.0 function the arguments should be clear by looking at the OpenGL ES
60 //! 2.0 documentation with minor caveats.
62 //! - Client side arrays are not supported at the command buffer level
63 //! so DrawArrays and VertexAttribPointer only take offsets into buffers.
64 //! - The commands GenBuffers, GetTextures, CreateProgram, CreateShader, etc
65 //! take client side ids and register them with the service. It's up to the
66 //! client to make up the ids.
67 //! - For shared resources, it's still up to the client to make up ids.
68 //! but to help keep them in sync with other threads the commands
69 //! GenSharedIds, RegisterSharedIds and DeleteSharedIds can be used.
72 //! The command header.
73 struct CommandHeader {
79 //! Used for some glGetXXX commands that return a result through a pointer. We
80 //! need to know if the command succeeded or not and the size of the result. If
81 //! the command failed its result size will 0. You must set the size to 0
82 //! before issuing the command.
84 //! To retrieve the data you might do something like this pseudo code:
86 //! GetAttachedShaders::Result* result = address-of-shared-memory
87 //! int num_results = result->size / sizeof(GLuint); // the type returned
88 //! GLuint* results = &result->data;
89 //! for (int ii = 0; ii < num_results; ++ii) {
90 //! printf("%d\n", results[ii]);
95 uint32 size; // in bytes.
96 T data; // this is just here to get an offset.
102 static const CommandId kCmdId = 0;
104 CommandHeader header;
107 //! The SetToken command puts a token in the command stream that you can
108 //! use to check if that token has been passed in the command stream.
110 static const CommandId kCmdId = 1;
112 CommandHeader header;
116 //! The Jump command jumps to another place in the command buffer.
118 static const CommandId kCmdId = 3;
120 CommandHeader header;
124 //! The JumpRelative command jumps to another place in the command buffer
125 //! relative to the end of this command. In other words. JumpRelative with an
126 //! offset of zero is effectively a no-op.
127 struct JumpRelative {
128 static const CommandId kCmdId = 4;
130 CommandHeader header;
134 //! The Call command jumps to a subroutine which can be returned from with the
137 static const CommandId kCmdId = 5;
139 CommandHeader header;
143 //! The CallRelative command jumps to a subroutine using a relative offset. The
144 //! offset is relative to the end of this command..
145 struct CallRelative {
146 static const CommandId kCmdId = 6;
148 CommandHeader header;
152 //! Returns from a subroutine called by the Call or CallRelative commands.
154 static const CommandId kCmdId = 7;
156 CommandHeader header;
159 //! Sets the size of a bucket for collecting data on the service side.
160 //! This is a utility for gathering data on the service side so it can be used
161 //! all at once when some service side API is called. It removes the need to
162 //! add special commands just to support a particular API. For example, any API
163 //! command that needs a string needs a way to send that string to the API over
164 //! the command buffers. While you can require that the command buffer or
165 //! transfer buffer be large enough to hold the largest string you can send,
166 //! using this command removes that restriction by letting you send smaller
167 //! pieces over and build up the data on the service side.
169 //! You can clear a bucket on the service side and thereby free memory by
170 //! sending a size of 0.
171 struct SetBucketSize {
172 static const CommandId kCmdId = 8;
174 CommandHeader header;
179 //! Sets the contents of a portion of a bucket on the service side from data in
181 //! See SetBucketSize.
182 struct SetBucketData {
183 static const CommandId kCmdId = 9;
185 CommandHeader header;
189 uint32 shared_memory_id;
190 uint32 shared_memory_offset;
193 //! Sets the contents of a portion of a bucket on the service side from data in
194 //! the command buffer.
195 //! See SetBucketSize.
196 struct SetBucketDataImmediate {
197 static const CommandId kCmdId = 10;
199 CommandHeader header;
205 //! Gets the size of a bucket the service has available. Sending a variable
206 //! size result back to the client, for example any API that returns a string,
207 //! is problematic since the largest thing you can send back is the size of
208 //! your shared memory. This command along with GetBucketData implements a way
209 //! to get a result a piece at a time to help solve that problem in a generic
211 struct GetBucketSize {
212 static const CommandId kCmdId = 11;
214 typedef uint32 Result;
216 CommandHeader header;
218 uint32 shared_memory_id;
219 uint32 shared_memory_offset;
222 //! Gets a piece of a result the service has available.
223 //! See GetBucketSize.
224 struct GetBucketData {
225 static const CommandId kCmdId = 12;
227 CommandHeader header;
231 uint32 shared_memory_id;
232 uint32 shared_memory_offset;
235 // OpenGL ES 2.0 related commands.
237 //! Command that corresponds to glActiveTexture.
238 struct ActiveTexture {
239 static const CommandId kCmdId = 256;
241 CommandHeader header;
242 uint32 texture; //!< GLenum
245 //! Command that corresponds to glAttachShader.
246 struct AttachShader {
247 static const CommandId kCmdId = 257;
249 CommandHeader header;
250 uint32 program; //!< GLuint
251 uint32 shader; //!< GLuint
254 //! Command that corresponds to glBindAttribLocation.
255 struct BindAttribLocation {
256 static const CommandId kCmdId = 258;
258 CommandHeader header;
259 uint32 program; //!< GLuint
260 uint32 index; //!< GLuint
261 uint32 name_shm_id; //!< uint32
262 uint32 name_shm_offset; //!< uint32
263 uint32 data_size; //!< uint32
266 //! Immediate version of command that corresponds to glBindAttribLocation.
267 struct BindAttribLocationImmediate {
268 static const CommandId kCmdId = 259;
270 CommandHeader header;
271 uint32 program; //!< GLuint
272 uint32 index; //!< GLuint
273 uint32 data_size; //!< uint32
276 //! Bucket version of command that corresponds to glBindAttribLocation.
277 struct BindAttribLocationBucket {
278 static const CommandId kCmdId = 432;
280 CommandHeader header;
281 uint32 program; //!< GLuint
282 uint32 index; //!< GLuint
283 uint32 name_bucket_id; //!< uint32
286 //! Command that corresponds to glBindBuffer.
288 static const CommandId kCmdId = 260;
290 CommandHeader header;
291 uint32 target; //!< GLenum
292 uint32 buffer; //!< GLuint
295 //! Command that corresponds to glBindFramebuffer.
296 struct BindFramebuffer {
297 static const CommandId kCmdId = 261;
299 CommandHeader header;
300 uint32 target; //!< GLenum
301 uint32 framebuffer; //!< GLuint
304 //! Command that corresponds to glBindRenderbuffer.
305 struct BindRenderbuffer {
306 static const CommandId kCmdId = 262;
308 CommandHeader header;
309 uint32 target; //!< GLenum
310 uint32 renderbuffer; //!< GLuint
313 //! Command that corresponds to glBindTexture.
315 static const CommandId kCmdId = 263;
317 CommandHeader header;
318 uint32 target; //!< GLenum
319 uint32 texture; //!< GLuint
322 //! Command that corresponds to glBlendColor.
324 static const CommandId kCmdId = 264;
326 CommandHeader header;
327 float red; //!< GLclampf
328 float green; //!< GLclampf
329 float blue; //!< GLclampf
330 float alpha; //!< GLclampf
333 //! Command that corresponds to glBlendEquation.
334 struct BlendEquation {
335 static const CommandId kCmdId = 265;
337 CommandHeader header;
338 uint32 mode; //!< GLenum
341 //! Command that corresponds to glBlendEquationSeparate.
342 struct BlendEquationSeparate {
343 static const CommandId kCmdId = 266;
345 CommandHeader header;
346 uint32 modeRGB; //!< GLenum
347 uint32 modeAlpha; //!< GLenum
350 //! Command that corresponds to glBlendFunc.
352 static const CommandId kCmdId = 267;
354 CommandHeader header;
355 uint32 sfactor; //!< GLenum
356 uint32 dfactor; //!< GLenum
359 //! Command that corresponds to glBlendFuncSeparate.
360 struct BlendFuncSeparate {
361 static const CommandId kCmdId = 268;
363 CommandHeader header;
364 uint32 srcRGB; //!< GLenum
365 uint32 dstRGB; //!< GLenum
366 uint32 srcAlpha; //!< GLenum
367 uint32 dstAlpha; //!< GLenum
370 //! Command that corresponds to glBufferData.
372 static const CommandId kCmdId = 269;
374 CommandHeader header;
375 uint32 target; //!< GLenum
376 int32 size; //!< GLsizeiptr
377 uint32 data_shm_id; //!< uint32
378 uint32 data_shm_offset; //!< uint32
379 uint32 usage; //!< GLenum
382 //! Immediate version of command that corresponds to glBufferData.
383 struct BufferDataImmediate {
384 static const CommandId kCmdId = 270;
386 CommandHeader header;
387 uint32 target; //!< GLenum
388 int32 size; //!< GLsizeiptr
389 uint32 usage; //!< GLenum
392 //! Command that corresponds to glBufferSubData.
393 struct BufferSubData {
394 static const CommandId kCmdId = 271;
396 CommandHeader header;
397 uint32 target; //!< GLenum
398 int32 offset; //!< GLintptr
399 int32 size; //!< GLsizeiptr
400 uint32 data_shm_id; //!< uint32
401 uint32 data_shm_offset; //!< uint32
404 //! Immediate version of command that corresponds to glBufferSubData.
405 struct BufferSubDataImmediate {
406 static const CommandId kCmdId = 272;
408 CommandHeader header;
409 uint32 target; //!< GLenum
410 int32 offset; //!< GLintptr
411 int32 size; //!< GLsizeiptr
414 //! Command that corresponds to glCheckFramebufferStatus.
415 struct CheckFramebufferStatus {
416 static const CommandId kCmdId = 273;
418 typedef GLenum Result;
420 CommandHeader header;
421 uint32 target; //!< GLenum
422 uint32 result_shm_id; //!< uint32
423 uint32 result_shm_offset; //!< uint32
426 //! Command that corresponds to glClear.
428 static const CommandId kCmdId = 274;
430 CommandHeader header;
431 uint32 mask; //!< GLbitfield
434 //! Command that corresponds to glClearColor.
436 static const CommandId kCmdId = 275;
438 CommandHeader header;
439 float red; //!< GLclampf
440 float green; //!< GLclampf
441 float blue; //!< GLclampf
442 float alpha; //!< GLclampf
445 //! Command that corresponds to glClearDepthf.
447 static const CommandId kCmdId = 276;
449 CommandHeader header;
450 float depth; //!< GLclampf
453 //! Command that corresponds to glClearStencil.
454 struct ClearStencil {
455 static const CommandId kCmdId = 277;
457 CommandHeader header;
461 //! Command that corresponds to glColorMask.
463 static const CommandId kCmdId = 278;
465 CommandHeader header;
466 uint32 red; //!< GLboolean
467 uint32 green; //!< GLboolean
468 uint32 blue; //!< GLboolean
469 uint32 alpha; //!< GLboolean
472 //! Command that corresponds to glCompileShader.
473 struct CompileShader {
474 static const CommandId kCmdId = 279;
476 CommandHeader header;
477 uint32 shader; //!< GLuint
480 //! Command that corresponds to glCompressedTexImage2D.
481 struct CompressedTexImage2D {
482 static const CommandId kCmdId = 280;
484 CommandHeader header;
485 uint32 target; //!< GLenum
486 int32 level; //!< GLint
487 uint32 internalformat; //!< GLenum
488 int32 width; //!< GLsizei
489 int32 height; //!< GLsizei
490 int32 border; //!< GLint
491 int32 imageSize; //!< GLsizei
492 uint32 data_shm_id; //!< uint32
493 uint32 data_shm_offset; //!< uint32
496 //! Immediate version of command that corresponds to glCompressedTexImage2D.
497 struct CompressedTexImage2DImmediate {
498 static const CommandId kCmdId = 281;
500 CommandHeader header;
501 uint32 target; //!< GLenum
502 int32 level; //!< GLint
503 uint32 internalformat; //!< GLenum
504 int32 width; //!< GLsizei
505 int32 height; //!< GLsizei
506 int32 border; //!< GLint
507 int32 imageSize; //!< GLsizei
510 //! Bucket version of command that corresponds to glCompressedTexImage2D.
511 struct CompressedTexImage2DBucket {
512 static const CommandId kCmdId = 443;
514 CommandHeader header;
515 uint32 target; //!< GLenum
516 int32 level; //!< GLint
517 uint32 internalformat; //!< GLenum
518 int32 width; //!< GLsizei
519 int32 height; //!< GLsizei
520 int32 border; //!< GLint
521 uint32 bucket_id; //!< GLuint
524 //! Command that corresponds to glCompressedTexSubImage2D.
525 struct CompressedTexSubImage2D {
526 static const CommandId kCmdId = 282;
528 CommandHeader header;
529 uint32 target; //!< GLenum
530 int32 level; //!< GLint
531 int32 xoffset; //!< GLint
532 int32 yoffset; //!< GLint
533 int32 width; //!< GLsizei
534 int32 height; //!< GLsizei
535 uint32 format; //!< GLenum
536 int32 imageSize; //!< GLsizei
537 uint32 data_shm_id; //!< uint32
538 uint32 data_shm_offset; //!< uint32
541 //! Immediate version of command that corresponds to glCompressedTexSubImage2D.
542 struct CompressedTexSubImage2DImmediate {
543 static const CommandId kCmdId = 283;
545 CommandHeader header;
546 uint32 target; //!< GLenum
547 int32 level; //!< GLint
548 int32 xoffset; //!< GLint
549 int32 yoffset; //!< GLint
550 int32 width; //!< GLsizei
551 int32 height; //!< GLsizei
552 uint32 format; //!< GLenum
553 int32 imageSize; //!< GLsizei
556 //! Bucket version of command that corresponds to glCompressedTexSubImage2D.
557 struct CompressedTexSubImage2DBucket {
558 static const CommandId kCmdId = 444;
560 CommandHeader header;
561 uint32 target; //!< GLenum
562 int32 level; //!< GLint
563 int32 xoffset; //!< GLint
564 int32 yoffset; //!< GLint
565 int32 width; //!< GLsizei
566 int32 height; //!< GLsizei
567 uint32 format; //!< GLenum
568 uint32 bucket_id; //!< GLuint
571 //! Command that corresponds to glCopyTexImage2D.
572 struct CopyTexImage2D {
573 static const CommandId kCmdId = 284;
575 CommandHeader header;
576 uint32 target; //!< GLenum
577 int32 level; //!< GLint
578 uint32 internalformat; //!< GLenum
581 int32 width; //!< GLsizei
582 int32 height; //!< GLsizei
583 int32 border; //!< GLint
586 //! Command that corresponds to glCopyTexSubImage2D.
587 struct CopyTexSubImage2D {
588 static const CommandId kCmdId = 285;
590 CommandHeader header;
591 uint32 target; //!< GLenum
592 int32 level; //!< GLint
593 int32 xoffset; //!< GLint
594 int32 yoffset; //!< GLint
597 int32 width; //!< GLsizei
598 int32 height; //!< GLsizei
601 //! Command that corresponds to glCreateProgram.
602 struct CreateProgram {
603 static const CommandId kCmdId = 286;
605 CommandHeader header;
606 uint32 client_id; //!< uint32
609 //! Command that corresponds to glCreateShader.
610 struct CreateShader {
611 static const CommandId kCmdId = 287;
613 CommandHeader header;
614 uint32 type; //!< GLenum
615 uint32 client_id; //!< uint32
618 //! Command that corresponds to glCullFace.
620 static const CommandId kCmdId = 288;
622 CommandHeader header;
623 uint32 mode; //!< GLenum
626 //! Command that corresponds to glDeleteBuffers.
627 struct DeleteBuffers {
628 static const CommandId kCmdId = 289;
630 CommandHeader header;
631 int32 n; //!< GLsizei
632 uint32 buffers_shm_id; //!< uint32
633 uint32 buffers_shm_offset; //!< uint32
636 //! Immediate version of command that corresponds to glDeleteBuffers.
637 struct DeleteBuffersImmediate {
638 static const CommandId kCmdId = 290;
640 CommandHeader header;
641 int32 n; //!< GLsizei
644 //! Command that corresponds to glDeleteFramebuffers.
645 struct DeleteFramebuffers {
646 static const CommandId kCmdId = 291;
648 CommandHeader header;
649 int32 n; //!< GLsizei
650 uint32 framebuffers_shm_id; //!< uint32
651 uint32 framebuffers_shm_offset; //!< uint32
654 //! Immediate version of command that corresponds to glDeleteFramebuffers.
655 struct DeleteFramebuffersImmediate {
656 static const CommandId kCmdId = 292;
658 CommandHeader header;
659 int32 n; //!< GLsizei
662 //! Command that corresponds to glDeleteProgram.
663 struct DeleteProgram {
664 static const CommandId kCmdId = 293;
666 CommandHeader header;
667 uint32 program; //!< GLuint
670 //! Command that corresponds to glDeleteRenderbuffers.
671 struct DeleteRenderbuffers {
672 static const CommandId kCmdId = 294;
674 CommandHeader header;
675 int32 n; //!< GLsizei
676 uint32 renderbuffers_shm_id; //!< uint32
677 uint32 renderbuffers_shm_offset; //!< uint32
680 //! Immediate version of command that corresponds to glDeleteRenderbuffers.
681 struct DeleteRenderbuffersImmediate {
682 static const CommandId kCmdId = 295;
684 CommandHeader header;
685 int32 n; //!< GLsizei
688 //! Command that corresponds to glDeleteShader.
689 struct DeleteShader {
690 static const CommandId kCmdId = 296;
692 CommandHeader header;
693 uint32 shader; //!< GLuint
696 //! Command that corresponds to glDeleteTextures.
697 struct DeleteTextures {
698 static const CommandId kCmdId = 297;
700 CommandHeader header;
701 int32 n; //!< GLsizei
702 uint32 textures_shm_id; //!< uint32
703 uint32 textures_shm_offset; //!< uint32
706 //! Immediate version of command that corresponds to glDeleteTextures.
707 struct DeleteTexturesImmediate {
708 static const CommandId kCmdId = 298;
710 CommandHeader header;
711 int32 n; //!< GLsizei
714 //! Command that corresponds to glDepthFunc.
716 static const CommandId kCmdId = 299;
718 CommandHeader header;
719 uint32 func; //!< GLenum
722 //! Command that corresponds to glDepthMask.
724 static const CommandId kCmdId = 300;
726 CommandHeader header;
727 uint32 flag; //!< GLboolean
730 //! Command that corresponds to glDepthRangef.
732 static const CommandId kCmdId = 301;
734 CommandHeader header;
735 float zNear; //!< GLclampf
736 float zFar; //!< GLclampf
739 //! Command that corresponds to glDetachShader.
740 struct DetachShader {
741 static const CommandId kCmdId = 302;
743 CommandHeader header;
744 uint32 program; //!< GLuint
745 uint32 shader; //!< GLuint
748 //! Command that corresponds to glDisable.
750 static const CommandId kCmdId = 303;
752 CommandHeader header;
753 uint32 cap; //!< GLenum
756 //! Command that corresponds to glDisableVertexAttribArray.
757 struct DisableVertexAttribArray {
758 static const CommandId kCmdId = 304;
760 CommandHeader header;
761 uint32 index; //!< GLuint
764 //! Command that corresponds to glDrawArrays.
766 static const CommandId kCmdId = 305;
768 CommandHeader header;
769 uint32 mode; //!< GLenum
770 int32 first; //!< GLint
771 int32 count; //!< GLsizei
774 //! Command that corresponds to glDrawElements.
775 struct DrawElements {
776 static const CommandId kCmdId = 306;
778 CommandHeader header;
779 uint32 mode; //!< GLenum
780 int32 count; //!< GLsizei
781 uint32 type; //!< GLenum
782 uint32 index_offset; //!< GLuint
785 //! Command that corresponds to glEnable.
787 static const CommandId kCmdId = 307;
789 CommandHeader header;
790 uint32 cap; //!< GLenum
793 //! Command that corresponds to glEnableVertexAttribArray.
794 struct EnableVertexAttribArray {
795 static const CommandId kCmdId = 308;
797 CommandHeader header;
798 uint32 index; //!< GLuint
801 //! Command that corresponds to glFinish.
803 static const CommandId kCmdId = 309;
805 CommandHeader header;
808 //! Command that corresponds to glFlush.
810 static const CommandId kCmdId = 310;
812 CommandHeader header;
815 //! Command that corresponds to glFramebufferRenderbuffer.
816 struct FramebufferRenderbuffer {
817 static const CommandId kCmdId = 311;
819 CommandHeader header;
820 uint32 target; //!< GLenum
821 uint32 attachment; //!< GLenum
822 uint32 renderbuffertarget; //!< GLenum
823 uint32 renderbuffer; //!< GLuint
826 //! Command that corresponds to glFramebufferTexture2D.
827 struct FramebufferTexture2D {
828 static const CommandId kCmdId = 312;
830 CommandHeader header;
831 uint32 target; //!< GLenum
832 uint32 attachment; //!< GLenum
833 uint32 textarget; //!< GLenum
834 uint32 texture; //!< GLuint
835 int32 level; //!< GLint
838 //! Command that corresponds to glFrontFace.
840 static const CommandId kCmdId = 313;
842 CommandHeader header;
843 uint32 mode; //!< GLenum
846 //! Command that corresponds to glGenBuffers.
848 static const CommandId kCmdId = 314;
850 CommandHeader header;
851 int32 n; //!< GLsizei
852 uint32 buffers_shm_id; //!< uint32
853 uint32 buffers_shm_offset; //!< uint32
856 //! Immediate version of command that corresponds to glGenBuffers.
857 struct GenBuffersImmediate {
858 static const CommandId kCmdId = 315;
860 CommandHeader header;
861 int32 n; //!< GLsizei
864 //! Command that corresponds to glGenerateMipmap.
865 struct GenerateMipmap {
866 static const CommandId kCmdId = 316;
868 CommandHeader header;
869 uint32 target; //!< GLenum
872 //! Command that corresponds to glGenFramebuffers.
873 struct GenFramebuffers {
874 static const CommandId kCmdId = 317;
876 CommandHeader header;
877 int32 n; //!< GLsizei
878 uint32 framebuffers_shm_id; //!< uint32
879 uint32 framebuffers_shm_offset; //!< uint32
882 //! Immediate version of command that corresponds to glGenFramebuffers.
883 struct GenFramebuffersImmediate {
884 static const CommandId kCmdId = 318;
886 CommandHeader header;
887 int32 n; //!< GLsizei
890 //! Command that corresponds to glGenRenderbuffers.
891 struct GenRenderbuffers {
892 static const CommandId kCmdId = 319;
894 CommandHeader header;
895 int32 n; //!< GLsizei
896 uint32 renderbuffers_shm_id; //!< uint32
897 uint32 renderbuffers_shm_offset; //!< uint32
900 //! Immediate version of command that corresponds to glGenRenderbuffers.
901 struct GenRenderbuffersImmediate {
902 static const CommandId kCmdId = 320;
904 CommandHeader header;
905 int32 n; //!< GLsizei
908 //! Command that corresponds to glGenTextures.
910 static const CommandId kCmdId = 321;
912 CommandHeader header;
913 int32 n; //!< GLsizei
914 uint32 textures_shm_id; //!< uint32
915 uint32 textures_shm_offset; //!< uint32
918 //! Immediate version of command that corresponds to glGenTextures.
919 struct GenTexturesImmediate {
920 static const CommandId kCmdId = 322;
922 CommandHeader header;
923 int32 n; //!< GLsizei
926 //! Command that corresponds to glGetActiveAttrib.
927 struct GetActiveAttrib {
928 static const CommandId kCmdId = 323;
936 CommandHeader header;
937 uint32 program; //!< GLuint
938 uint32 index; //!< GLuint
939 uint32 name_bucket_id; //!< uint32
940 uint32 result_shm_id; //!< uint32
941 uint32 result_shm_offset; //!< uint32
944 //! Command that corresponds to glGetActiveUniform.
945 struct GetActiveUniform {
946 static const CommandId kCmdId = 324;
954 CommandHeader header;
955 uint32 program; //!< GLuint
956 uint32 index; //!< GLuint
957 uint32 name_bucket_id; //!< uint32
958 uint32 result_shm_id; //!< uint32
959 uint32 result_shm_offset; //!< uint32
962 //! Command that corresponds to glGetAttachedShaders.
963 struct GetAttachedShaders {
964 static const CommandId kCmdId = 325;
966 typedef SizedResult<GLuint> Result;
968 CommandHeader header;
969 uint32 program; //!< GLuint
970 uint32 result_shm_id; //!< uint32
971 uint32 result_shm_offset; //!< uint32
972 uint32 result_size; //!< uint32
975 //! Command that corresponds to glGetAttribLocation.
976 struct GetAttribLocation {
977 static const CommandId kCmdId = 326;
979 typedef GLint Result;
981 CommandHeader header;
984 uint32 name_shm_offset;
985 uint32 location_shm_id;
986 uint32 location_shm_offset;
990 //! Immediate version of command that corresponds to glGetAttribLocation.
991 struct GetAttribLocationImmediate {
992 static const CommandId kCmdId = 327;
994 typedef GLint Result;
996 CommandHeader header;
998 uint32 location_shm_id;
999 uint32 location_shm_offset;
1003 //! Bucket version of command that corresponds to glGetAttribLocation.
1004 struct GetAttribLocationBucket {
1005 static const CommandId kCmdId = 434;
1007 typedef GLint Result;
1009 CommandHeader header;
1011 uint32 name_bucket_id;
1012 uint32 location_shm_id;
1013 uint32 location_shm_offset;
1016 //! Command that corresponds to glGetBooleanv.
1017 struct GetBooleanv {
1018 static const CommandId kCmdId = 328;
1020 typedef SizedResult<GLboolean> Result;
1022 CommandHeader header;
1023 uint32 pname; //!< GLenum
1024 uint32 params_shm_id; //!< uint32
1025 uint32 params_shm_offset; //!< uint32
1028 //! Command that corresponds to glGetBufferParameteriv.
1029 struct GetBufferParameteriv {
1030 static const CommandId kCmdId = 329;
1032 typedef SizedResult<GLint> Result;
1034 CommandHeader header;
1035 uint32 target; //!< GLenum
1036 uint32 pname; //!< GLenum
1037 uint32 params_shm_id; //!< uint32
1038 uint32 params_shm_offset; //!< uint32
1041 //! Command that corresponds to glGetError.
1043 static const CommandId kCmdId = 330;
1045 typedef GLenum Result;
1047 CommandHeader header;
1048 uint32 result_shm_id; //!< uint32
1049 uint32 result_shm_offset; //!< uint32
1052 //! Command that corresponds to glGetFloatv.
1054 static const CommandId kCmdId = 331;
1056 typedef SizedResult<GLfloat> Result;
1058 CommandHeader header;
1059 uint32 pname; //!< GLenum
1060 uint32 params_shm_id; //!< uint32
1061 uint32 params_shm_offset; //!< uint32
1064 //! Command that corresponds to glGetFramebufferAttachmentParameteriv.
1065 struct GetFramebufferAttachmentParameteriv {
1066 static const CommandId kCmdId = 332;
1068 typedef SizedResult<GLint> Result;
1070 CommandHeader header;
1071 uint32 target; //!< GLenum
1072 uint32 attachment; //!< GLenum
1073 uint32 pname; //!< GLenum
1074 uint32 params_shm_id; //!< uint32
1075 uint32 params_shm_offset; //!< uint32
1078 //! Command that corresponds to glGetIntegerv.
1079 struct GetIntegerv {
1080 static const CommandId kCmdId = 333;
1082 typedef SizedResult<GLint> Result;
1084 CommandHeader header;
1085 uint32 pname; //!< GLenum
1086 uint32 params_shm_id; //!< uint32
1087 uint32 params_shm_offset; //!< uint32
1090 //! Command that corresponds to glGetProgramiv.
1091 struct GetProgramiv {
1092 static const CommandId kCmdId = 334;
1094 typedef SizedResult<GLint> Result;
1096 CommandHeader header;
1097 uint32 program; //!< GLuint
1098 uint32 pname; //!< GLenum
1099 uint32 params_shm_id; //!< uint32
1100 uint32 params_shm_offset; //!< uint32
1103 //! Command that corresponds to glGetProgramInfoLog.
1104 struct GetProgramInfoLog {
1105 static const CommandId kCmdId = 335;
1107 CommandHeader header;
1108 uint32 program; //!< GLuint
1109 uint32 bucket_id; //!< uint32
1112 //! Command that corresponds to glGetRenderbufferParameteriv.
1113 struct GetRenderbufferParameteriv {
1114 static const CommandId kCmdId = 336;
1116 typedef SizedResult<GLint> Result;
1118 CommandHeader header;
1119 uint32 target; //!< GLenum
1120 uint32 pname; //!< GLenum
1121 uint32 params_shm_id; //!< uint32
1122 uint32 params_shm_offset; //!< uint32
1125 //! Command that corresponds to glGetShaderiv.
1126 struct GetShaderiv {
1127 static const CommandId kCmdId = 337;
1129 typedef SizedResult<GLint> Result;
1131 CommandHeader header;
1132 uint32 shader; //!< GLuint
1133 uint32 pname; //!< GLenum
1134 uint32 params_shm_id; //!< uint32
1135 uint32 params_shm_offset; //!< uint32
1138 //! Command that corresponds to glGetShaderInfoLog.
1139 struct GetShaderInfoLog {
1140 static const CommandId kCmdId = 338;
1142 CommandHeader header;
1143 uint32 shader; //!< GLuint
1144 uint32 bucket_id; //!< uint32
1147 //! Command that corresponds to glGetShaderPrecisionFormat.
1148 struct GetShaderPrecisionFormat {
1149 static const CommandId kCmdId = 339;
1158 CommandHeader header;
1159 uint32 shadertype; //!< GLenum
1160 uint32 precisiontype; //!< GLenum
1161 uint32 result_shm_id; //!< uint32
1162 uint32 result_shm_offset; //!< uint32
1165 //! Command that corresponds to glGetShaderSource.
1166 struct GetShaderSource {
1167 static const CommandId kCmdId = 340;
1169 CommandHeader header;
1170 uint32 shader; //!< GLuint
1171 uint32 bucket_id; //!< uint32
1174 //! Command that corresponds to glGetString.
1176 static const CommandId kCmdId = 341;
1178 CommandHeader header;
1179 uint32 name; //!< GLenum
1180 uint32 bucket_id; //!< uint32
1183 //! Command that corresponds to glGetTexParameterfv.
1184 struct GetTexParameterfv {
1185 static const CommandId kCmdId = 342;
1187 typedef SizedResult<GLfloat> Result;
1189 CommandHeader header;
1190 uint32 target; //!< GLenum
1191 uint32 pname; //!< GLenum
1192 uint32 params_shm_id; //!< uint32
1193 uint32 params_shm_offset; //!< uint32
1196 //! Command that corresponds to glGetTexParameteriv.
1197 struct GetTexParameteriv {
1198 static const CommandId kCmdId = 343;
1200 typedef SizedResult<GLint> Result;
1202 CommandHeader header;
1203 uint32 target; //!< GLenum
1204 uint32 pname; //!< GLenum
1205 uint32 params_shm_id; //!< uint32
1206 uint32 params_shm_offset; //!< uint32
1209 //! Command that corresponds to glGetUniformLocation.
1210 struct GetUniformLocation {
1211 static const CommandId kCmdId = 346;
1213 typedef GLint Result;
1215 CommandHeader header;
1218 uint32 name_shm_offset;
1219 uint32 location_shm_id;
1220 uint32 location_shm_offset;
1224 //! Immediate version of command that corresponds to glGetUniformLocation.
1225 struct GetUniformLocationImmediate {
1226 static const CommandId kCmdId = 347;
1228 typedef GLint Result;
1230 CommandHeader header;
1232 uint32 location_shm_id;
1233 uint32 location_shm_offset;
1237 //! Bucket version of command that corresponds to glGetUniformLocation.
1238 struct GetUniformLocationBucket {
1239 static const CommandId kCmdId = 433;
1241 typedef GLint Result;
1243 CommandHeader header;
1245 uint32 name_bucket_id;
1246 uint32 location_shm_id;
1247 uint32 location_shm_offset;
1251 //! Command that corresponds to glGetUniformfv.
1252 struct GetUniformfv {
1253 static const CommandId kCmdId = 344;
1255 typedef SizedResult<GLfloat> Result;
1257 CommandHeader header;
1258 uint32 program; //!< GLuint
1259 int32 location; //!< GLint
1260 uint32 params_shm_id; //!< uint32
1261 uint32 params_shm_offset; //!< uint32
1264 //! Command that corresponds to glGetUniformiv.
1265 struct GetUniformiv {
1266 static const CommandId kCmdId = 345;
1268 typedef SizedResult<GLint> Result;
1270 CommandHeader header;
1271 uint32 program; //!< GLuint
1272 int32 location; //!< GLint
1273 uint32 params_shm_id; //!< uint32
1274 uint32 params_shm_offset; //!< uint32
1277 //! Command that corresponds to glGetVertexAttribfv.
1278 struct GetVertexAttribfv {
1279 static const CommandId kCmdId = 348;
1281 typedef SizedResult<GLfloat> Result;
1283 CommandHeader header;
1284 uint32 index; //!< GLuint
1285 uint32 pname; //!< GLenum
1286 uint32 params_shm_id; //!< uint32
1287 uint32 params_shm_offset; //!< uint32
1290 //! Command that corresponds to glGetVertexAttribiv.
1291 struct GetVertexAttribiv {
1292 static const CommandId kCmdId = 349;
1294 typedef SizedResult<GLint> Result;
1296 CommandHeader header;
1297 uint32 index; //!< GLuint
1298 uint32 pname; //!< GLenum
1299 uint32 params_shm_id; //!< uint32
1300 uint32 params_shm_offset; //!< uint32
1303 //! Command that corresponds to glGetVertexAttribPointerv.
1304 struct GetVertexAttribPointerv {
1305 static const CommandId kCmdId = 350;
1307 typedef SizedResult<GLuint> Result;
1309 CommandHeader header;
1310 uint32 index; //!< GLuint
1311 uint32 pname; //!< GLenum
1312 uint32 pointer_shm_id; //!< uint32
1313 uint32 pointer_shm_offset; //!< uint32
1316 //! Command that corresponds to glHint.
1318 static const CommandId kCmdId = 351;
1320 CommandHeader header;
1321 uint32 target; //!< GLenum
1322 uint32 mode; //!< GLenum
1325 //! Command that corresponds to glIsBuffer.
1327 static const CommandId kCmdId = 352;
1329 typedef uint32 Result;
1331 CommandHeader header;
1332 uint32 buffer; //!< GLuint
1333 uint32 result_shm_id; //!< uint32
1334 uint32 result_shm_offset; //!< uint32
1337 //! Command that corresponds to glIsEnabled.
1339 static const CommandId kCmdId = 353;
1341 typedef uint32 Result;
1343 CommandHeader header;
1344 uint32 cap; //!< GLenum
1345 uint32 result_shm_id; //!< uint32
1346 uint32 result_shm_offset; //!< uint32
1349 //! Command that corresponds to glIsFramebuffer.
1350 struct IsFramebuffer {
1351 static const CommandId kCmdId = 354;
1353 typedef uint32 Result;
1355 CommandHeader header;
1356 uint32 framebuffer; //!< GLuint
1357 uint32 result_shm_id; //!< uint32
1358 uint32 result_shm_offset; //!< uint32
1361 //! Command that corresponds to glIsProgram.
1363 static const CommandId kCmdId = 355;
1365 typedef uint32 Result;
1367 CommandHeader header;
1368 uint32 program; //!< GLuint
1369 uint32 result_shm_id; //!< uint32
1370 uint32 result_shm_offset; //!< uint32
1373 //! Command that corresponds to glIsRenderbuffer.
1374 struct IsRenderbuffer {
1375 static const CommandId kCmdId = 356;
1377 typedef uint32 Result;
1379 CommandHeader header;
1380 uint32 renderbuffer; //!< GLuint
1381 uint32 result_shm_id; //!< uint32
1382 uint32 result_shm_offset; //!< uint32
1385 //! Command that corresponds to glIsShader.
1387 static const CommandId kCmdId = 357;
1389 typedef uint32 Result;
1391 CommandHeader header;
1392 uint32 shader; //!< GLuint
1393 uint32 result_shm_id; //!< uint32
1394 uint32 result_shm_offset; //!< uint32
1397 //! Command that corresponds to glIsTexture.
1399 static const CommandId kCmdId = 358;
1401 typedef uint32 Result;
1403 CommandHeader header;
1404 uint32 texture; //!< GLuint
1405 uint32 result_shm_id; //!< uint32
1406 uint32 result_shm_offset; //!< uint32
1409 //! Command that corresponds to glLineWidth.
1411 static const CommandId kCmdId = 359;
1413 CommandHeader header;
1414 float width; //!< GLfloat
1417 //! Command that corresponds to glLinkProgram.
1418 struct LinkProgram {
1419 static const CommandId kCmdId = 360;
1421 CommandHeader header;
1422 uint32 program; //!< GLuint
1425 //! Command that corresponds to glPixelStorei.
1426 struct PixelStorei {
1427 static const CommandId kCmdId = 361;
1429 CommandHeader header;
1430 uint32 pname; //!< GLenum
1431 int32 param; //!< GLint
1434 //! Command that corresponds to glPolygonOffset.
1435 struct PolygonOffset {
1436 static const CommandId kCmdId = 362;
1438 CommandHeader header;
1439 float factor; //!< GLfloat
1440 float units; //!< GLfloat
1443 //! Command that corresponds to glReadPixels.
1444 //! ReadPixels has the result separated from the pixel buffer so that
1445 //! it is easier to specify the result going to some specific place
1446 //! that exactly fits the rectangle of pixels.
1448 static const CommandId kCmdId = 363;
1450 typedef uint32 Result;
1452 CommandHeader header;
1455 int32 width; //!< GLsizei
1456 int32 height; //!< GLsizei
1457 uint32 format; //!< GLenum
1458 uint32 type; //!< GLenum
1459 uint32 pixels_shm_id; //!< uint32
1460 uint32 pixels_shm_offset; //!< uint32
1461 uint32 result_shm_id; //!< uint32
1462 uint32 result_shm_offset; //!< uint32
1465 //! Command that corresponds to glReleaseShaderCompiler.
1466 struct ReleaseShaderCompiler {
1467 static const CommandId kCmdId = 437;
1469 CommandHeader header;
1472 //! Command that corresponds to glRenderbufferStorage.
1473 struct RenderbufferStorage {
1474 static const CommandId kCmdId = 364;
1476 CommandHeader header;
1477 uint32 target; //!< GLenum
1478 uint32 internalformat; //!< GLenum
1479 int32 width; //!< GLsizei
1480 int32 height; //!< GLsizei
1483 //! Command that corresponds to glSampleCoverage.
1484 struct SampleCoverage {
1485 static const CommandId kCmdId = 365;
1487 CommandHeader header;
1488 float value; //!< GLclampf
1489 uint32 invert; //!< GLboolean
1492 //! Command that corresponds to glScissor.
1494 static const CommandId kCmdId = 366;
1496 CommandHeader header;
1499 int32 width; //!< GLsizei
1500 int32 height; //!< GLsizei
1503 //! Command that corresponds to glShaderBinary.
1504 struct ShaderBinary {
1505 static const CommandId kCmdId = 436;
1507 CommandHeader header;
1508 int32 n; //!< GLsizei
1509 uint32 shaders_shm_id; //!< uint32
1510 uint32 shaders_shm_offset; //!< uint32
1511 uint32 binaryformat; //!< GLenum
1512 uint32 binary_shm_id; //!< uint32
1513 uint32 binary_shm_offset; //!< uint32
1514 int32 length; //!< GLsizei
1517 //! Command that corresponds to glShaderSource.
1518 struct ShaderSource {
1519 static const CommandId kCmdId = 367;
1521 CommandHeader header;
1522 uint32 shader; //!< GLuint
1523 uint32 data_shm_id; //!< uint32
1524 uint32 data_shm_offset; //!< uint32
1525 uint32 data_size; //!< uint32
1528 //! Immediate version of command that corresponds to glShaderSource.
1529 struct ShaderSourceImmediate {
1530 static const CommandId kCmdId = 368;
1532 CommandHeader header;
1533 uint32 shader; //!< GLuint
1534 uint32 data_size; //!< uint32
1537 //! Bucket version of command that corresponds to glShaderSource.
1538 struct ShaderSourceBucket {
1539 static const CommandId kCmdId = 435;
1541 CommandHeader header;
1542 uint32 shader; //!< GLuint
1543 uint32 data_bucket_id; //!< uint32
1546 //! Command that corresponds to glStencilFunc.
1547 struct StencilFunc {
1548 static const CommandId kCmdId = 369;
1550 CommandHeader header;
1551 uint32 func; //!< GLenum
1552 int32 ref; //!< GLint
1553 uint32 mask; //!< GLuint
1556 //! Command that corresponds to glStencilFuncSeparate.
1557 struct StencilFuncSeparate {
1558 static const CommandId kCmdId = 370;
1560 CommandHeader header;
1561 uint32 face; //!< GLenum
1562 uint32 func; //!< GLenum
1563 int32 ref; //!< GLint
1564 uint32 mask; //!< GLuint
1567 //! Command that corresponds to glStencilMask.
1568 struct StencilMask {
1569 static const CommandId kCmdId = 371;
1571 CommandHeader header;
1572 uint32 mask; //!< GLuint
1575 //! Command that corresponds to glStencilMaskSeparate.
1576 struct StencilMaskSeparate {
1577 static const CommandId kCmdId = 372;
1579 CommandHeader header;
1580 uint32 face; //!< GLenum
1581 uint32 mask; //!< GLuint
1584 //! Command that corresponds to glStencilOp.
1586 static const CommandId kCmdId = 373;
1588 CommandHeader header;
1589 uint32 fail; //!< GLenum
1590 uint32 zfail; //!< GLenum
1591 uint32 zpass; //!< GLenum
1594 //! Command that corresponds to glStencilOpSeparate.
1595 struct StencilOpSeparate {
1596 static const CommandId kCmdId = 374;
1598 CommandHeader header;
1599 uint32 face; //!< GLenum
1600 uint32 fail; //!< GLenum
1601 uint32 zfail; //!< GLenum
1602 uint32 zpass; //!< GLenum
1605 //! Command that corresponds to glTexImage2D.
1607 static const CommandId kCmdId = 375;
1609 CommandHeader header;
1610 uint32 target; //!< GLenum
1611 int32 level; //!< GLint
1612 int32 internalformat; //!< GLint
1613 int32 width; //!< GLsizei
1614 int32 height; //!< GLsizei
1615 int32 border; //!< GLint
1616 uint32 format; //!< GLenum
1617 uint32 type; //!< GLenum
1618 uint32 pixels_shm_id; //!< uint32
1619 uint32 pixels_shm_offset; //!< uint32
1622 //! Immediate version of command that corresponds to glTexImage2D.
1623 struct TexImage2DImmediate {
1624 static const CommandId kCmdId = 376;
1626 CommandHeader header;
1627 uint32 target; //!< GLenum
1628 int32 level; //!< GLint
1629 int32 internalformat; //!< GLint
1630 int32 width; //!< GLsizei
1631 int32 height; //!< GLsizei
1632 int32 border; //!< GLint
1633 uint32 format; //!< GLenum
1634 uint32 type; //!< GLenum
1637 //! Command that corresponds to glTexParameterf.
1638 struct TexParameterf {
1639 static const CommandId kCmdId = 377;
1641 CommandHeader header;
1642 uint32 target; //!< GLenum
1643 uint32 pname; //!< GLenum
1644 float param; //!< GLfloat
1647 //! Command that corresponds to glTexParameterfv.
1648 struct TexParameterfv {
1649 static const CommandId kCmdId = 378;
1651 CommandHeader header;
1652 uint32 target; //!< GLenum
1653 uint32 pname; //!< GLenum
1654 uint32 params_shm_id; //!< uint32
1655 uint32 params_shm_offset; //!< uint32
1658 //! Immediate version of command that corresponds to glTexParameterfv.
1659 struct TexParameterfvImmediate {
1660 static const CommandId kCmdId = 379;
1662 CommandHeader header;
1663 uint32 target; //!< GLenum
1664 uint32 pname; //!< GLenum
1667 //! Command that corresponds to glTexParameteri.
1668 struct TexParameteri {
1669 static const CommandId kCmdId = 380;
1671 CommandHeader header;
1672 uint32 target; //!< GLenum
1673 uint32 pname; //!< GLenum
1674 int32 param; //!< GLint
1677 //! Command that corresponds to glTexParameteriv.
1678 struct TexParameteriv {
1679 static const CommandId kCmdId = 381;
1681 CommandHeader header;
1682 uint32 target; //!< GLenum
1683 uint32 pname; //!< GLenum
1684 uint32 params_shm_id; //!< uint32
1685 uint32 params_shm_offset; //!< uint32
1688 //! Immediate version of command that corresponds to glTexParameteriv.
1689 struct TexParameterivImmediate {
1690 static const CommandId kCmdId = 382;
1692 CommandHeader header;
1693 uint32 target; //!< GLenum
1694 uint32 pname; //!< GLenum
1697 //! Command that corresponds to glTexSubImage2D.
1698 struct TexSubImage2D {
1699 static const CommandId kCmdId = 383;
1701 CommandHeader header;
1702 uint32 target; //!< GLenum
1703 int32 level; //!< GLint
1704 int32 xoffset; //!< GLint
1705 int32 yoffset; //!< GLint
1706 int32 width; //!< GLsizei
1707 int32 height; //!< GLsizei
1708 uint32 format; //!< GLenum
1709 uint32 type; //!< GLenum
1710 uint32 pixels_shm_id; //!< uint32
1711 uint32 pixels_shm_offset; //!< uint32
1714 //! Immediate version of command that corresponds to glTexSubImage2D.
1715 struct TexSubImage2DImmediate {
1716 static const CommandId kCmdId = 384;
1718 CommandHeader header;
1719 uint32 target; //!< GLenum
1720 int32 level; //!< GLint
1721 int32 xoffset; //!< GLint
1722 int32 yoffset; //!< GLint
1723 int32 width; //!< GLsizei
1724 int32 height; //!< GLsizei
1725 uint32 format; //!< GLenum
1726 uint32 type; //!< GLenum
1729 //! Command that corresponds to glUniform1f.
1731 static const CommandId kCmdId = 385;
1733 CommandHeader header;
1734 int32 location; //!< GLint
1735 float x; //!< GLfloat
1738 //! Command that corresponds to glUniform1fv.
1740 static const CommandId kCmdId = 386;
1742 CommandHeader header;
1743 int32 location; //!< GLint
1744 int32 count; //!< GLsizei
1745 uint32 v_shm_id; //!< uint32
1746 uint32 v_shm_offset; //!< uint32
1749 //! Immediate version of command that corresponds to glUniform1fv.
1750 struct Uniform1fvImmediate {
1751 static const CommandId kCmdId = 387;
1753 CommandHeader header;
1754 int32 location; //!< GLint
1755 int32 count; //!< GLsizei
1758 //! Command that corresponds to glUniform1i.
1760 static const CommandId kCmdId = 388;
1762 CommandHeader header;
1763 int32 location; //!< GLint
1767 //! Command that corresponds to glUniform1iv.
1769 static const CommandId kCmdId = 389;
1771 CommandHeader header;
1772 int32 location; //!< GLint
1773 int32 count; //!< GLsizei
1774 uint32 v_shm_id; //!< uint32
1775 uint32 v_shm_offset; //!< uint32
1778 //! Immediate version of command that corresponds to glUniform1iv.
1779 struct Uniform1ivImmediate {
1780 static const CommandId kCmdId = 390;
1782 CommandHeader header;
1783 int32 location; //!< GLint
1784 int32 count; //!< GLsizei
1787 //! Command that corresponds to glUniform2f.
1789 static const CommandId kCmdId = 391;
1791 CommandHeader header;
1792 int32 location; //!< GLint
1793 float x; //!< GLfloat
1794 float y; //!< GLfloat
1797 //! Command that corresponds to glUniform2fv.
1799 static const CommandId kCmdId = 392;
1801 CommandHeader header;
1802 int32 location; //!< GLint
1803 int32 count; //!< GLsizei
1804 uint32 v_shm_id; //!< uint32
1805 uint32 v_shm_offset; //!< uint32
1808 //! Immediate version of command that corresponds to glUniform2fv.
1809 struct Uniform2fvImmediate {
1810 static const CommandId kCmdId = 393;
1812 CommandHeader header;
1813 int32 location; //!< GLint
1814 int32 count; //!< GLsizei
1817 //! Command that corresponds to glUniform2i.
1819 static const CommandId kCmdId = 394;
1821 CommandHeader header;
1822 int32 location; //!< GLint
1827 //! Command that corresponds to glUniform2iv.
1829 static const CommandId kCmdId = 395;
1831 CommandHeader header;
1832 int32 location; //!< GLint
1833 int32 count; //!< GLsizei
1834 uint32 v_shm_id; //!< uint32
1835 uint32 v_shm_offset; //!< uint32
1838 //! Immediate version of command that corresponds to glUniform2iv.
1839 struct Uniform2ivImmediate {
1840 static const CommandId kCmdId = 396;
1842 CommandHeader header;
1843 int32 location; //!< GLint
1844 int32 count; //!< GLsizei
1847 //! Command that corresponds to glUniform3f.
1849 static const CommandId kCmdId = 397;
1851 CommandHeader header;
1852 int32 location; //!< GLint
1853 float x; //!< GLfloat
1854 float y; //!< GLfloat
1855 float z; //!< GLfloat
1858 //! Command that corresponds to glUniform3fv.
1860 static const CommandId kCmdId = 398;
1862 CommandHeader header;
1863 int32 location; //!< GLint
1864 int32 count; //!< GLsizei
1865 uint32 v_shm_id; //!< uint32
1866 uint32 v_shm_offset; //!< uint32
1869 //! Immediate version of command that corresponds to glUniform3fv.
1870 struct Uniform3fvImmediate {
1871 static const CommandId kCmdId = 399;
1873 CommandHeader header;
1874 int32 location; //!< GLint
1875 int32 count; //!< GLsizei
1878 //! Command that corresponds to glUniform3i.
1880 static const CommandId kCmdId = 400;
1882 CommandHeader header;
1883 int32 location; //!< GLint
1889 //! Command that corresponds to glUniform3iv.
1891 static const CommandId kCmdId = 401;
1893 CommandHeader header;
1894 int32 location; //!< GLint
1895 int32 count; //!< GLsizei
1896 uint32 v_shm_id; //!< uint32
1897 uint32 v_shm_offset; //!< uint32
1900 //! Immediate version of command that corresponds to glUniform3iv.
1901 struct Uniform3ivImmediate {
1902 static const CommandId kCmdId = 402;
1904 CommandHeader header;
1905 int32 location; //!< GLint
1906 int32 count; //!< GLsizei
1909 //! Command that corresponds to glUniform4f.
1911 static const CommandId kCmdId = 403;
1913 CommandHeader header;
1914 int32 location; //!< GLint
1915 float x; //!< GLfloat
1916 float y; //!< GLfloat
1917 float z; //!< GLfloat
1918 float w; //!< GLfloat
1921 //! Command that corresponds to glUniform4fv.
1923 static const CommandId kCmdId = 404;
1925 CommandHeader header;
1926 int32 location; //!< GLint
1927 int32 count; //!< GLsizei
1928 uint32 v_shm_id; //!< uint32
1929 uint32 v_shm_offset; //!< uint32
1932 //! Immediate version of command that corresponds to glUniform4fv.
1933 struct Uniform4fvImmediate {
1934 static const CommandId kCmdId = 405;
1936 CommandHeader header;
1937 int32 location; //!< GLint
1938 int32 count; //!< GLsizei
1941 //! Command that corresponds to glUniform4i.
1943 static const CommandId kCmdId = 406;
1945 CommandHeader header;
1946 int32 location; //!< GLint
1953 //! Command that corresponds to glUniform4iv.
1955 static const CommandId kCmdId = 407;
1957 CommandHeader header;
1958 int32 location; //!< GLint
1959 int32 count; //!< GLsizei
1960 uint32 v_shm_id; //!< uint32
1961 uint32 v_shm_offset; //!< uint32
1964 //! Immediate version of command that corresponds to glUniform4iv.
1965 struct Uniform4ivImmediate {
1966 static const CommandId kCmdId = 408;
1968 CommandHeader header;
1969 int32 location; //!< GLint
1970 int32 count; //!< GLsizei
1973 //! Command that corresponds to glUniformMatrix2fv.
1974 struct UniformMatrix2fv {
1975 static const CommandId kCmdId = 409;
1977 CommandHeader header;
1978 int32 location; //!< GLint
1979 int32 count; //!< GLsizei
1980 uint32 transpose; //!< GLboolean
1981 uint32 value_shm_id; //!< uint32
1982 uint32 value_shm_offset; //!< uint32
1985 //! Immediate version of command that corresponds to glUniformMatrix2fv.
1986 struct UniformMatrix2fvImmediate {
1987 static const CommandId kCmdId = 410;
1989 CommandHeader header;
1990 int32 location; //!< GLint
1991 int32 count; //!< GLsizei
1992 uint32 transpose; //!< GLboolean
1995 //! Command that corresponds to glUniformMatrix3fv.
1996 struct UniformMatrix3fv {
1997 static const CommandId kCmdId = 411;
1999 CommandHeader header;
2000 int32 location; //!< GLint
2001 int32 count; //!< GLsizei
2002 uint32 transpose; //!< GLboolean
2003 uint32 value_shm_id; //!< uint32
2004 uint32 value_shm_offset; //!< uint32
2007 //! Immediate version of command that corresponds to glUniformMatrix3fv.
2008 struct UniformMatrix3fvImmediate {
2009 static const CommandId kCmdId = 412;
2011 CommandHeader header;
2012 int32 location; //!< GLint
2013 int32 count; //!< GLsizei
2014 uint32 transpose; //!< GLboolean
2017 //! Command that corresponds to glUniformMatrix4fv.
2018 struct UniformMatrix4fv {
2019 static const CommandId kCmdId = 413;
2021 CommandHeader header;
2022 int32 location; //!< GLint
2023 int32 count; //!< GLsizei
2024 uint32 transpose; //!< GLboolean
2025 uint32 value_shm_id; //!< uint32
2026 uint32 value_shm_offset; //!< uint32
2029 //! Immediate version of command that corresponds to glUniformMatrix4fv.
2030 struct UniformMatrix4fvImmediate {
2031 static const CommandId kCmdId = 414;
2033 CommandHeader header;
2034 int32 location; //!< GLint
2035 int32 count; //!< GLsizei
2036 uint32 transpose; //!< GLboolean
2039 //! Command that corresponds to glUseProgram.
2041 static const CommandId kCmdId = 415;
2043 CommandHeader header;
2044 uint32 program; //!< GLuint
2047 //! Command that corresponds to glValidateProgram.
2048 struct ValidateProgram {
2049 static const CommandId kCmdId = 416;
2051 CommandHeader header;
2052 uint32 program; //!< GLuint
2055 //! Command that corresponds to glVertexAttrib1f.
2056 struct VertexAttrib1f {
2057 static const CommandId kCmdId = 417;
2059 CommandHeader header;
2060 uint32 indx; //!< GLuint
2061 float x; //!< GLfloat
2064 //! Command that corresponds to glVertexAttrib1fv.
2065 struct VertexAttrib1fv {
2066 static const CommandId kCmdId = 418;
2068 CommandHeader header;
2069 uint32 indx; //!< GLuint
2070 uint32 values_shm_id; //!< uint32
2071 uint32 values_shm_offset; //!< uint32
2074 //! Immediate version of command that corresponds to glVertexAttrib1fv.
2075 struct VertexAttrib1fvImmediate {
2076 static const CommandId kCmdId = 419;
2078 CommandHeader header;
2079 uint32 indx; //!< GLuint
2082 //! Command that corresponds to glVertexAttrib2f.
2083 struct VertexAttrib2f {
2084 static const CommandId kCmdId = 420;
2086 CommandHeader header;
2087 uint32 indx; //!< GLuint
2088 float x; //!< GLfloat
2089 float y; //!< GLfloat
2092 //! Command that corresponds to glVertexAttrib2fv.
2093 struct VertexAttrib2fv {
2094 static const CommandId kCmdId = 421;
2096 CommandHeader header;
2097 uint32 indx; //!< GLuint
2098 uint32 values_shm_id; //!< uint32
2099 uint32 values_shm_offset; //!< uint32
2102 //! Immediate version of command that corresponds to glVertexAttrib2fv.
2103 struct VertexAttrib2fvImmediate {
2104 static const CommandId kCmdId = 422;
2106 CommandHeader header;
2107 uint32 indx; //!< GLuint
2110 //! Command that corresponds to glVertexAttrib3f.
2111 struct VertexAttrib3f {
2112 static const CommandId kCmdId = 423;
2114 CommandHeader header;
2115 uint32 indx; //!< GLuint
2116 float x; //!< GLfloat
2117 float y; //!< GLfloat
2118 float z; //!< GLfloat
2121 //! Command that corresponds to glVertexAttrib3fv.
2122 struct VertexAttrib3fv {
2123 static const CommandId kCmdId = 424;
2125 CommandHeader header;
2126 uint32 indx; //!< GLuint
2127 uint32 values_shm_id; //!< uint32
2128 uint32 values_shm_offset; //!< uint32
2131 //! Immediate version of command that corresponds to glVertexAttrib3fv.
2132 struct VertexAttrib3fvImmediate {
2133 static const CommandId kCmdId = 425;
2135 CommandHeader header;
2136 uint32 indx; //!< GLuint
2139 //! Command that corresponds to glVertexAttrib4f.
2140 struct VertexAttrib4f {
2141 static const CommandId kCmdId = 426;
2143 CommandHeader header;
2144 uint32 indx; //!< GLuint
2145 float x; //!< GLfloat
2146 float y; //!< GLfloat
2147 float z; //!< GLfloat
2148 float w; //!< GLfloat
2151 //! Command that corresponds to glVertexAttrib4fv.
2152 struct VertexAttrib4fv {
2153 static const CommandId kCmdId = 427;
2155 CommandHeader header;
2156 uint32 indx; //!< GLuint
2157 uint32 values_shm_id; //!< uint32
2158 uint32 values_shm_offset; //!< uint32
2161 //! Immediate version of command that corresponds to glVertexAttrib4fv.
2162 struct VertexAttrib4fvImmediate {
2163 static const CommandId kCmdId = 428;
2165 CommandHeader header;
2166 uint32 indx; //!< GLuint
2169 //! Command that corresponds to glVertexAttribPointer.
2170 struct VertexAttribPointer {
2171 static const CommandId kCmdId = 429;
2173 CommandHeader header;
2174 uint32 indx; //!< GLuint
2175 int32 size; //!< GLint
2176 uint32 type; //!< GLenum
2177 uint32 normalized; //!< GLboolean
2178 int32 stride; //!< GLsizei
2179 uint32 offset; //!< GLuint
2182 //! Command that corresponds to glViewport.
2184 static const CommandId kCmdId = 430;
2186 CommandHeader header;
2189 int32 width; //!< GLsizei
2190 int32 height; //!< GLsizei
2193 //! Command that corresponds to SwapBuffers.
2194 struct SwapBuffers {
2195 static const CommandId kCmdId = 431;
2197 CommandHeader header;
2200 //! Command that corresponds to GetMaxValueInBuffer.
2201 struct GetMaxValueInBuffer {
2202 static const CommandId kCmdId = 436;
2204 typedef GLuint Result;
2206 CommandHeader header;
2207 uint32 buffer_id; //!< GLuint
2208 int32 count; //!< GLsizei
2209 uint32 type; //!< GLenum
2210 uint32 offset; //!< GLuint
2211 uint32 result_shm_id; //!< uint32
2212 uint32 result_shm_offset; //!< uint32
2215 //! Command that generates shared ids for contexts that share resources.
2216 struct GenSharedIds {
2217 static const CommandId kCmdId = 439;
2219 CommandHeader header;
2220 uint32 namespace_id; //!< GLuint
2221 uint32 id_offset; //!< GLuint
2222 int32 n; //!< GLsizei
2223 uint32 ids_shm_id; //!< uint32
2224 uint32 ids_shm_offset; //!< uint32
2227 //! Command that deletes shared ids.
2228 struct DeleteSharedIds {
2229 static const CommandId kCmdId = 440;
2231 CommandHeader header;
2232 uint32 namespace_id; //!< GLuint
2233 int32 n; //!< GLsizei
2234 uint32 ids_shm_id; //!< uint32
2235 uint32 ids_shm_offset; //!< uint32
2238 //! Command that registers shared ids. It is an error to attempt
2239 //! to register an id that is already registered.
2240 struct RegisterSharedIds {
2241 static const CommandId kCmdId = 441;
2243 CommandHeader header;
2244 uint32 namespace_id; //!< GLuint
2245 int32 n; //!< GLsizei
2246 uint32 ids_shm_id; //!< uint32
2247 uint32 ids_shm_offset; //!< uint32
2250 //! Command that enables features. The bucket should contain the feature string.
2251 struct CommandBufferEnable {
2252 static const CommandId kCmdId = 442;
2254 typedef GLint Result;
2256 CommandHeader header;
2257 uint32 bucket_id; //!< GLuint
2258 uint32 result_shm_id; //!< uint32
2259 uint32 result_shm_offset; //!< uint32