gles2_cmd_format_docs.txt revision 5821806d5e7f356e8fa4b058a389a808ea183019
1//! \file 2//! 3//! The public interface for 3D graphics is based on a command buffer. 4//! 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. 8//! 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 11//! them. 12//! 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. 16//! 17//! Commands that send a variable amount of data have 1 to 3 ways to send that 18//! data. 19//! 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 24//! executed. 25//! 26//! Some commands have an 'immediate' version where the data appears directly 27//! after the command in memory. 28//! 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. 34//! 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. 39//! 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. 43//! 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. 57//! 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. 61//! 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. 70//! 71 72//! The command header. 73struct CommandHeader { 74 Uint32 size:21; 75 Uint32 command:11; 76}; 77 78 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. 83//! 84//! To retrieve the data you might do something like this pseudo code: 85//! 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]); 91//! } 92//! 93template <typename T> 94struct SizedResult { 95 uint32 size; // in bytes. 96 T data; // this is just here to get an offset. 97}; 98 99 100//! A Noop command. 101struct Noop { 102 static const CommandId kCmdId = 0; 103 104 CommandHeader header; 105}; 106 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. 109struct SetToken { 110 static const CommandId kCmdId = 1; 111 112 CommandHeader header; 113 uint32 token; 114}; 115 116//! The Jump command jumps to another place in the command buffer. 117struct Jump { 118 static const CommandId kCmdId = 3; 119 120 CommandHeader header; 121 uint32 offset; 122}; 123 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. 127struct JumpRelative { 128 static const CommandId kCmdId = 4; 129 130 CommandHeader header; 131 int32 offset; 132}; 133 134//! The Call command jumps to a subroutine which can be returned from with the 135//! Return command. 136struct Call { 137 static const CommandId kCmdId = 5; 138 139 CommandHeader header; 140 uint32 offset; 141}; 142 143//! The CallRelative command jumps to a subroutine using a relative offset. The 144//! offset is relative to the end of this command.. 145struct CallRelative { 146 static const CommandId kCmdId = 6; 147 148 CommandHeader header; 149 int32 offset; 150}; 151 152//! Returns from a subroutine called by the Call or CallRelative commands. 153struct Return { 154 static const CommandId kCmdId = 7; 155 156 CommandHeader header; 157}; 158 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. 168//! 169//! You can clear a bucket on the service side and thereby free memory by 170//! sending a size of 0. 171struct SetBucketSize { 172 static const CommandId kCmdId = 8; 173 174 CommandHeader header; 175 uint32 bucket_id; 176 uint32 size; 177}; 178 179//! Sets the contents of a portion of a bucket on the service side from data in 180//! shared memory. 181//! See SetBucketSize. 182struct SetBucketData { 183 static const CommandId kCmdId = 9; 184 185 CommandHeader header; 186 uint32 bucket_id; 187 uint32 offset; 188 uint32 size; 189 uint32 shared_memory_id; 190 uint32 shared_memory_offset; 191}; 192 193//! Sets the contents of a portion of a bucket on the service side from data in 194//! the command buffer. 195//! See SetBucketSize. 196struct SetBucketDataImmediate { 197 static const CommandId kCmdId = 10; 198 199 CommandHeader header; 200 uint32 bucket_id; 201 uint32 offset; 202 uint32 size; 203}; 204 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 210//! way. 211struct GetBucketSize { 212 static const CommandId kCmdId = 11; 213 214 typedef uint32 Result; 215 216 CommandHeader header; 217 uint32 bucket_id; 218 uint32 shared_memory_id; 219 uint32 shared_memory_offset; 220}; 221 222//! Gets a piece of a result the service has available. 223//! See GetBucketSize. 224struct GetBucketData { 225 static const CommandId kCmdId = 12; 226 227 CommandHeader header; 228 uint32 bucket_id; 229 uint32 offset; 230 uint32 size; 231 uint32 shared_memory_id; 232 uint32 shared_memory_offset; 233}; 234 235// OpenGL ES 2.0 related commands. 236 237//! Command that corresponds to glActiveTexture. 238struct ActiveTexture { 239 static const CommandId kCmdId = 256; 240 241 CommandHeader header; 242 uint32 texture; //!< GLenum 243}; 244 245//! Command that corresponds to glAttachShader. 246struct AttachShader { 247 static const CommandId kCmdId = 257; 248 249 CommandHeader header; 250 uint32 program; //!< GLuint 251 uint32 shader; //!< GLuint 252}; 253 254//! Command that corresponds to glBindAttribLocation. 255struct BindAttribLocation { 256 static const CommandId kCmdId = 258; 257 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 264}; 265 266//! Immediate version of command that corresponds to glBindAttribLocation. 267struct BindAttribLocationImmediate { 268 static const CommandId kCmdId = 259; 269 270 CommandHeader header; 271 uint32 program; //!< GLuint 272 uint32 index; //!< GLuint 273 uint32 data_size; //!< uint32 274}; 275 276//! Bucket version of command that corresponds to glBindAttribLocation. 277struct BindAttribLocationBucket { 278 static const CommandId kCmdId = 432; 279 280 CommandHeader header; 281 uint32 program; //!< GLuint 282 uint32 index; //!< GLuint 283 uint32 name_bucket_id; //!< uint32 284}; 285 286//! Command that corresponds to glBindBuffer. 287struct BindBuffer { 288 static const CommandId kCmdId = 260; 289 290 CommandHeader header; 291 uint32 target; //!< GLenum 292 uint32 buffer; //!< GLuint 293}; 294 295//! Command that corresponds to glBindFramebuffer. 296struct BindFramebuffer { 297 static const CommandId kCmdId = 261; 298 299 CommandHeader header; 300 uint32 target; //!< GLenum 301 uint32 framebuffer; //!< GLuint 302}; 303 304//! Command that corresponds to glBindRenderbuffer. 305struct BindRenderbuffer { 306 static const CommandId kCmdId = 262; 307 308 CommandHeader header; 309 uint32 target; //!< GLenum 310 uint32 renderbuffer; //!< GLuint 311}; 312 313//! Command that corresponds to glBindTexture. 314struct BindTexture { 315 static const CommandId kCmdId = 263; 316 317 CommandHeader header; 318 uint32 target; //!< GLenum 319 uint32 texture; //!< GLuint 320}; 321 322//! Command that corresponds to glBlendColor. 323struct BlendColor { 324 static const CommandId kCmdId = 264; 325 326 CommandHeader header; 327 float red; //!< GLclampf 328 float green; //!< GLclampf 329 float blue; //!< GLclampf 330 float alpha; //!< GLclampf 331}; 332 333//! Command that corresponds to glBlendEquation. 334struct BlendEquation { 335 static const CommandId kCmdId = 265; 336 337 CommandHeader header; 338 uint32 mode; //!< GLenum 339}; 340 341//! Command that corresponds to glBlendEquationSeparate. 342struct BlendEquationSeparate { 343 static const CommandId kCmdId = 266; 344 345 CommandHeader header; 346 uint32 modeRGB; //!< GLenum 347 uint32 modeAlpha; //!< GLenum 348}; 349 350//! Command that corresponds to glBlendFunc. 351struct BlendFunc { 352 static const CommandId kCmdId = 267; 353 354 CommandHeader header; 355 uint32 sfactor; //!< GLenum 356 uint32 dfactor; //!< GLenum 357}; 358 359//! Command that corresponds to glBlendFuncSeparate. 360struct BlendFuncSeparate { 361 static const CommandId kCmdId = 268; 362 363 CommandHeader header; 364 uint32 srcRGB; //!< GLenum 365 uint32 dstRGB; //!< GLenum 366 uint32 srcAlpha; //!< GLenum 367 uint32 dstAlpha; //!< GLenum 368}; 369 370//! Command that corresponds to glBufferData. 371struct BufferData { 372 static const CommandId kCmdId = 269; 373 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 380}; 381 382//! Immediate version of command that corresponds to glBufferData. 383struct BufferDataImmediate { 384 static const CommandId kCmdId = 270; 385 386 CommandHeader header; 387 uint32 target; //!< GLenum 388 int32 size; //!< GLsizeiptr 389 uint32 usage; //!< GLenum 390}; 391 392//! Command that corresponds to glBufferSubData. 393struct BufferSubData { 394 static const CommandId kCmdId = 271; 395 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 402}; 403 404//! Immediate version of command that corresponds to glBufferSubData. 405struct BufferSubDataImmediate { 406 static const CommandId kCmdId = 272; 407 408 CommandHeader header; 409 uint32 target; //!< GLenum 410 int32 offset; //!< GLintptr 411 int32 size; //!< GLsizeiptr 412}; 413 414//! Command that corresponds to glCheckFramebufferStatus. 415struct CheckFramebufferStatus { 416 static const CommandId kCmdId = 273; 417 418 typedef GLenum Result; 419 420 CommandHeader header; 421 uint32 target; //!< GLenum 422 uint32 result_shm_id; //!< uint32 423 uint32 result_shm_offset; //!< uint32 424}; 425 426//! Command that corresponds to glClear. 427struct Clear { 428 static const CommandId kCmdId = 274; 429 430 CommandHeader header; 431 uint32 mask; //!< GLbitfield 432}; 433 434//! Command that corresponds to glClearColor. 435struct ClearColor { 436 static const CommandId kCmdId = 275; 437 438 CommandHeader header; 439 float red; //!< GLclampf 440 float green; //!< GLclampf 441 float blue; //!< GLclampf 442 float alpha; //!< GLclampf 443}; 444 445//! Command that corresponds to glClearDepthf. 446struct ClearDepthf { 447 static const CommandId kCmdId = 276; 448 449 CommandHeader header; 450 float depth; //!< GLclampf 451}; 452 453//! Command that corresponds to glClearStencil. 454struct ClearStencil { 455 static const CommandId kCmdId = 277; 456 457 CommandHeader header; 458 int32 s; //!< GLint 459}; 460 461//! Command that corresponds to glColorMask. 462struct ColorMask { 463 static const CommandId kCmdId = 278; 464 465 CommandHeader header; 466 uint32 red; //!< GLboolean 467 uint32 green; //!< GLboolean 468 uint32 blue; //!< GLboolean 469 uint32 alpha; //!< GLboolean 470}; 471 472//! Command that corresponds to glCompileShader. 473struct CompileShader { 474 static const CommandId kCmdId = 279; 475 476 CommandHeader header; 477 uint32 shader; //!< GLuint 478}; 479 480//! Command that corresponds to glCompressedTexImage2D. 481struct CompressedTexImage2D { 482 static const CommandId kCmdId = 280; 483 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 494}; 495 496//! Immediate version of command that corresponds to glCompressedTexImage2D. 497struct CompressedTexImage2DImmediate { 498 static const CommandId kCmdId = 281; 499 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 508}; 509 510//! Bucket version of command that corresponds to glCompressedTexImage2D. 511struct CompressedTexImage2DBucket { 512 static const CommandId kCmdId = 443; 513 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 522}; 523 524//! Command that corresponds to glCompressedTexSubImage2D. 525struct CompressedTexSubImage2D { 526 static const CommandId kCmdId = 282; 527 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 539}; 540 541//! Immediate version of command that corresponds to glCompressedTexSubImage2D. 542struct CompressedTexSubImage2DImmediate { 543 static const CommandId kCmdId = 283; 544 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 554}; 555 556//! Bucket version of command that corresponds to glCompressedTexSubImage2D. 557struct CompressedTexSubImage2DBucket { 558 static const CommandId kCmdId = 444; 559 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 569}; 570 571//! Command that corresponds to glCopyTexImage2D. 572struct CopyTexImage2D { 573 static const CommandId kCmdId = 284; 574 575 CommandHeader header; 576 uint32 target; //!< GLenum 577 int32 level; //!< GLint 578 uint32 internalformat; //!< GLenum 579 int32 x; //!< GLint 580 int32 y; //!< GLint 581 int32 width; //!< GLsizei 582 int32 height; //!< GLsizei 583 int32 border; //!< GLint 584}; 585 586//! Command that corresponds to glCopyTexSubImage2D. 587struct CopyTexSubImage2D { 588 static const CommandId kCmdId = 285; 589 590 CommandHeader header; 591 uint32 target; //!< GLenum 592 int32 level; //!< GLint 593 int32 xoffset; //!< GLint 594 int32 yoffset; //!< GLint 595 int32 x; //!< GLint 596 int32 y; //!< GLint 597 int32 width; //!< GLsizei 598 int32 height; //!< GLsizei 599}; 600 601//! Command that corresponds to glCreateProgram. 602struct CreateProgram { 603 static const CommandId kCmdId = 286; 604 605 CommandHeader header; 606 uint32 client_id; //!< uint32 607}; 608 609//! Command that corresponds to glCreateShader. 610struct CreateShader { 611 static const CommandId kCmdId = 287; 612 613 CommandHeader header; 614 uint32 type; //!< GLenum 615 uint32 client_id; //!< uint32 616}; 617 618//! Command that corresponds to glCullFace. 619struct CullFace { 620 static const CommandId kCmdId = 288; 621 622 CommandHeader header; 623 uint32 mode; //!< GLenum 624}; 625 626//! Command that corresponds to glDeleteBuffers. 627struct DeleteBuffers { 628 static const CommandId kCmdId = 289; 629 630 CommandHeader header; 631 int32 n; //!< GLsizei 632 uint32 buffers_shm_id; //!< uint32 633 uint32 buffers_shm_offset; //!< uint32 634}; 635 636//! Immediate version of command that corresponds to glDeleteBuffers. 637struct DeleteBuffersImmediate { 638 static const CommandId kCmdId = 290; 639 640 CommandHeader header; 641 int32 n; //!< GLsizei 642}; 643 644//! Command that corresponds to glDeleteFramebuffers. 645struct DeleteFramebuffers { 646 static const CommandId kCmdId = 291; 647 648 CommandHeader header; 649 int32 n; //!< GLsizei 650 uint32 framebuffers_shm_id; //!< uint32 651 uint32 framebuffers_shm_offset; //!< uint32 652}; 653 654//! Immediate version of command that corresponds to glDeleteFramebuffers. 655struct DeleteFramebuffersImmediate { 656 static const CommandId kCmdId = 292; 657 658 CommandHeader header; 659 int32 n; //!< GLsizei 660}; 661 662//! Command that corresponds to glDeleteProgram. 663struct DeleteProgram { 664 static const CommandId kCmdId = 293; 665 666 CommandHeader header; 667 uint32 program; //!< GLuint 668}; 669 670//! Command that corresponds to glDeleteRenderbuffers. 671struct DeleteRenderbuffers { 672 static const CommandId kCmdId = 294; 673 674 CommandHeader header; 675 int32 n; //!< GLsizei 676 uint32 renderbuffers_shm_id; //!< uint32 677 uint32 renderbuffers_shm_offset; //!< uint32 678}; 679 680//! Immediate version of command that corresponds to glDeleteRenderbuffers. 681struct DeleteRenderbuffersImmediate { 682 static const CommandId kCmdId = 295; 683 684 CommandHeader header; 685 int32 n; //!< GLsizei 686}; 687 688//! Command that corresponds to glDeleteShader. 689struct DeleteShader { 690 static const CommandId kCmdId = 296; 691 692 CommandHeader header; 693 uint32 shader; //!< GLuint 694}; 695 696//! Command that corresponds to glDeleteTextures. 697struct DeleteTextures { 698 static const CommandId kCmdId = 297; 699 700 CommandHeader header; 701 int32 n; //!< GLsizei 702 uint32 textures_shm_id; //!< uint32 703 uint32 textures_shm_offset; //!< uint32 704}; 705 706//! Immediate version of command that corresponds to glDeleteTextures. 707struct DeleteTexturesImmediate { 708 static const CommandId kCmdId = 298; 709 710 CommandHeader header; 711 int32 n; //!< GLsizei 712}; 713 714//! Command that corresponds to glDepthFunc. 715struct DepthFunc { 716 static const CommandId kCmdId = 299; 717 718 CommandHeader header; 719 uint32 func; //!< GLenum 720}; 721 722//! Command that corresponds to glDepthMask. 723struct DepthMask { 724 static const CommandId kCmdId = 300; 725 726 CommandHeader header; 727 uint32 flag; //!< GLboolean 728}; 729 730//! Command that corresponds to glDepthRangef. 731struct DepthRangef { 732 static const CommandId kCmdId = 301; 733 734 CommandHeader header; 735 float zNear; //!< GLclampf 736 float zFar; //!< GLclampf 737}; 738 739//! Command that corresponds to glDetachShader. 740struct DetachShader { 741 static const CommandId kCmdId = 302; 742 743 CommandHeader header; 744 uint32 program; //!< GLuint 745 uint32 shader; //!< GLuint 746}; 747 748//! Command that corresponds to glDisable. 749struct Disable { 750 static const CommandId kCmdId = 303; 751 752 CommandHeader header; 753 uint32 cap; //!< GLenum 754}; 755 756//! Command that corresponds to glDisableVertexAttribArray. 757struct DisableVertexAttribArray { 758 static const CommandId kCmdId = 304; 759 760 CommandHeader header; 761 uint32 index; //!< GLuint 762}; 763 764//! Command that corresponds to glDrawArrays. 765struct DrawArrays { 766 static const CommandId kCmdId = 305; 767 768 CommandHeader header; 769 uint32 mode; //!< GLenum 770 int32 first; //!< GLint 771 int32 count; //!< GLsizei 772}; 773 774//! Command that corresponds to glDrawElements. 775struct DrawElements { 776 static const CommandId kCmdId = 306; 777 778 CommandHeader header; 779 uint32 mode; //!< GLenum 780 int32 count; //!< GLsizei 781 uint32 type; //!< GLenum 782 uint32 index_offset; //!< GLuint 783}; 784 785//! Command that corresponds to glEnable. 786struct Enable { 787 static const CommandId kCmdId = 307; 788 789 CommandHeader header; 790 uint32 cap; //!< GLenum 791}; 792 793//! Command that corresponds to glEnableVertexAttribArray. 794struct EnableVertexAttribArray { 795 static const CommandId kCmdId = 308; 796 797 CommandHeader header; 798 uint32 index; //!< GLuint 799}; 800 801//! Command that corresponds to glFinish. 802struct Finish { 803 static const CommandId kCmdId = 309; 804 805 CommandHeader header; 806}; 807 808//! Command that corresponds to glFlush. 809struct Flush { 810 static const CommandId kCmdId = 310; 811 812 CommandHeader header; 813}; 814 815//! Command that corresponds to glFramebufferRenderbuffer. 816struct FramebufferRenderbuffer { 817 static const CommandId kCmdId = 311; 818 819 CommandHeader header; 820 uint32 target; //!< GLenum 821 uint32 attachment; //!< GLenum 822 uint32 renderbuffertarget; //!< GLenum 823 uint32 renderbuffer; //!< GLuint 824}; 825 826//! Command that corresponds to glFramebufferTexture2D. 827struct FramebufferTexture2D { 828 static const CommandId kCmdId = 312; 829 830 CommandHeader header; 831 uint32 target; //!< GLenum 832 uint32 attachment; //!< GLenum 833 uint32 textarget; //!< GLenum 834 uint32 texture; //!< GLuint 835 int32 level; //!< GLint 836}; 837 838//! Command that corresponds to glFrontFace. 839struct FrontFace { 840 static const CommandId kCmdId = 313; 841 842 CommandHeader header; 843 uint32 mode; //!< GLenum 844}; 845 846//! Command that corresponds to glGenBuffers. 847struct GenBuffers { 848 static const CommandId kCmdId = 314; 849 850 CommandHeader header; 851 int32 n; //!< GLsizei 852 uint32 buffers_shm_id; //!< uint32 853 uint32 buffers_shm_offset; //!< uint32 854}; 855 856//! Immediate version of command that corresponds to glGenBuffers. 857struct GenBuffersImmediate { 858 static const CommandId kCmdId = 315; 859 860 CommandHeader header; 861 int32 n; //!< GLsizei 862}; 863 864//! Command that corresponds to glGenerateMipmap. 865struct GenerateMipmap { 866 static const CommandId kCmdId = 316; 867 868 CommandHeader header; 869 uint32 target; //!< GLenum 870}; 871 872//! Command that corresponds to glGenFramebuffers. 873struct GenFramebuffers { 874 static const CommandId kCmdId = 317; 875 876 CommandHeader header; 877 int32 n; //!< GLsizei 878 uint32 framebuffers_shm_id; //!< uint32 879 uint32 framebuffers_shm_offset; //!< uint32 880}; 881 882//! Immediate version of command that corresponds to glGenFramebuffers. 883struct GenFramebuffersImmediate { 884 static const CommandId kCmdId = 318; 885 886 CommandHeader header; 887 int32 n; //!< GLsizei 888}; 889 890//! Command that corresponds to glGenRenderbuffers. 891struct GenRenderbuffers { 892 static const CommandId kCmdId = 319; 893 894 CommandHeader header; 895 int32 n; //!< GLsizei 896 uint32 renderbuffers_shm_id; //!< uint32 897 uint32 renderbuffers_shm_offset; //!< uint32 898}; 899 900//! Immediate version of command that corresponds to glGenRenderbuffers. 901struct GenRenderbuffersImmediate { 902 static const CommandId kCmdId = 320; 903 904 CommandHeader header; 905 int32 n; //!< GLsizei 906}; 907 908//! Command that corresponds to glGenTextures. 909struct GenTextures { 910 static const CommandId kCmdId = 321; 911 912 CommandHeader header; 913 int32 n; //!< GLsizei 914 uint32 textures_shm_id; //!< uint32 915 uint32 textures_shm_offset; //!< uint32 916}; 917 918//! Immediate version of command that corresponds to glGenTextures. 919struct GenTexturesImmediate { 920 static const CommandId kCmdId = 322; 921 922 CommandHeader header; 923 int32 n; //!< GLsizei 924}; 925 926//! Command that corresponds to glGetActiveAttrib. 927struct GetActiveAttrib { 928 static const CommandId kCmdId = 323; 929 930 struct Result { 931 int32 success; 932 int32 size; 933 uint32 type; 934 }; 935 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 942}; 943 944//! Command that corresponds to glGetActiveUniform. 945struct GetActiveUniform { 946 static const CommandId kCmdId = 324; 947 948 struct Result { 949 int32 success; 950 int32 size; 951 uint32 type; 952 }; 953 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 960}; 961 962//! Command that corresponds to glGetAttachedShaders. 963struct GetAttachedShaders { 964 static const CommandId kCmdId = 325; 965 966 typedef SizedResult<GLuint> Result; 967 968 CommandHeader header; 969 uint32 program; //!< GLuint 970 uint32 result_shm_id; //!< uint32 971 uint32 result_shm_offset; //!< uint32 972 uint32 result_size; //!< uint32 973}; 974 975//! Command that corresponds to glGetAttribLocation. 976struct GetAttribLocation { 977 static const CommandId kCmdId = 326; 978 979 typedef GLint Result; 980 981 CommandHeader header; 982 uint32 program; 983 uint32 name_shm_id; 984 uint32 name_shm_offset; 985 uint32 location_shm_id; 986 uint32 location_shm_offset; 987 uint32 data_size; 988}; 989 990//! Immediate version of command that corresponds to glGetAttribLocation. 991struct GetAttribLocationImmediate { 992 static const CommandId kCmdId = 327; 993 994 typedef GLint Result; 995 996 CommandHeader header; 997 uint32 program; 998 uint32 location_shm_id; 999 uint32 location_shm_offset; 1000 uint32 data_size; 1001}; 1002 1003//! Bucket version of command that corresponds to glGetAttribLocation. 1004struct GetAttribLocationBucket { 1005 static const CommandId kCmdId = 434; 1006 1007 typedef GLint Result; 1008 1009 CommandHeader header; 1010 uint32 program; 1011 uint32 name_bucket_id; 1012 uint32 location_shm_id; 1013 uint32 location_shm_offset; 1014}; 1015 1016//! Command that corresponds to glGetBooleanv. 1017struct GetBooleanv { 1018 static const CommandId kCmdId = 328; 1019 1020 typedef SizedResult<GLboolean> Result; 1021 1022 CommandHeader header; 1023 uint32 pname; //!< GLenum 1024 uint32 params_shm_id; //!< uint32 1025 uint32 params_shm_offset; //!< uint32 1026}; 1027 1028//! Command that corresponds to glGetBufferParameteriv. 1029struct GetBufferParameteriv { 1030 static const CommandId kCmdId = 329; 1031 1032 typedef SizedResult<GLint> Result; 1033 1034 CommandHeader header; 1035 uint32 target; //!< GLenum 1036 uint32 pname; //!< GLenum 1037 uint32 params_shm_id; //!< uint32 1038 uint32 params_shm_offset; //!< uint32 1039}; 1040 1041//! Command that corresponds to glGetError. 1042struct GetError { 1043 static const CommandId kCmdId = 330; 1044 1045 typedef GLenum Result; 1046 1047 CommandHeader header; 1048 uint32 result_shm_id; //!< uint32 1049 uint32 result_shm_offset; //!< uint32 1050}; 1051 1052//! Command that corresponds to glGetFloatv. 1053struct GetFloatv { 1054 static const CommandId kCmdId = 331; 1055 1056 typedef SizedResult<GLfloat> Result; 1057 1058 CommandHeader header; 1059 uint32 pname; //!< GLenum 1060 uint32 params_shm_id; //!< uint32 1061 uint32 params_shm_offset; //!< uint32 1062}; 1063 1064//! Command that corresponds to glGetFramebufferAttachmentParameteriv. 1065struct GetFramebufferAttachmentParameteriv { 1066 static const CommandId kCmdId = 332; 1067 1068 typedef SizedResult<GLint> Result; 1069 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 1076}; 1077 1078//! Command that corresponds to glGetIntegerv. 1079struct GetIntegerv { 1080 static const CommandId kCmdId = 333; 1081 1082 typedef SizedResult<GLint> Result; 1083 1084 CommandHeader header; 1085 uint32 pname; //!< GLenum 1086 uint32 params_shm_id; //!< uint32 1087 uint32 params_shm_offset; //!< uint32 1088}; 1089 1090//! Command that corresponds to glGetProgramiv. 1091struct GetProgramiv { 1092 static const CommandId kCmdId = 334; 1093 1094 typedef SizedResult<GLint> Result; 1095 1096 CommandHeader header; 1097 uint32 program; //!< GLuint 1098 uint32 pname; //!< GLenum 1099 uint32 params_shm_id; //!< uint32 1100 uint32 params_shm_offset; //!< uint32 1101}; 1102 1103//! Command that corresponds to glGetProgramInfoLog. 1104struct GetProgramInfoLog { 1105 static const CommandId kCmdId = 335; 1106 1107 CommandHeader header; 1108 uint32 program; //!< GLuint 1109 uint32 bucket_id; //!< uint32 1110}; 1111 1112//! Command that corresponds to glGetRenderbufferParameteriv. 1113struct GetRenderbufferParameteriv { 1114 static const CommandId kCmdId = 336; 1115 1116 typedef SizedResult<GLint> Result; 1117 1118 CommandHeader header; 1119 uint32 target; //!< GLenum 1120 uint32 pname; //!< GLenum 1121 uint32 params_shm_id; //!< uint32 1122 uint32 params_shm_offset; //!< uint32 1123}; 1124 1125//! Command that corresponds to glGetShaderiv. 1126struct GetShaderiv { 1127 static const CommandId kCmdId = 337; 1128 1129 typedef SizedResult<GLint> Result; 1130 1131 CommandHeader header; 1132 uint32 shader; //!< GLuint 1133 uint32 pname; //!< GLenum 1134 uint32 params_shm_id; //!< uint32 1135 uint32 params_shm_offset; //!< uint32 1136}; 1137 1138//! Command that corresponds to glGetShaderInfoLog. 1139struct GetShaderInfoLog { 1140 static const CommandId kCmdId = 338; 1141 1142 CommandHeader header; 1143 uint32 shader; //!< GLuint 1144 uint32 bucket_id; //!< uint32 1145}; 1146 1147//! Command that corresponds to glGetShaderPrecisionFormat. 1148struct GetShaderPrecisionFormat { 1149 static const CommandId kCmdId = 339; 1150 1151 struct Result { 1152 int32 success; 1153 int32 min_range; 1154 int32 max_range; 1155 int32 precision; 1156 }; 1157 1158 CommandHeader header; 1159 uint32 shadertype; //!< GLenum 1160 uint32 precisiontype; //!< GLenum 1161 uint32 result_shm_id; //!< uint32 1162 uint32 result_shm_offset; //!< uint32 1163}; 1164 1165//! Command that corresponds to glGetShaderSource. 1166struct GetShaderSource { 1167 static const CommandId kCmdId = 340; 1168 1169 CommandHeader header; 1170 uint32 shader; //!< GLuint 1171 uint32 bucket_id; //!< uint32 1172}; 1173 1174//! Command that corresponds to glGetString. 1175struct GetString { 1176 static const CommandId kCmdId = 341; 1177 1178 CommandHeader header; 1179 uint32 name; //!< GLenum 1180 uint32 bucket_id; //!< uint32 1181}; 1182 1183//! Command that corresponds to glGetTexParameterfv. 1184struct GetTexParameterfv { 1185 static const CommandId kCmdId = 342; 1186 1187 typedef SizedResult<GLfloat> Result; 1188 1189 CommandHeader header; 1190 uint32 target; //!< GLenum 1191 uint32 pname; //!< GLenum 1192 uint32 params_shm_id; //!< uint32 1193 uint32 params_shm_offset; //!< uint32 1194}; 1195 1196//! Command that corresponds to glGetTexParameteriv. 1197struct GetTexParameteriv { 1198 static const CommandId kCmdId = 343; 1199 1200 typedef SizedResult<GLint> Result; 1201 1202 CommandHeader header; 1203 uint32 target; //!< GLenum 1204 uint32 pname; //!< GLenum 1205 uint32 params_shm_id; //!< uint32 1206 uint32 params_shm_offset; //!< uint32 1207}; 1208 1209//! Command that corresponds to glGetUniformLocation. 1210struct GetUniformLocation { 1211 static const CommandId kCmdId = 346; 1212 1213 typedef GLint Result; 1214 1215 CommandHeader header; 1216 uint32 program; 1217 uint32 name_shm_id; 1218 uint32 name_shm_offset; 1219 uint32 location_shm_id; 1220 uint32 location_shm_offset; 1221 uint32 data_size; 1222}; 1223 1224//! Immediate version of command that corresponds to glGetUniformLocation. 1225struct GetUniformLocationImmediate { 1226 static const CommandId kCmdId = 347; 1227 1228 typedef GLint Result; 1229 1230 CommandHeader header; 1231 uint32 program; 1232 uint32 location_shm_id; 1233 uint32 location_shm_offset; 1234 uint32 data_size; 1235}; 1236 1237//! Bucket version of command that corresponds to glGetUniformLocation. 1238struct GetUniformLocationBucket { 1239 static const CommandId kCmdId = 433; 1240 1241 typedef GLint Result; 1242 1243 CommandHeader header; 1244 uint32 program; 1245 uint32 name_bucket_id; 1246 uint32 location_shm_id; 1247 uint32 location_shm_offset; 1248}; 1249 1250 1251//! Command that corresponds to glGetUniformfv. 1252struct GetUniformfv { 1253 static const CommandId kCmdId = 344; 1254 1255 typedef SizedResult<GLfloat> Result; 1256 1257 CommandHeader header; 1258 uint32 program; //!< GLuint 1259 int32 location; //!< GLint 1260 uint32 params_shm_id; //!< uint32 1261 uint32 params_shm_offset; //!< uint32 1262}; 1263 1264//! Command that corresponds to glGetUniformiv. 1265struct GetUniformiv { 1266 static const CommandId kCmdId = 345; 1267 1268 typedef SizedResult<GLint> Result; 1269 1270 CommandHeader header; 1271 uint32 program; //!< GLuint 1272 int32 location; //!< GLint 1273 uint32 params_shm_id; //!< uint32 1274 uint32 params_shm_offset; //!< uint32 1275}; 1276 1277//! Command that corresponds to glGetVertexAttribfv. 1278struct GetVertexAttribfv { 1279 static const CommandId kCmdId = 348; 1280 1281 typedef SizedResult<GLfloat> Result; 1282 1283 CommandHeader header; 1284 uint32 index; //!< GLuint 1285 uint32 pname; //!< GLenum 1286 uint32 params_shm_id; //!< uint32 1287 uint32 params_shm_offset; //!< uint32 1288}; 1289 1290//! Command that corresponds to glGetVertexAttribiv. 1291struct GetVertexAttribiv { 1292 static const CommandId kCmdId = 349; 1293 1294 typedef SizedResult<GLint> Result; 1295 1296 CommandHeader header; 1297 uint32 index; //!< GLuint 1298 uint32 pname; //!< GLenum 1299 uint32 params_shm_id; //!< uint32 1300 uint32 params_shm_offset; //!< uint32 1301}; 1302 1303//! Command that corresponds to glGetVertexAttribPointerv. 1304struct GetVertexAttribPointerv { 1305 static const CommandId kCmdId = 350; 1306 1307 typedef SizedResult<GLuint> Result; 1308 1309 CommandHeader header; 1310 uint32 index; //!< GLuint 1311 uint32 pname; //!< GLenum 1312 uint32 pointer_shm_id; //!< uint32 1313 uint32 pointer_shm_offset; //!< uint32 1314}; 1315 1316//! Command that corresponds to glHint. 1317struct Hint { 1318 static const CommandId kCmdId = 351; 1319 1320 CommandHeader header; 1321 uint32 target; //!< GLenum 1322 uint32 mode; //!< GLenum 1323}; 1324 1325//! Command that corresponds to glIsBuffer. 1326struct IsBuffer { 1327 static const CommandId kCmdId = 352; 1328 1329 typedef uint32 Result; 1330 1331 CommandHeader header; 1332 uint32 buffer; //!< GLuint 1333 uint32 result_shm_id; //!< uint32 1334 uint32 result_shm_offset; //!< uint32 1335}; 1336 1337//! Command that corresponds to glIsEnabled. 1338struct IsEnabled { 1339 static const CommandId kCmdId = 353; 1340 1341 typedef uint32 Result; 1342 1343 CommandHeader header; 1344 uint32 cap; //!< GLenum 1345 uint32 result_shm_id; //!< uint32 1346 uint32 result_shm_offset; //!< uint32 1347}; 1348 1349//! Command that corresponds to glIsFramebuffer. 1350struct IsFramebuffer { 1351 static const CommandId kCmdId = 354; 1352 1353 typedef uint32 Result; 1354 1355 CommandHeader header; 1356 uint32 framebuffer; //!< GLuint 1357 uint32 result_shm_id; //!< uint32 1358 uint32 result_shm_offset; //!< uint32 1359}; 1360 1361//! Command that corresponds to glIsProgram. 1362struct IsProgram { 1363 static const CommandId kCmdId = 355; 1364 1365 typedef uint32 Result; 1366 1367 CommandHeader header; 1368 uint32 program; //!< GLuint 1369 uint32 result_shm_id; //!< uint32 1370 uint32 result_shm_offset; //!< uint32 1371}; 1372 1373//! Command that corresponds to glIsRenderbuffer. 1374struct IsRenderbuffer { 1375 static const CommandId kCmdId = 356; 1376 1377 typedef uint32 Result; 1378 1379 CommandHeader header; 1380 uint32 renderbuffer; //!< GLuint 1381 uint32 result_shm_id; //!< uint32 1382 uint32 result_shm_offset; //!< uint32 1383}; 1384 1385//! Command that corresponds to glIsShader. 1386struct IsShader { 1387 static const CommandId kCmdId = 357; 1388 1389 typedef uint32 Result; 1390 1391 CommandHeader header; 1392 uint32 shader; //!< GLuint 1393 uint32 result_shm_id; //!< uint32 1394 uint32 result_shm_offset; //!< uint32 1395}; 1396 1397//! Command that corresponds to glIsTexture. 1398struct IsTexture { 1399 static const CommandId kCmdId = 358; 1400 1401 typedef uint32 Result; 1402 1403 CommandHeader header; 1404 uint32 texture; //!< GLuint 1405 uint32 result_shm_id; //!< uint32 1406 uint32 result_shm_offset; //!< uint32 1407}; 1408 1409//! Command that corresponds to glLineWidth. 1410struct LineWidth { 1411 static const CommandId kCmdId = 359; 1412 1413 CommandHeader header; 1414 float width; //!< GLfloat 1415}; 1416 1417//! Command that corresponds to glLinkProgram. 1418struct LinkProgram { 1419 static const CommandId kCmdId = 360; 1420 1421 CommandHeader header; 1422 uint32 program; //!< GLuint 1423}; 1424 1425//! Command that corresponds to glPixelStorei. 1426struct PixelStorei { 1427 static const CommandId kCmdId = 361; 1428 1429 CommandHeader header; 1430 uint32 pname; //!< GLenum 1431 int32 param; //!< GLint 1432}; 1433 1434//! Command that corresponds to glPolygonOffset. 1435struct PolygonOffset { 1436 static const CommandId kCmdId = 362; 1437 1438 CommandHeader header; 1439 float factor; //!< GLfloat 1440 float units; //!< GLfloat 1441}; 1442 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. 1447struct ReadPixels { 1448 static const CommandId kCmdId = 363; 1449 1450 typedef uint32 Result; 1451 1452 CommandHeader header; 1453 int32 x; //!< GLint 1454 int32 y; //!< GLint 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 1463}; 1464 1465//! Command that corresponds to glReleaseShaderCompiler. 1466struct ReleaseShaderCompiler { 1467 static const CommandId kCmdId = 437; 1468 1469 CommandHeader header; 1470}; 1471 1472//! Command that corresponds to glRenderbufferStorage. 1473struct RenderbufferStorage { 1474 static const CommandId kCmdId = 364; 1475 1476 CommandHeader header; 1477 uint32 target; //!< GLenum 1478 uint32 internalformat; //!< GLenum 1479 int32 width; //!< GLsizei 1480 int32 height; //!< GLsizei 1481}; 1482 1483//! Command that corresponds to glSampleCoverage. 1484struct SampleCoverage { 1485 static const CommandId kCmdId = 365; 1486 1487 CommandHeader header; 1488 float value; //!< GLclampf 1489 uint32 invert; //!< GLboolean 1490}; 1491 1492//! Command that corresponds to glScissor. 1493struct Scissor { 1494 static const CommandId kCmdId = 366; 1495 1496 CommandHeader header; 1497 int32 x; //!< GLint 1498 int32 y; //!< GLint 1499 int32 width; //!< GLsizei 1500 int32 height; //!< GLsizei 1501}; 1502 1503//! Command that corresponds to glShaderBinary. 1504struct ShaderBinary { 1505 static const CommandId kCmdId = 436; 1506 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 1515}; 1516 1517//! Command that corresponds to glShaderSource. 1518struct ShaderSource { 1519 static const CommandId kCmdId = 367; 1520 1521 CommandHeader header; 1522 uint32 shader; //!< GLuint 1523 uint32 data_shm_id; //!< uint32 1524 uint32 data_shm_offset; //!< uint32 1525 uint32 data_size; //!< uint32 1526}; 1527 1528//! Immediate version of command that corresponds to glShaderSource. 1529struct ShaderSourceImmediate { 1530 static const CommandId kCmdId = 368; 1531 1532 CommandHeader header; 1533 uint32 shader; //!< GLuint 1534 uint32 data_size; //!< uint32 1535}; 1536 1537//! Bucket version of command that corresponds to glShaderSource. 1538struct ShaderSourceBucket { 1539 static const CommandId kCmdId = 435; 1540 1541 CommandHeader header; 1542 uint32 shader; //!< GLuint 1543 uint32 data_bucket_id; //!< uint32 1544}; 1545 1546//! Command that corresponds to glStencilFunc. 1547struct StencilFunc { 1548 static const CommandId kCmdId = 369; 1549 1550 CommandHeader header; 1551 uint32 func; //!< GLenum 1552 int32 ref; //!< GLint 1553 uint32 mask; //!< GLuint 1554}; 1555 1556//! Command that corresponds to glStencilFuncSeparate. 1557struct StencilFuncSeparate { 1558 static const CommandId kCmdId = 370; 1559 1560 CommandHeader header; 1561 uint32 face; //!< GLenum 1562 uint32 func; //!< GLenum 1563 int32 ref; //!< GLint 1564 uint32 mask; //!< GLuint 1565}; 1566 1567//! Command that corresponds to glStencilMask. 1568struct StencilMask { 1569 static const CommandId kCmdId = 371; 1570 1571 CommandHeader header; 1572 uint32 mask; //!< GLuint 1573}; 1574 1575//! Command that corresponds to glStencilMaskSeparate. 1576struct StencilMaskSeparate { 1577 static const CommandId kCmdId = 372; 1578 1579 CommandHeader header; 1580 uint32 face; //!< GLenum 1581 uint32 mask; //!< GLuint 1582}; 1583 1584//! Command that corresponds to glStencilOp. 1585struct StencilOp { 1586 static const CommandId kCmdId = 373; 1587 1588 CommandHeader header; 1589 uint32 fail; //!< GLenum 1590 uint32 zfail; //!< GLenum 1591 uint32 zpass; //!< GLenum 1592}; 1593 1594//! Command that corresponds to glStencilOpSeparate. 1595struct StencilOpSeparate { 1596 static const CommandId kCmdId = 374; 1597 1598 CommandHeader header; 1599 uint32 face; //!< GLenum 1600 uint32 fail; //!< GLenum 1601 uint32 zfail; //!< GLenum 1602 uint32 zpass; //!< GLenum 1603}; 1604 1605//! Command that corresponds to glTexImage2D. 1606struct TexImage2D { 1607 static const CommandId kCmdId = 375; 1608 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 1620}; 1621 1622//! Immediate version of command that corresponds to glTexImage2D. 1623struct TexImage2DImmediate { 1624 static const CommandId kCmdId = 376; 1625 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 1635}; 1636 1637//! Command that corresponds to glTexParameterf. 1638struct TexParameterf { 1639 static const CommandId kCmdId = 377; 1640 1641 CommandHeader header; 1642 uint32 target; //!< GLenum 1643 uint32 pname; //!< GLenum 1644 float param; //!< GLfloat 1645}; 1646 1647//! Command that corresponds to glTexParameterfv. 1648struct TexParameterfv { 1649 static const CommandId kCmdId = 378; 1650 1651 CommandHeader header; 1652 uint32 target; //!< GLenum 1653 uint32 pname; //!< GLenum 1654 uint32 params_shm_id; //!< uint32 1655 uint32 params_shm_offset; //!< uint32 1656}; 1657 1658//! Immediate version of command that corresponds to glTexParameterfv. 1659struct TexParameterfvImmediate { 1660 static const CommandId kCmdId = 379; 1661 1662 CommandHeader header; 1663 uint32 target; //!< GLenum 1664 uint32 pname; //!< GLenum 1665}; 1666 1667//! Command that corresponds to glTexParameteri. 1668struct TexParameteri { 1669 static const CommandId kCmdId = 380; 1670 1671 CommandHeader header; 1672 uint32 target; //!< GLenum 1673 uint32 pname; //!< GLenum 1674 int32 param; //!< GLint 1675}; 1676 1677//! Command that corresponds to glTexParameteriv. 1678struct TexParameteriv { 1679 static const CommandId kCmdId = 381; 1680 1681 CommandHeader header; 1682 uint32 target; //!< GLenum 1683 uint32 pname; //!< GLenum 1684 uint32 params_shm_id; //!< uint32 1685 uint32 params_shm_offset; //!< uint32 1686}; 1687 1688//! Immediate version of command that corresponds to glTexParameteriv. 1689struct TexParameterivImmediate { 1690 static const CommandId kCmdId = 382; 1691 1692 CommandHeader header; 1693 uint32 target; //!< GLenum 1694 uint32 pname; //!< GLenum 1695}; 1696 1697//! Command that corresponds to glTexSubImage2D. 1698struct TexSubImage2D { 1699 static const CommandId kCmdId = 383; 1700 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 1712}; 1713 1714//! Immediate version of command that corresponds to glTexSubImage2D. 1715struct TexSubImage2DImmediate { 1716 static const CommandId kCmdId = 384; 1717 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 1727}; 1728 1729//! Command that corresponds to glUniform1f. 1730struct Uniform1f { 1731 static const CommandId kCmdId = 385; 1732 1733 CommandHeader header; 1734 int32 location; //!< GLint 1735 float x; //!< GLfloat 1736}; 1737 1738//! Command that corresponds to glUniform1fv. 1739struct Uniform1fv { 1740 static const CommandId kCmdId = 386; 1741 1742 CommandHeader header; 1743 int32 location; //!< GLint 1744 int32 count; //!< GLsizei 1745 uint32 v_shm_id; //!< uint32 1746 uint32 v_shm_offset; //!< uint32 1747}; 1748 1749//! Immediate version of command that corresponds to glUniform1fv. 1750struct Uniform1fvImmediate { 1751 static const CommandId kCmdId = 387; 1752 1753 CommandHeader header; 1754 int32 location; //!< GLint 1755 int32 count; //!< GLsizei 1756}; 1757 1758//! Command that corresponds to glUniform1i. 1759struct Uniform1i { 1760 static const CommandId kCmdId = 388; 1761 1762 CommandHeader header; 1763 int32 location; //!< GLint 1764 int32 x; //!< GLint 1765}; 1766 1767//! Command that corresponds to glUniform1iv. 1768struct Uniform1iv { 1769 static const CommandId kCmdId = 389; 1770 1771 CommandHeader header; 1772 int32 location; //!< GLint 1773 int32 count; //!< GLsizei 1774 uint32 v_shm_id; //!< uint32 1775 uint32 v_shm_offset; //!< uint32 1776}; 1777 1778//! Immediate version of command that corresponds to glUniform1iv. 1779struct Uniform1ivImmediate { 1780 static const CommandId kCmdId = 390; 1781 1782 CommandHeader header; 1783 int32 location; //!< GLint 1784 int32 count; //!< GLsizei 1785}; 1786 1787//! Command that corresponds to glUniform2f. 1788struct Uniform2f { 1789 static const CommandId kCmdId = 391; 1790 1791 CommandHeader header; 1792 int32 location; //!< GLint 1793 float x; //!< GLfloat 1794 float y; //!< GLfloat 1795}; 1796 1797//! Command that corresponds to glUniform2fv. 1798struct Uniform2fv { 1799 static const CommandId kCmdId = 392; 1800 1801 CommandHeader header; 1802 int32 location; //!< GLint 1803 int32 count; //!< GLsizei 1804 uint32 v_shm_id; //!< uint32 1805 uint32 v_shm_offset; //!< uint32 1806}; 1807 1808//! Immediate version of command that corresponds to glUniform2fv. 1809struct Uniform2fvImmediate { 1810 static const CommandId kCmdId = 393; 1811 1812 CommandHeader header; 1813 int32 location; //!< GLint 1814 int32 count; //!< GLsizei 1815}; 1816 1817//! Command that corresponds to glUniform2i. 1818struct Uniform2i { 1819 static const CommandId kCmdId = 394; 1820 1821 CommandHeader header; 1822 int32 location; //!< GLint 1823 int32 x; //!< GLint 1824 int32 y; //!< GLint 1825}; 1826 1827//! Command that corresponds to glUniform2iv. 1828struct Uniform2iv { 1829 static const CommandId kCmdId = 395; 1830 1831 CommandHeader header; 1832 int32 location; //!< GLint 1833 int32 count; //!< GLsizei 1834 uint32 v_shm_id; //!< uint32 1835 uint32 v_shm_offset; //!< uint32 1836}; 1837 1838//! Immediate version of command that corresponds to glUniform2iv. 1839struct Uniform2ivImmediate { 1840 static const CommandId kCmdId = 396; 1841 1842 CommandHeader header; 1843 int32 location; //!< GLint 1844 int32 count; //!< GLsizei 1845}; 1846 1847//! Command that corresponds to glUniform3f. 1848struct Uniform3f { 1849 static const CommandId kCmdId = 397; 1850 1851 CommandHeader header; 1852 int32 location; //!< GLint 1853 float x; //!< GLfloat 1854 float y; //!< GLfloat 1855 float z; //!< GLfloat 1856}; 1857 1858//! Command that corresponds to glUniform3fv. 1859struct Uniform3fv { 1860 static const CommandId kCmdId = 398; 1861 1862 CommandHeader header; 1863 int32 location; //!< GLint 1864 int32 count; //!< GLsizei 1865 uint32 v_shm_id; //!< uint32 1866 uint32 v_shm_offset; //!< uint32 1867}; 1868 1869//! Immediate version of command that corresponds to glUniform3fv. 1870struct Uniform3fvImmediate { 1871 static const CommandId kCmdId = 399; 1872 1873 CommandHeader header; 1874 int32 location; //!< GLint 1875 int32 count; //!< GLsizei 1876}; 1877 1878//! Command that corresponds to glUniform3i. 1879struct Uniform3i { 1880 static const CommandId kCmdId = 400; 1881 1882 CommandHeader header; 1883 int32 location; //!< GLint 1884 int32 x; //!< GLint 1885 int32 y; //!< GLint 1886 int32 z; //!< GLint 1887}; 1888 1889//! Command that corresponds to glUniform3iv. 1890struct Uniform3iv { 1891 static const CommandId kCmdId = 401; 1892 1893 CommandHeader header; 1894 int32 location; //!< GLint 1895 int32 count; //!< GLsizei 1896 uint32 v_shm_id; //!< uint32 1897 uint32 v_shm_offset; //!< uint32 1898}; 1899 1900//! Immediate version of command that corresponds to glUniform3iv. 1901struct Uniform3ivImmediate { 1902 static const CommandId kCmdId = 402; 1903 1904 CommandHeader header; 1905 int32 location; //!< GLint 1906 int32 count; //!< GLsizei 1907}; 1908 1909//! Command that corresponds to glUniform4f. 1910struct Uniform4f { 1911 static const CommandId kCmdId = 403; 1912 1913 CommandHeader header; 1914 int32 location; //!< GLint 1915 float x; //!< GLfloat 1916 float y; //!< GLfloat 1917 float z; //!< GLfloat 1918 float w; //!< GLfloat 1919}; 1920 1921//! Command that corresponds to glUniform4fv. 1922struct Uniform4fv { 1923 static const CommandId kCmdId = 404; 1924 1925 CommandHeader header; 1926 int32 location; //!< GLint 1927 int32 count; //!< GLsizei 1928 uint32 v_shm_id; //!< uint32 1929 uint32 v_shm_offset; //!< uint32 1930}; 1931 1932//! Immediate version of command that corresponds to glUniform4fv. 1933struct Uniform4fvImmediate { 1934 static const CommandId kCmdId = 405; 1935 1936 CommandHeader header; 1937 int32 location; //!< GLint 1938 int32 count; //!< GLsizei 1939}; 1940 1941//! Command that corresponds to glUniform4i. 1942struct Uniform4i { 1943 static const CommandId kCmdId = 406; 1944 1945 CommandHeader header; 1946 int32 location; //!< GLint 1947 int32 x; //!< GLint 1948 int32 y; //!< GLint 1949 int32 z; //!< GLint 1950 int32 w; //!< GLint 1951}; 1952 1953//! Command that corresponds to glUniform4iv. 1954struct Uniform4iv { 1955 static const CommandId kCmdId = 407; 1956 1957 CommandHeader header; 1958 int32 location; //!< GLint 1959 int32 count; //!< GLsizei 1960 uint32 v_shm_id; //!< uint32 1961 uint32 v_shm_offset; //!< uint32 1962}; 1963 1964//! Immediate version of command that corresponds to glUniform4iv. 1965struct Uniform4ivImmediate { 1966 static const CommandId kCmdId = 408; 1967 1968 CommandHeader header; 1969 int32 location; //!< GLint 1970 int32 count; //!< GLsizei 1971}; 1972 1973//! Command that corresponds to glUniformMatrix2fv. 1974struct UniformMatrix2fv { 1975 static const CommandId kCmdId = 409; 1976 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 1983}; 1984 1985//! Immediate version of command that corresponds to glUniformMatrix2fv. 1986struct UniformMatrix2fvImmediate { 1987 static const CommandId kCmdId = 410; 1988 1989 CommandHeader header; 1990 int32 location; //!< GLint 1991 int32 count; //!< GLsizei 1992 uint32 transpose; //!< GLboolean 1993}; 1994 1995//! Command that corresponds to glUniformMatrix3fv. 1996struct UniformMatrix3fv { 1997 static const CommandId kCmdId = 411; 1998 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 2005}; 2006 2007//! Immediate version of command that corresponds to glUniformMatrix3fv. 2008struct UniformMatrix3fvImmediate { 2009 static const CommandId kCmdId = 412; 2010 2011 CommandHeader header; 2012 int32 location; //!< GLint 2013 int32 count; //!< GLsizei 2014 uint32 transpose; //!< GLboolean 2015}; 2016 2017//! Command that corresponds to glUniformMatrix4fv. 2018struct UniformMatrix4fv { 2019 static const CommandId kCmdId = 413; 2020 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 2027}; 2028 2029//! Immediate version of command that corresponds to glUniformMatrix4fv. 2030struct UniformMatrix4fvImmediate { 2031 static const CommandId kCmdId = 414; 2032 2033 CommandHeader header; 2034 int32 location; //!< GLint 2035 int32 count; //!< GLsizei 2036 uint32 transpose; //!< GLboolean 2037}; 2038 2039//! Command that corresponds to glUseProgram. 2040struct UseProgram { 2041 static const CommandId kCmdId = 415; 2042 2043 CommandHeader header; 2044 uint32 program; //!< GLuint 2045}; 2046 2047//! Command that corresponds to glValidateProgram. 2048struct ValidateProgram { 2049 static const CommandId kCmdId = 416; 2050 2051 CommandHeader header; 2052 uint32 program; //!< GLuint 2053}; 2054 2055//! Command that corresponds to glVertexAttrib1f. 2056struct VertexAttrib1f { 2057 static const CommandId kCmdId = 417; 2058 2059 CommandHeader header; 2060 uint32 indx; //!< GLuint 2061 float x; //!< GLfloat 2062}; 2063 2064//! Command that corresponds to glVertexAttrib1fv. 2065struct VertexAttrib1fv { 2066 static const CommandId kCmdId = 418; 2067 2068 CommandHeader header; 2069 uint32 indx; //!< GLuint 2070 uint32 values_shm_id; //!< uint32 2071 uint32 values_shm_offset; //!< uint32 2072}; 2073 2074//! Immediate version of command that corresponds to glVertexAttrib1fv. 2075struct VertexAttrib1fvImmediate { 2076 static const CommandId kCmdId = 419; 2077 2078 CommandHeader header; 2079 uint32 indx; //!< GLuint 2080}; 2081 2082//! Command that corresponds to glVertexAttrib2f. 2083struct VertexAttrib2f { 2084 static const CommandId kCmdId = 420; 2085 2086 CommandHeader header; 2087 uint32 indx; //!< GLuint 2088 float x; //!< GLfloat 2089 float y; //!< GLfloat 2090}; 2091 2092//! Command that corresponds to glVertexAttrib2fv. 2093struct VertexAttrib2fv { 2094 static const CommandId kCmdId = 421; 2095 2096 CommandHeader header; 2097 uint32 indx; //!< GLuint 2098 uint32 values_shm_id; //!< uint32 2099 uint32 values_shm_offset; //!< uint32 2100}; 2101 2102//! Immediate version of command that corresponds to glVertexAttrib2fv. 2103struct VertexAttrib2fvImmediate { 2104 static const CommandId kCmdId = 422; 2105 2106 CommandHeader header; 2107 uint32 indx; //!< GLuint 2108}; 2109 2110//! Command that corresponds to glVertexAttrib3f. 2111struct VertexAttrib3f { 2112 static const CommandId kCmdId = 423; 2113 2114 CommandHeader header; 2115 uint32 indx; //!< GLuint 2116 float x; //!< GLfloat 2117 float y; //!< GLfloat 2118 float z; //!< GLfloat 2119}; 2120 2121//! Command that corresponds to glVertexAttrib3fv. 2122struct VertexAttrib3fv { 2123 static const CommandId kCmdId = 424; 2124 2125 CommandHeader header; 2126 uint32 indx; //!< GLuint 2127 uint32 values_shm_id; //!< uint32 2128 uint32 values_shm_offset; //!< uint32 2129}; 2130 2131//! Immediate version of command that corresponds to glVertexAttrib3fv. 2132struct VertexAttrib3fvImmediate { 2133 static const CommandId kCmdId = 425; 2134 2135 CommandHeader header; 2136 uint32 indx; //!< GLuint 2137}; 2138 2139//! Command that corresponds to glVertexAttrib4f. 2140struct VertexAttrib4f { 2141 static const CommandId kCmdId = 426; 2142 2143 CommandHeader header; 2144 uint32 indx; //!< GLuint 2145 float x; //!< GLfloat 2146 float y; //!< GLfloat 2147 float z; //!< GLfloat 2148 float w; //!< GLfloat 2149}; 2150 2151//! Command that corresponds to glVertexAttrib4fv. 2152struct VertexAttrib4fv { 2153 static const CommandId kCmdId = 427; 2154 2155 CommandHeader header; 2156 uint32 indx; //!< GLuint 2157 uint32 values_shm_id; //!< uint32 2158 uint32 values_shm_offset; //!< uint32 2159}; 2160 2161//! Immediate version of command that corresponds to glVertexAttrib4fv. 2162struct VertexAttrib4fvImmediate { 2163 static const CommandId kCmdId = 428; 2164 2165 CommandHeader header; 2166 uint32 indx; //!< GLuint 2167}; 2168 2169//! Command that corresponds to glVertexAttribPointer. 2170struct VertexAttribPointer { 2171 static const CommandId kCmdId = 429; 2172 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 2180}; 2181 2182//! Command that corresponds to glViewport. 2183struct Viewport { 2184 static const CommandId kCmdId = 430; 2185 2186 CommandHeader header; 2187 int32 x; //!< GLint 2188 int32 y; //!< GLint 2189 int32 width; //!< GLsizei 2190 int32 height; //!< GLsizei 2191}; 2192 2193//! Command that corresponds to SwapBuffers. 2194struct SwapBuffers { 2195 static const CommandId kCmdId = 431; 2196 2197 CommandHeader header; 2198}; 2199 2200//! Command that corresponds to GetMaxValueInBuffer. 2201struct GetMaxValueInBuffer { 2202 static const CommandId kCmdId = 436; 2203 2204 typedef GLuint Result; 2205 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 2213}; 2214 2215//! Command that generates shared ids for contexts that share resources. 2216struct GenSharedIds { 2217 static const CommandId kCmdId = 439; 2218 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 2225}; 2226 2227//! Command that deletes shared ids. 2228struct DeleteSharedIds { 2229 static const CommandId kCmdId = 440; 2230 2231 CommandHeader header; 2232 uint32 namespace_id; //!< GLuint 2233 int32 n; //!< GLsizei 2234 uint32 ids_shm_id; //!< uint32 2235 uint32 ids_shm_offset; //!< uint32 2236}; 2237 2238//! Command that registers shared ids. It is an error to attempt 2239//! to register an id that is already registered. 2240struct RegisterSharedIds { 2241 static const CommandId kCmdId = 441; 2242 2243 CommandHeader header; 2244 uint32 namespace_id; //!< GLuint 2245 int32 n; //!< GLsizei 2246 uint32 ids_shm_id; //!< uint32 2247 uint32 ids_shm_offset; //!< uint32 2248}; 2249 2250//! Command that enables features. The bucket should contain the feature string. 2251struct CommandBufferEnable { 2252 static const CommandId kCmdId = 442; 2253 2254 typedef GLint Result; 2255 2256 CommandHeader header; 2257 uint32 bucket_id; //!< GLuint 2258 uint32 result_shm_id; //!< uint32 2259 uint32 result_shm_offset; //!< uint32 2260}; 2261 2262 2263