gles2_cmd_format_docs.txt 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262
  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. //! The command header.
  72. struct CommandHeader {
  73. Uint32 size:21;
  74. Uint32 command:11;
  75. };
  76. //! Used for some glGetXXX commands that return a result through a pointer. We
  77. //! need to know if the command succeeded or not and the size of the result. If
  78. //! the command failed its result size will 0. You must set the size to 0
  79. //! before issuing the command.
  80. //!
  81. //! To retrieve the data you might do something like this pseudo code:
  82. //!
  83. //! GetAttachedShaders::Result* result = address-of-shared-memory
  84. //! int num_results = result->size / sizeof(GLuint); // the type returned
  85. //! GLuint* results = &result->data;
  86. //! for (int ii = 0; ii < num_results; ++ii) {
  87. //! printf("%d\n", results[ii]);
  88. //! }
  89. //!
  90. template <typename T>
  91. struct SizedResult {
  92. uint32 size; // in bytes.
  93. T data; // this is just here to get an offset.
  94. };
  95. //! A Noop command.
  96. struct Noop {
  97. static const CommandId kCmdId = 0;
  98. CommandHeader header;
  99. };
  100. //! The SetToken command puts a token in the command stream that you can
  101. //! use to check if that token has been passed in the command stream.
  102. struct SetToken {
  103. static const CommandId kCmdId = 1;
  104. CommandHeader header;
  105. uint32 token;
  106. };
  107. //! The Jump command jumps to another place in the command buffer.
  108. struct Jump {
  109. static const CommandId kCmdId = 3;
  110. CommandHeader header;
  111. uint32 offset;
  112. };
  113. //! The JumpRelative command jumps to another place in the command buffer
  114. //! relative to the end of this command. In other words. JumpRelative with an
  115. //! offset of zero is effectively a no-op.
  116. struct JumpRelative {
  117. static const CommandId kCmdId = 4;
  118. CommandHeader header;
  119. int32 offset;
  120. };
  121. //! The Call command jumps to a subroutine which can be returned from with the
  122. //! Return command.
  123. struct Call {
  124. static const CommandId kCmdId = 5;
  125. CommandHeader header;
  126. uint32 offset;
  127. };
  128. //! The CallRelative command jumps to a subroutine using a relative offset. The
  129. //! offset is relative to the end of this command..
  130. struct CallRelative {
  131. static const CommandId kCmdId = 6;
  132. CommandHeader header;
  133. int32 offset;
  134. };
  135. //! Returns from a subroutine called by the Call or CallRelative commands.
  136. struct Return {
  137. static const CommandId kCmdId = 7;
  138. CommandHeader header;
  139. };
  140. //! Sets the size of a bucket for collecting data on the service side.
  141. //! This is a utility for gathering data on the service side so it can be used
  142. //! all at once when some service side API is called. It removes the need to
  143. //! add special commands just to support a particular API. For example, any API
  144. //! command that needs a string needs a way to send that string to the API over
  145. //! the command buffers. While you can require that the command buffer or
  146. //! transfer buffer be large enough to hold the largest string you can send,
  147. //! using this command removes that restriction by letting you send smaller
  148. //! pieces over and build up the data on the service side.
  149. //!
  150. //! You can clear a bucket on the service side and thereby free memory by
  151. //! sending a size of 0.
  152. struct SetBucketSize {
  153. static const CommandId kCmdId = 8;
  154. CommandHeader header;
  155. uint32 bucket_id;
  156. uint32 size;
  157. };
  158. //! Sets the contents of a portion of a bucket on the service side from data in
  159. //! shared memory.
  160. //! See SetBucketSize.
  161. struct SetBucketData {
  162. static const CommandId kCmdId = 9;
  163. CommandHeader header;
  164. uint32 bucket_id;
  165. uint32 offset;
  166. uint32 size;
  167. uint32 shared_memory_id;
  168. uint32 shared_memory_offset;
  169. };
  170. //! Sets the contents of a portion of a bucket on the service side from data in
  171. //! the command buffer.
  172. //! See SetBucketSize.
  173. struct SetBucketDataImmediate {
  174. static const CommandId kCmdId = 10;
  175. CommandHeader header;
  176. uint32 bucket_id;
  177. uint32 offset;
  178. uint32 size;
  179. };
  180. //! Gets the size of a bucket the service has available. Sending a variable
  181. //! size result back to the client, for example any API that returns a string,
  182. //! is problematic since the largest thing you can send back is the size of
  183. //! your shared memory. This command along with GetBucketData implements a way
  184. //! to get a result a piece at a time to help solve that problem in a generic
  185. //! way.
  186. struct GetBucketSize {
  187. static const CommandId kCmdId = 11;
  188. typedef uint32 Result;
  189. CommandHeader header;
  190. uint32 bucket_id;
  191. uint32 shared_memory_id;
  192. uint32 shared_memory_offset;
  193. };
  194. //! Gets a piece of a result the service has available.
  195. //! See GetBucketSize.
  196. struct GetBucketData {
  197. static const CommandId kCmdId = 12;
  198. CommandHeader header;
  199. uint32 bucket_id;
  200. uint32 offset;
  201. uint32 size;
  202. uint32 shared_memory_id;
  203. uint32 shared_memory_offset;
  204. };
  205. // OpenGL ES 2.0 related commands.
  206. //! Command that corresponds to glActiveTexture.
  207. struct ActiveTexture {
  208. static const CommandId kCmdId = 256;
  209. CommandHeader header;
  210. uint32 texture; //!< GLenum
  211. };
  212. //! Command that corresponds to glAttachShader.
  213. struct AttachShader {
  214. static const CommandId kCmdId = 257;
  215. CommandHeader header;
  216. uint32 program; //!< GLuint
  217. uint32 shader; //!< GLuint
  218. };
  219. //! Command that corresponds to glBindAttribLocation.
  220. struct BindAttribLocation {
  221. static const CommandId kCmdId = 258;
  222. CommandHeader header;
  223. uint32 program; //!< GLuint
  224. uint32 index; //!< GLuint
  225. uint32 name_shm_id; //!< uint32
  226. uint32 name_shm_offset; //!< uint32
  227. uint32 data_size; //!< uint32
  228. };
  229. //! Immediate version of command that corresponds to glBindAttribLocation.
  230. struct BindAttribLocationImmediate {
  231. static const CommandId kCmdId = 259;
  232. CommandHeader header;
  233. uint32 program; //!< GLuint
  234. uint32 index; //!< GLuint
  235. uint32 data_size; //!< uint32
  236. };
  237. //! Bucket version of command that corresponds to glBindAttribLocation.
  238. struct BindAttribLocationBucket {
  239. static const CommandId kCmdId = 432;
  240. CommandHeader header;
  241. uint32 program; //!< GLuint
  242. uint32 index; //!< GLuint
  243. uint32 name_bucket_id; //!< uint32
  244. };
  245. //! Command that corresponds to glBindBuffer.
  246. struct BindBuffer {
  247. static const CommandId kCmdId = 260;
  248. CommandHeader header;
  249. uint32 target; //!< GLenum
  250. uint32 buffer; //!< GLuint
  251. };
  252. //! Command that corresponds to glBindFramebuffer.
  253. struct BindFramebuffer {
  254. static const CommandId kCmdId = 261;
  255. CommandHeader header;
  256. uint32 target; //!< GLenum
  257. uint32 framebuffer; //!< GLuint
  258. };
  259. //! Command that corresponds to glBindRenderbuffer.
  260. struct BindRenderbuffer {
  261. static const CommandId kCmdId = 262;
  262. CommandHeader header;
  263. uint32 target; //!< GLenum
  264. uint32 renderbuffer; //!< GLuint
  265. };
  266. //! Command that corresponds to glBindTexture.
  267. struct BindTexture {
  268. static const CommandId kCmdId = 263;
  269. CommandHeader header;
  270. uint32 target; //!< GLenum
  271. uint32 texture; //!< GLuint
  272. };
  273. //! Command that corresponds to glBlendColor.
  274. struct BlendColor {
  275. static const CommandId kCmdId = 264;
  276. CommandHeader header;
  277. float red; //!< GLclampf
  278. float green; //!< GLclampf
  279. float blue; //!< GLclampf
  280. float alpha; //!< GLclampf
  281. };
  282. //! Command that corresponds to glBlendEquation.
  283. struct BlendEquation {
  284. static const CommandId kCmdId = 265;
  285. CommandHeader header;
  286. uint32 mode; //!< GLenum
  287. };
  288. //! Command that corresponds to glBlendEquationSeparate.
  289. struct BlendEquationSeparate {
  290. static const CommandId kCmdId = 266;
  291. CommandHeader header;
  292. uint32 modeRGB; //!< GLenum
  293. uint32 modeAlpha; //!< GLenum
  294. };
  295. //! Command that corresponds to glBlendFunc.
  296. struct BlendFunc {
  297. static const CommandId kCmdId = 267;
  298. CommandHeader header;
  299. uint32 sfactor; //!< GLenum
  300. uint32 dfactor; //!< GLenum
  301. };
  302. //! Command that corresponds to glBlendFuncSeparate.
  303. struct BlendFuncSeparate {
  304. static const CommandId kCmdId = 268;
  305. CommandHeader header;
  306. uint32 srcRGB; //!< GLenum
  307. uint32 dstRGB; //!< GLenum
  308. uint32 srcAlpha; //!< GLenum
  309. uint32 dstAlpha; //!< GLenum
  310. };
  311. //! Command that corresponds to glBufferData.
  312. struct BufferData {
  313. static const CommandId kCmdId = 269;
  314. CommandHeader header;
  315. uint32 target; //!< GLenum
  316. int32 size; //!< GLsizeiptr
  317. uint32 data_shm_id; //!< uint32
  318. uint32 data_shm_offset; //!< uint32
  319. uint32 usage; //!< GLenum
  320. };
  321. //! Immediate version of command that corresponds to glBufferData.
  322. struct BufferDataImmediate {
  323. static const CommandId kCmdId = 270;
  324. CommandHeader header;
  325. uint32 target; //!< GLenum
  326. int32 size; //!< GLsizeiptr
  327. uint32 usage; //!< GLenum
  328. };
  329. //! Command that corresponds to glBufferSubData.
  330. struct BufferSubData {
  331. static const CommandId kCmdId = 271;
  332. CommandHeader header;
  333. uint32 target; //!< GLenum
  334. int32 offset; //!< GLintptr
  335. int32 size; //!< GLsizeiptr
  336. uint32 data_shm_id; //!< uint32
  337. uint32 data_shm_offset; //!< uint32
  338. };
  339. //! Immediate version of command that corresponds to glBufferSubData.
  340. struct BufferSubDataImmediate {
  341. static const CommandId kCmdId = 272;
  342. CommandHeader header;
  343. uint32 target; //!< GLenum
  344. int32 offset; //!< GLintptr
  345. int32 size; //!< GLsizeiptr
  346. };
  347. //! Command that corresponds to glCheckFramebufferStatus.
  348. struct CheckFramebufferStatus {
  349. static const CommandId kCmdId = 273;
  350. typedef GLenum Result;
  351. CommandHeader header;
  352. uint32 target; //!< GLenum
  353. uint32 result_shm_id; //!< uint32
  354. uint32 result_shm_offset; //!< uint32
  355. };
  356. //! Command that corresponds to glClear.
  357. struct Clear {
  358. static const CommandId kCmdId = 274;
  359. CommandHeader header;
  360. uint32 mask; //!< GLbitfield
  361. };
  362. //! Command that corresponds to glClearColor.
  363. struct ClearColor {
  364. static const CommandId kCmdId = 275;
  365. CommandHeader header;
  366. float red; //!< GLclampf
  367. float green; //!< GLclampf
  368. float blue; //!< GLclampf
  369. float alpha; //!< GLclampf
  370. };
  371. //! Command that corresponds to glClearDepthf.
  372. struct ClearDepthf {
  373. static const CommandId kCmdId = 276;
  374. CommandHeader header;
  375. float depth; //!< GLclampf
  376. };
  377. //! Command that corresponds to glClearStencil.
  378. struct ClearStencil {
  379. static const CommandId kCmdId = 277;
  380. CommandHeader header;
  381. int32 s; //!< GLint
  382. };
  383. //! Command that corresponds to glColorMask.
  384. struct ColorMask {
  385. static const CommandId kCmdId = 278;
  386. CommandHeader header;
  387. uint32 red; //!< GLboolean
  388. uint32 green; //!< GLboolean
  389. uint32 blue; //!< GLboolean
  390. uint32 alpha; //!< GLboolean
  391. };
  392. //! Command that corresponds to glCompileShader.
  393. struct CompileShader {
  394. static const CommandId kCmdId = 279;
  395. CommandHeader header;
  396. uint32 shader; //!< GLuint
  397. };
  398. //! Command that corresponds to glCompressedTexImage2D.
  399. struct CompressedTexImage2D {
  400. static const CommandId kCmdId = 280;
  401. CommandHeader header;
  402. uint32 target; //!< GLenum
  403. int32 level; //!< GLint
  404. uint32 internalformat; //!< GLenum
  405. int32 width; //!< GLsizei
  406. int32 height; //!< GLsizei
  407. int32 border; //!< GLint
  408. int32 imageSize; //!< GLsizei
  409. uint32 data_shm_id; //!< uint32
  410. uint32 data_shm_offset; //!< uint32
  411. };
  412. //! Immediate version of command that corresponds to glCompressedTexImage2D.
  413. struct CompressedTexImage2DImmediate {
  414. static const CommandId kCmdId = 281;
  415. CommandHeader header;
  416. uint32 target; //!< GLenum
  417. int32 level; //!< GLint
  418. uint32 internalformat; //!< GLenum
  419. int32 width; //!< GLsizei
  420. int32 height; //!< GLsizei
  421. int32 border; //!< GLint
  422. int32 imageSize; //!< GLsizei
  423. };
  424. //! Bucket version of command that corresponds to glCompressedTexImage2D.
  425. struct CompressedTexImage2DBucket {
  426. static const CommandId kCmdId = 443;
  427. CommandHeader header;
  428. uint32 target; //!< GLenum
  429. int32 level; //!< GLint
  430. uint32 internalformat; //!< GLenum
  431. int32 width; //!< GLsizei
  432. int32 height; //!< GLsizei
  433. int32 border; //!< GLint
  434. uint32 bucket_id; //!< GLuint
  435. };
  436. //! Command that corresponds to glCompressedTexSubImage2D.
  437. struct CompressedTexSubImage2D {
  438. static const CommandId kCmdId = 282;
  439. CommandHeader header;
  440. uint32 target; //!< GLenum
  441. int32 level; //!< GLint
  442. int32 xoffset; //!< GLint
  443. int32 yoffset; //!< GLint
  444. int32 width; //!< GLsizei
  445. int32 height; //!< GLsizei
  446. uint32 format; //!< GLenum
  447. int32 imageSize; //!< GLsizei
  448. uint32 data_shm_id; //!< uint32
  449. uint32 data_shm_offset; //!< uint32
  450. };
  451. //! Immediate version of command that corresponds to glCompressedTexSubImage2D.
  452. struct CompressedTexSubImage2DImmediate {
  453. static const CommandId kCmdId = 283;
  454. CommandHeader header;
  455. uint32 target; //!< GLenum
  456. int32 level; //!< GLint
  457. int32 xoffset; //!< GLint
  458. int32 yoffset; //!< GLint
  459. int32 width; //!< GLsizei
  460. int32 height; //!< GLsizei
  461. uint32 format; //!< GLenum
  462. int32 imageSize; //!< GLsizei
  463. };
  464. //! Bucket version of command that corresponds to glCompressedTexSubImage2D.
  465. struct CompressedTexSubImage2DBucket {
  466. static const CommandId kCmdId = 444;
  467. CommandHeader header;
  468. uint32 target; //!< GLenum
  469. int32 level; //!< GLint
  470. int32 xoffset; //!< GLint
  471. int32 yoffset; //!< GLint
  472. int32 width; //!< GLsizei
  473. int32 height; //!< GLsizei
  474. uint32 format; //!< GLenum
  475. uint32 bucket_id; //!< GLuint
  476. };
  477. //! Command that corresponds to glCopyTexImage2D.
  478. struct CopyTexImage2D {
  479. static const CommandId kCmdId = 284;
  480. CommandHeader header;
  481. uint32 target; //!< GLenum
  482. int32 level; //!< GLint
  483. uint32 internalformat; //!< GLenum
  484. int32 x; //!< GLint
  485. int32 y; //!< GLint
  486. int32 width; //!< GLsizei
  487. int32 height; //!< GLsizei
  488. int32 border; //!< GLint
  489. };
  490. //! Command that corresponds to glCopyTexSubImage2D.
  491. struct CopyTexSubImage2D {
  492. static const CommandId kCmdId = 285;
  493. CommandHeader header;
  494. uint32 target; //!< GLenum
  495. int32 level; //!< GLint
  496. int32 xoffset; //!< GLint
  497. int32 yoffset; //!< GLint
  498. int32 x; //!< GLint
  499. int32 y; //!< GLint
  500. int32 width; //!< GLsizei
  501. int32 height; //!< GLsizei
  502. };
  503. //! Command that corresponds to glCreateProgram.
  504. struct CreateProgram {
  505. static const CommandId kCmdId = 286;
  506. CommandHeader header;
  507. uint32 client_id; //!< uint32
  508. };
  509. //! Command that corresponds to glCreateShader.
  510. struct CreateShader {
  511. static const CommandId kCmdId = 287;
  512. CommandHeader header;
  513. uint32 type; //!< GLenum
  514. uint32 client_id; //!< uint32
  515. };
  516. //! Command that corresponds to glCullFace.
  517. struct CullFace {
  518. static const CommandId kCmdId = 288;
  519. CommandHeader header;
  520. uint32 mode; //!< GLenum
  521. };
  522. //! Command that corresponds to glDeleteBuffers.
  523. struct DeleteBuffers {
  524. static const CommandId kCmdId = 289;
  525. CommandHeader header;
  526. int32 n; //!< GLsizei
  527. uint32 buffers_shm_id; //!< uint32
  528. uint32 buffers_shm_offset; //!< uint32
  529. };
  530. //! Immediate version of command that corresponds to glDeleteBuffers.
  531. struct DeleteBuffersImmediate {
  532. static const CommandId kCmdId = 290;
  533. CommandHeader header;
  534. int32 n; //!< GLsizei
  535. };
  536. //! Command that corresponds to glDeleteFramebuffers.
  537. struct DeleteFramebuffers {
  538. static const CommandId kCmdId = 291;
  539. CommandHeader header;
  540. int32 n; //!< GLsizei
  541. uint32 framebuffers_shm_id; //!< uint32
  542. uint32 framebuffers_shm_offset; //!< uint32
  543. };
  544. //! Immediate version of command that corresponds to glDeleteFramebuffers.
  545. struct DeleteFramebuffersImmediate {
  546. static const CommandId kCmdId = 292;
  547. CommandHeader header;
  548. int32 n; //!< GLsizei
  549. };
  550. //! Command that corresponds to glDeleteProgram.
  551. struct DeleteProgram {
  552. static const CommandId kCmdId = 293;
  553. CommandHeader header;
  554. uint32 program; //!< GLuint
  555. };
  556. //! Command that corresponds to glDeleteRenderbuffers.
  557. struct DeleteRenderbuffers {
  558. static const CommandId kCmdId = 294;
  559. CommandHeader header;
  560. int32 n; //!< GLsizei
  561. uint32 renderbuffers_shm_id; //!< uint32
  562. uint32 renderbuffers_shm_offset; //!< uint32
  563. };
  564. //! Immediate version of command that corresponds to glDeleteRenderbuffers.
  565. struct DeleteRenderbuffersImmediate {
  566. static const CommandId kCmdId = 295;
  567. CommandHeader header;
  568. int32 n; //!< GLsizei
  569. };
  570. //! Command that corresponds to glDeleteShader.
  571. struct DeleteShader {
  572. static const CommandId kCmdId = 296;
  573. CommandHeader header;
  574. uint32 shader; //!< GLuint
  575. };
  576. //! Command that corresponds to glDeleteTextures.
  577. struct DeleteTextures {
  578. static const CommandId kCmdId = 297;
  579. CommandHeader header;
  580. int32 n; //!< GLsizei
  581. uint32 textures_shm_id; //!< uint32
  582. uint32 textures_shm_offset; //!< uint32
  583. };
  584. //! Immediate version of command that corresponds to glDeleteTextures.
  585. struct DeleteTexturesImmediate {
  586. static const CommandId kCmdId = 298;
  587. CommandHeader header;
  588. int32 n; //!< GLsizei
  589. };
  590. //! Command that corresponds to glDepthFunc.
  591. struct DepthFunc {
  592. static const CommandId kCmdId = 299;
  593. CommandHeader header;
  594. uint32 func; //!< GLenum
  595. };
  596. //! Command that corresponds to glDepthMask.
  597. struct DepthMask {
  598. static const CommandId kCmdId = 300;
  599. CommandHeader header;
  600. uint32 flag; //!< GLboolean
  601. };
  602. //! Command that corresponds to glDepthRangef.
  603. struct DepthRangef {
  604. static const CommandId kCmdId = 301;
  605. CommandHeader header;
  606. float zNear; //!< GLclampf
  607. float zFar; //!< GLclampf
  608. };
  609. //! Command that corresponds to glDetachShader.
  610. struct DetachShader {
  611. static const CommandId kCmdId = 302;
  612. CommandHeader header;
  613. uint32 program; //!< GLuint
  614. uint32 shader; //!< GLuint
  615. };
  616. //! Command that corresponds to glDisable.
  617. struct Disable {
  618. static const CommandId kCmdId = 303;
  619. CommandHeader header;
  620. uint32 cap; //!< GLenum
  621. };
  622. //! Command that corresponds to glDisableVertexAttribArray.
  623. struct DisableVertexAttribArray {
  624. static const CommandId kCmdId = 304;
  625. CommandHeader header;
  626. uint32 index; //!< GLuint
  627. };
  628. //! Command that corresponds to glDrawArrays.
  629. struct DrawArrays {
  630. static const CommandId kCmdId = 305;
  631. CommandHeader header;
  632. uint32 mode; //!< GLenum
  633. int32 first; //!< GLint
  634. int32 count; //!< GLsizei
  635. };
  636. //! Command that corresponds to glDrawElements.
  637. struct DrawElements {
  638. static const CommandId kCmdId = 306;
  639. CommandHeader header;
  640. uint32 mode; //!< GLenum
  641. int32 count; //!< GLsizei
  642. uint32 type; //!< GLenum
  643. uint32 index_offset; //!< GLuint
  644. };
  645. //! Command that corresponds to glEnable.
  646. struct Enable {
  647. static const CommandId kCmdId = 307;
  648. CommandHeader header;
  649. uint32 cap; //!< GLenum
  650. };
  651. //! Command that corresponds to glEnableVertexAttribArray.
  652. struct EnableVertexAttribArray {
  653. static const CommandId kCmdId = 308;
  654. CommandHeader header;
  655. uint32 index; //!< GLuint
  656. };
  657. //! Command that corresponds to glFinish.
  658. struct Finish {
  659. static const CommandId kCmdId = 309;
  660. CommandHeader header;
  661. };
  662. //! Command that corresponds to glFlush.
  663. struct Flush {
  664. static const CommandId kCmdId = 310;
  665. CommandHeader header;
  666. };
  667. //! Command that corresponds to glFramebufferRenderbuffer.
  668. struct FramebufferRenderbuffer {
  669. static const CommandId kCmdId = 311;
  670. CommandHeader header;
  671. uint32 target; //!< GLenum
  672. uint32 attachment; //!< GLenum
  673. uint32 renderbuffertarget; //!< GLenum
  674. uint32 renderbuffer; //!< GLuint
  675. };
  676. //! Command that corresponds to glFramebufferTexture2D.
  677. struct FramebufferTexture2D {
  678. static const CommandId kCmdId = 312;
  679. CommandHeader header;
  680. uint32 target; //!< GLenum
  681. uint32 attachment; //!< GLenum
  682. uint32 textarget; //!< GLenum
  683. uint32 texture; //!< GLuint
  684. int32 level; //!< GLint
  685. };
  686. //! Command that corresponds to glFrontFace.
  687. struct FrontFace {
  688. static const CommandId kCmdId = 313;
  689. CommandHeader header;
  690. uint32 mode; //!< GLenum
  691. };
  692. //! Command that corresponds to glGenBuffers.
  693. struct GenBuffers {
  694. static const CommandId kCmdId = 314;
  695. CommandHeader header;
  696. int32 n; //!< GLsizei
  697. uint32 buffers_shm_id; //!< uint32
  698. uint32 buffers_shm_offset; //!< uint32
  699. };
  700. //! Immediate version of command that corresponds to glGenBuffers.
  701. struct GenBuffersImmediate {
  702. static const CommandId kCmdId = 315;
  703. CommandHeader header;
  704. int32 n; //!< GLsizei
  705. };
  706. //! Command that corresponds to glGenerateMipmap.
  707. struct GenerateMipmap {
  708. static const CommandId kCmdId = 316;
  709. CommandHeader header;
  710. uint32 target; //!< GLenum
  711. };
  712. //! Command that corresponds to glGenFramebuffers.
  713. struct GenFramebuffers {
  714. static const CommandId kCmdId = 317;
  715. CommandHeader header;
  716. int32 n; //!< GLsizei
  717. uint32 framebuffers_shm_id; //!< uint32
  718. uint32 framebuffers_shm_offset; //!< uint32
  719. };
  720. //! Immediate version of command that corresponds to glGenFramebuffers.
  721. struct GenFramebuffersImmediate {
  722. static const CommandId kCmdId = 318;
  723. CommandHeader header;
  724. int32 n; //!< GLsizei
  725. };
  726. //! Command that corresponds to glGenRenderbuffers.
  727. struct GenRenderbuffers {
  728. static const CommandId kCmdId = 319;
  729. CommandHeader header;
  730. int32 n; //!< GLsizei
  731. uint32 renderbuffers_shm_id; //!< uint32
  732. uint32 renderbuffers_shm_offset; //!< uint32
  733. };
  734. //! Immediate version of command that corresponds to glGenRenderbuffers.
  735. struct GenRenderbuffersImmediate {
  736. static const CommandId kCmdId = 320;
  737. CommandHeader header;
  738. int32 n; //!< GLsizei
  739. };
  740. //! Command that corresponds to glGenTextures.
  741. struct GenTextures {
  742. static const CommandId kCmdId = 321;
  743. CommandHeader header;
  744. int32 n; //!< GLsizei
  745. uint32 textures_shm_id; //!< uint32
  746. uint32 textures_shm_offset; //!< uint32
  747. };
  748. //! Immediate version of command that corresponds to glGenTextures.
  749. struct GenTexturesImmediate {
  750. static const CommandId kCmdId = 322;
  751. CommandHeader header;
  752. int32 n; //!< GLsizei
  753. };
  754. //! Command that corresponds to glGetActiveAttrib.
  755. struct GetActiveAttrib {
  756. static const CommandId kCmdId = 323;
  757. struct Result {
  758. int32 success;
  759. int32 size;
  760. uint32 type;
  761. };
  762. CommandHeader header;
  763. uint32 program; //!< GLuint
  764. uint32 index; //!< GLuint
  765. uint32 name_bucket_id; //!< uint32
  766. uint32 result_shm_id; //!< uint32
  767. uint32 result_shm_offset; //!< uint32
  768. };
  769. //! Command that corresponds to glGetActiveUniform.
  770. struct GetActiveUniform {
  771. static const CommandId kCmdId = 324;
  772. struct Result {
  773. int32 success;
  774. int32 size;
  775. uint32 type;
  776. };
  777. CommandHeader header;
  778. uint32 program; //!< GLuint
  779. uint32 index; //!< GLuint
  780. uint32 name_bucket_id; //!< uint32
  781. uint32 result_shm_id; //!< uint32
  782. uint32 result_shm_offset; //!< uint32
  783. };
  784. //! Command that corresponds to glGetAttachedShaders.
  785. struct GetAttachedShaders {
  786. static const CommandId kCmdId = 325;
  787. typedef SizedResult<GLuint> Result;
  788. CommandHeader header;
  789. uint32 program; //!< GLuint
  790. uint32 result_shm_id; //!< uint32
  791. uint32 result_shm_offset; //!< uint32
  792. uint32 result_size; //!< uint32
  793. };
  794. //! Command that corresponds to glGetAttribLocation.
  795. struct GetAttribLocation {
  796. static const CommandId kCmdId = 326;
  797. typedef GLint Result;
  798. CommandHeader header;
  799. uint32 program;
  800. uint32 name_shm_id;
  801. uint32 name_shm_offset;
  802. uint32 location_shm_id;
  803. uint32 location_shm_offset;
  804. uint32 data_size;
  805. };
  806. //! Immediate version of command that corresponds to glGetAttribLocation.
  807. struct GetAttribLocationImmediate {
  808. static const CommandId kCmdId = 327;
  809. typedef GLint Result;
  810. CommandHeader header;
  811. uint32 program;
  812. uint32 location_shm_id;
  813. uint32 location_shm_offset;
  814. uint32 data_size;
  815. };
  816. //! Bucket version of command that corresponds to glGetAttribLocation.
  817. struct GetAttribLocationBucket {
  818. static const CommandId kCmdId = 434;
  819. typedef GLint Result;
  820. CommandHeader header;
  821. uint32 program;
  822. uint32 name_bucket_id;
  823. uint32 location_shm_id;
  824. uint32 location_shm_offset;
  825. };
  826. //! Command that corresponds to glGetBooleanv.
  827. struct GetBooleanv {
  828. static const CommandId kCmdId = 328;
  829. typedef SizedResult<GLboolean> Result;
  830. CommandHeader header;
  831. uint32 pname; //!< GLenum
  832. uint32 params_shm_id; //!< uint32
  833. uint32 params_shm_offset; //!< uint32
  834. };
  835. //! Command that corresponds to glGetBufferParameteriv.
  836. struct GetBufferParameteriv {
  837. static const CommandId kCmdId = 329;
  838. typedef SizedResult<GLint> Result;
  839. CommandHeader header;
  840. uint32 target; //!< GLenum
  841. uint32 pname; //!< GLenum
  842. uint32 params_shm_id; //!< uint32
  843. uint32 params_shm_offset; //!< uint32
  844. };
  845. //! Command that corresponds to glGetError.
  846. struct GetError {
  847. static const CommandId kCmdId = 330;
  848. typedef GLenum Result;
  849. CommandHeader header;
  850. uint32 result_shm_id; //!< uint32
  851. uint32 result_shm_offset; //!< uint32
  852. };
  853. //! Command that corresponds to glGetFloatv.
  854. struct GetFloatv {
  855. static const CommandId kCmdId = 331;
  856. typedef SizedResult<GLfloat> Result;
  857. CommandHeader header;
  858. uint32 pname; //!< GLenum
  859. uint32 params_shm_id; //!< uint32
  860. uint32 params_shm_offset; //!< uint32
  861. };
  862. //! Command that corresponds to glGetFramebufferAttachmentParameteriv.
  863. struct GetFramebufferAttachmentParameteriv {
  864. static const CommandId kCmdId = 332;
  865. typedef SizedResult<GLint> Result;
  866. CommandHeader header;
  867. uint32 target; //!< GLenum
  868. uint32 attachment; //!< GLenum
  869. uint32 pname; //!< GLenum
  870. uint32 params_shm_id; //!< uint32
  871. uint32 params_shm_offset; //!< uint32
  872. };
  873. //! Command that corresponds to glGetIntegerv.
  874. struct GetIntegerv {
  875. static const CommandId kCmdId = 333;
  876. typedef SizedResult<GLint> Result;
  877. CommandHeader header;
  878. uint32 pname; //!< GLenum
  879. uint32 params_shm_id; //!< uint32
  880. uint32 params_shm_offset; //!< uint32
  881. };
  882. //! Command that corresponds to glGetProgramiv.
  883. struct GetProgramiv {
  884. static const CommandId kCmdId = 334;
  885. typedef SizedResult<GLint> Result;
  886. CommandHeader header;
  887. uint32 program; //!< GLuint
  888. uint32 pname; //!< GLenum
  889. uint32 params_shm_id; //!< uint32
  890. uint32 params_shm_offset; //!< uint32
  891. };
  892. //! Command that corresponds to glGetProgramInfoLog.
  893. struct GetProgramInfoLog {
  894. static const CommandId kCmdId = 335;
  895. CommandHeader header;
  896. uint32 program; //!< GLuint
  897. uint32 bucket_id; //!< uint32
  898. };
  899. //! Command that corresponds to glGetRenderbufferParameteriv.
  900. struct GetRenderbufferParameteriv {
  901. static const CommandId kCmdId = 336;
  902. typedef SizedResult<GLint> Result;
  903. CommandHeader header;
  904. uint32 target; //!< GLenum
  905. uint32 pname; //!< GLenum
  906. uint32 params_shm_id; //!< uint32
  907. uint32 params_shm_offset; //!< uint32
  908. };
  909. //! Command that corresponds to glGetShaderiv.
  910. struct GetShaderiv {
  911. static const CommandId kCmdId = 337;
  912. typedef SizedResult<GLint> Result;
  913. CommandHeader header;
  914. uint32 shader; //!< GLuint
  915. uint32 pname; //!< GLenum
  916. uint32 params_shm_id; //!< uint32
  917. uint32 params_shm_offset; //!< uint32
  918. };
  919. //! Command that corresponds to glGetShaderInfoLog.
  920. struct GetShaderInfoLog {
  921. static const CommandId kCmdId = 338;
  922. CommandHeader header;
  923. uint32 shader; //!< GLuint
  924. uint32 bucket_id; //!< uint32
  925. };
  926. //! Command that corresponds to glGetShaderPrecisionFormat.
  927. struct GetShaderPrecisionFormat {
  928. static const CommandId kCmdId = 339;
  929. struct Result {
  930. int32 success;
  931. int32 min_range;
  932. int32 max_range;
  933. int32 precision;
  934. };
  935. CommandHeader header;
  936. uint32 shadertype; //!< GLenum
  937. uint32 precisiontype; //!< GLenum
  938. uint32 result_shm_id; //!< uint32
  939. uint32 result_shm_offset; //!< uint32
  940. };
  941. //! Command that corresponds to glGetShaderSource.
  942. struct GetShaderSource {
  943. static const CommandId kCmdId = 340;
  944. CommandHeader header;
  945. uint32 shader; //!< GLuint
  946. uint32 bucket_id; //!< uint32
  947. };
  948. //! Command that corresponds to glGetString.
  949. struct GetString {
  950. static const CommandId kCmdId = 341;
  951. CommandHeader header;
  952. uint32 name; //!< GLenum
  953. uint32 bucket_id; //!< uint32
  954. };
  955. //! Command that corresponds to glGetTexParameterfv.
  956. struct GetTexParameterfv {
  957. static const CommandId kCmdId = 342;
  958. typedef SizedResult<GLfloat> Result;
  959. CommandHeader header;
  960. uint32 target; //!< GLenum
  961. uint32 pname; //!< GLenum
  962. uint32 params_shm_id; //!< uint32
  963. uint32 params_shm_offset; //!< uint32
  964. };
  965. //! Command that corresponds to glGetTexParameteriv.
  966. struct GetTexParameteriv {
  967. static const CommandId kCmdId = 343;
  968. typedef SizedResult<GLint> Result;
  969. CommandHeader header;
  970. uint32 target; //!< GLenum
  971. uint32 pname; //!< GLenum
  972. uint32 params_shm_id; //!< uint32
  973. uint32 params_shm_offset; //!< uint32
  974. };
  975. //! Command that corresponds to glGetUniformLocation.
  976. struct GetUniformLocation {
  977. static const CommandId kCmdId = 346;
  978. typedef GLint Result;
  979. CommandHeader header;
  980. uint32 program;
  981. uint32 name_shm_id;
  982. uint32 name_shm_offset;
  983. uint32 location_shm_id;
  984. uint32 location_shm_offset;
  985. uint32 data_size;
  986. };
  987. //! Immediate version of command that corresponds to glGetUniformLocation.
  988. struct GetUniformLocationImmediate {
  989. static const CommandId kCmdId = 347;
  990. typedef GLint Result;
  991. CommandHeader header;
  992. uint32 program;
  993. uint32 location_shm_id;
  994. uint32 location_shm_offset;
  995. uint32 data_size;
  996. };
  997. //! Bucket version of command that corresponds to glGetUniformLocation.
  998. struct GetUniformLocationBucket {
  999. static const CommandId kCmdId = 433;
  1000. typedef GLint Result;
  1001. CommandHeader header;
  1002. uint32 program;
  1003. uint32 name_bucket_id;
  1004. uint32 location_shm_id;
  1005. uint32 location_shm_offset;
  1006. };
  1007. //! Command that corresponds to glGetUniformfv.
  1008. struct GetUniformfv {
  1009. static const CommandId kCmdId = 344;
  1010. typedef SizedResult<GLfloat> Result;
  1011. CommandHeader header;
  1012. uint32 program; //!< GLuint
  1013. int32 location; //!< GLint
  1014. uint32 params_shm_id; //!< uint32
  1015. uint32 params_shm_offset; //!< uint32
  1016. };
  1017. //! Command that corresponds to glGetUniformiv.
  1018. struct GetUniformiv {
  1019. static const CommandId kCmdId = 345;
  1020. typedef SizedResult<GLint> Result;
  1021. CommandHeader header;
  1022. uint32 program; //!< GLuint
  1023. int32 location; //!< GLint
  1024. uint32 params_shm_id; //!< uint32
  1025. uint32 params_shm_offset; //!< uint32
  1026. };
  1027. //! Command that corresponds to glGetVertexAttribfv.
  1028. struct GetVertexAttribfv {
  1029. static const CommandId kCmdId = 348;
  1030. typedef SizedResult<GLfloat> Result;
  1031. CommandHeader header;
  1032. uint32 index; //!< GLuint
  1033. uint32 pname; //!< GLenum
  1034. uint32 params_shm_id; //!< uint32
  1035. uint32 params_shm_offset; //!< uint32
  1036. };
  1037. //! Command that corresponds to glGetVertexAttribiv.
  1038. struct GetVertexAttribiv {
  1039. static const CommandId kCmdId = 349;
  1040. typedef SizedResult<GLint> Result;
  1041. CommandHeader header;
  1042. uint32 index; //!< GLuint
  1043. uint32 pname; //!< GLenum
  1044. uint32 params_shm_id; //!< uint32
  1045. uint32 params_shm_offset; //!< uint32
  1046. };
  1047. //! Command that corresponds to glGetVertexAttribPointerv.
  1048. struct GetVertexAttribPointerv {
  1049. static const CommandId kCmdId = 350;
  1050. typedef SizedResult<GLuint> Result;
  1051. CommandHeader header;
  1052. uint32 index; //!< GLuint
  1053. uint32 pname; //!< GLenum
  1054. uint32 pointer_shm_id; //!< uint32
  1055. uint32 pointer_shm_offset; //!< uint32
  1056. };
  1057. //! Command that corresponds to glHint.
  1058. struct Hint {
  1059. static const CommandId kCmdId = 351;
  1060. CommandHeader header;
  1061. uint32 target; //!< GLenum
  1062. uint32 mode; //!< GLenum
  1063. };
  1064. //! Command that corresponds to glIsBuffer.
  1065. struct IsBuffer {
  1066. static const CommandId kCmdId = 352;
  1067. typedef uint32 Result;
  1068. CommandHeader header;
  1069. uint32 buffer; //!< GLuint
  1070. uint32 result_shm_id; //!< uint32
  1071. uint32 result_shm_offset; //!< uint32
  1072. };
  1073. //! Command that corresponds to glIsEnabled.
  1074. struct IsEnabled {
  1075. static const CommandId kCmdId = 353;
  1076. typedef uint32 Result;
  1077. CommandHeader header;
  1078. uint32 cap; //!< GLenum
  1079. uint32 result_shm_id; //!< uint32
  1080. uint32 result_shm_offset; //!< uint32
  1081. };
  1082. //! Command that corresponds to glIsFramebuffer.
  1083. struct IsFramebuffer {
  1084. static const CommandId kCmdId = 354;
  1085. typedef uint32 Result;
  1086. CommandHeader header;
  1087. uint32 framebuffer; //!< GLuint
  1088. uint32 result_shm_id; //!< uint32
  1089. uint32 result_shm_offset; //!< uint32
  1090. };
  1091. //! Command that corresponds to glIsProgram.
  1092. struct IsProgram {
  1093. static const CommandId kCmdId = 355;
  1094. typedef uint32 Result;
  1095. CommandHeader header;
  1096. uint32 program; //!< GLuint
  1097. uint32 result_shm_id; //!< uint32
  1098. uint32 result_shm_offset; //!< uint32
  1099. };
  1100. //! Command that corresponds to glIsRenderbuffer.
  1101. struct IsRenderbuffer {
  1102. static const CommandId kCmdId = 356;
  1103. typedef uint32 Result;
  1104. CommandHeader header;
  1105. uint32 renderbuffer; //!< GLuint
  1106. uint32 result_shm_id; //!< uint32
  1107. uint32 result_shm_offset; //!< uint32
  1108. };
  1109. //! Command that corresponds to glIsShader.
  1110. struct IsShader {
  1111. static const CommandId kCmdId = 357;
  1112. typedef uint32 Result;
  1113. CommandHeader header;
  1114. uint32 shader; //!< GLuint
  1115. uint32 result_shm_id; //!< uint32
  1116. uint32 result_shm_offset; //!< uint32
  1117. };
  1118. //! Command that corresponds to glIsTexture.
  1119. struct IsTexture {
  1120. static const CommandId kCmdId = 358;
  1121. typedef uint32 Result;
  1122. CommandHeader header;
  1123. uint32 texture; //!< GLuint
  1124. uint32 result_shm_id; //!< uint32
  1125. uint32 result_shm_offset; //!< uint32
  1126. };
  1127. //! Command that corresponds to glLineWidth.
  1128. struct LineWidth {
  1129. static const CommandId kCmdId = 359;
  1130. CommandHeader header;
  1131. float width; //!< GLfloat
  1132. };
  1133. //! Command that corresponds to glLinkProgram.
  1134. struct LinkProgram {
  1135. static const CommandId kCmdId = 360;
  1136. CommandHeader header;
  1137. uint32 program; //!< GLuint
  1138. };
  1139. //! Command that corresponds to glPixelStorei.
  1140. struct PixelStorei {
  1141. static const CommandId kCmdId = 361;
  1142. CommandHeader header;
  1143. uint32 pname; //!< GLenum
  1144. int32 param; //!< GLint
  1145. };
  1146. //! Command that corresponds to glPolygonOffset.
  1147. struct PolygonOffset {
  1148. static const CommandId kCmdId = 362;
  1149. CommandHeader header;
  1150. float factor; //!< GLfloat
  1151. float units; //!< GLfloat
  1152. };
  1153. //! Command that corresponds to glReadPixels.
  1154. //! ReadPixels has the result separated from the pixel buffer so that
  1155. //! it is easier to specify the result going to some specific place
  1156. //! that exactly fits the rectangle of pixels.
  1157. struct ReadPixels {
  1158. static const CommandId kCmdId = 363;
  1159. typedef uint32 Result;
  1160. CommandHeader header;
  1161. int32 x; //!< GLint
  1162. int32 y; //!< GLint
  1163. int32 width; //!< GLsizei
  1164. int32 height; //!< GLsizei
  1165. uint32 format; //!< GLenum
  1166. uint32 type; //!< GLenum
  1167. uint32 pixels_shm_id; //!< uint32
  1168. uint32 pixels_shm_offset; //!< uint32
  1169. uint32 result_shm_id; //!< uint32
  1170. uint32 result_shm_offset; //!< uint32
  1171. };
  1172. //! Command that corresponds to glReleaseShaderCompiler.
  1173. struct ReleaseShaderCompiler {
  1174. static const CommandId kCmdId = 437;
  1175. CommandHeader header;
  1176. };
  1177. //! Command that corresponds to glRenderbufferStorage.
  1178. struct RenderbufferStorage {
  1179. static const CommandId kCmdId = 364;
  1180. CommandHeader header;
  1181. uint32 target; //!< GLenum
  1182. uint32 internalformat; //!< GLenum
  1183. int32 width; //!< GLsizei
  1184. int32 height; //!< GLsizei
  1185. };
  1186. //! Command that corresponds to glSampleCoverage.
  1187. struct SampleCoverage {
  1188. static const CommandId kCmdId = 365;
  1189. CommandHeader header;
  1190. float value; //!< GLclampf
  1191. uint32 invert; //!< GLboolean
  1192. };
  1193. //! Command that corresponds to glScissor.
  1194. struct Scissor {
  1195. static const CommandId kCmdId = 366;
  1196. CommandHeader header;
  1197. int32 x; //!< GLint
  1198. int32 y; //!< GLint
  1199. int32 width; //!< GLsizei
  1200. int32 height; //!< GLsizei
  1201. };
  1202. //! Command that corresponds to glShaderBinary.
  1203. struct ShaderBinary {
  1204. static const CommandId kCmdId = 436;
  1205. CommandHeader header;
  1206. int32 n; //!< GLsizei
  1207. uint32 shaders_shm_id; //!< uint32
  1208. uint32 shaders_shm_offset; //!< uint32
  1209. uint32 binaryformat; //!< GLenum
  1210. uint32 binary_shm_id; //!< uint32
  1211. uint32 binary_shm_offset; //!< uint32
  1212. int32 length; //!< GLsizei
  1213. };
  1214. //! Command that corresponds to glShaderSource.
  1215. struct ShaderSource {
  1216. static const CommandId kCmdId = 367;
  1217. CommandHeader header;
  1218. uint32 shader; //!< GLuint
  1219. uint32 data_shm_id; //!< uint32
  1220. uint32 data_shm_offset; //!< uint32
  1221. uint32 data_size; //!< uint32
  1222. };
  1223. //! Immediate version of command that corresponds to glShaderSource.
  1224. struct ShaderSourceImmediate {
  1225. static const CommandId kCmdId = 368;
  1226. CommandHeader header;
  1227. uint32 shader; //!< GLuint
  1228. uint32 data_size; //!< uint32
  1229. };
  1230. //! Bucket version of command that corresponds to glShaderSource.
  1231. struct ShaderSourceBucket {
  1232. static const CommandId kCmdId = 435;
  1233. CommandHeader header;
  1234. uint32 shader; //!< GLuint
  1235. uint32 data_bucket_id; //!< uint32
  1236. };
  1237. //! Command that corresponds to glStencilFunc.
  1238. struct StencilFunc {
  1239. static const CommandId kCmdId = 369;
  1240. CommandHeader header;
  1241. uint32 func; //!< GLenum
  1242. int32 ref; //!< GLint
  1243. uint32 mask; //!< GLuint
  1244. };
  1245. //! Command that corresponds to glStencilFuncSeparate.
  1246. struct StencilFuncSeparate {
  1247. static const CommandId kCmdId = 370;
  1248. CommandHeader header;
  1249. uint32 face; //!< GLenum
  1250. uint32 func; //!< GLenum
  1251. int32 ref; //!< GLint
  1252. uint32 mask; //!< GLuint
  1253. };
  1254. //! Command that corresponds to glStencilMask.
  1255. struct StencilMask {
  1256. static const CommandId kCmdId = 371;
  1257. CommandHeader header;
  1258. uint32 mask; //!< GLuint
  1259. };
  1260. //! Command that corresponds to glStencilMaskSeparate.
  1261. struct StencilMaskSeparate {
  1262. static const CommandId kCmdId = 372;
  1263. CommandHeader header;
  1264. uint32 face; //!< GLenum
  1265. uint32 mask; //!< GLuint
  1266. };
  1267. //! Command that corresponds to glStencilOp.
  1268. struct StencilOp {
  1269. static const CommandId kCmdId = 373;
  1270. CommandHeader header;
  1271. uint32 fail; //!< GLenum
  1272. uint32 zfail; //!< GLenum
  1273. uint32 zpass; //!< GLenum
  1274. };
  1275. //! Command that corresponds to glStencilOpSeparate.
  1276. struct StencilOpSeparate {
  1277. static const CommandId kCmdId = 374;
  1278. CommandHeader header;
  1279. uint32 face; //!< GLenum
  1280. uint32 fail; //!< GLenum
  1281. uint32 zfail; //!< GLenum
  1282. uint32 zpass; //!< GLenum
  1283. };
  1284. //! Command that corresponds to glTexImage2D.
  1285. struct TexImage2D {
  1286. static const CommandId kCmdId = 375;
  1287. CommandHeader header;
  1288. uint32 target; //!< GLenum
  1289. int32 level; //!< GLint
  1290. int32 internalformat; //!< GLint
  1291. int32 width; //!< GLsizei
  1292. int32 height; //!< GLsizei
  1293. int32 border; //!< GLint
  1294. uint32 format; //!< GLenum
  1295. uint32 type; //!< GLenum
  1296. uint32 pixels_shm_id; //!< uint32
  1297. uint32 pixels_shm_offset; //!< uint32
  1298. };
  1299. //! Immediate version of command that corresponds to glTexImage2D.
  1300. struct TexImage2DImmediate {
  1301. static const CommandId kCmdId = 376;
  1302. CommandHeader header;
  1303. uint32 target; //!< GLenum
  1304. int32 level; //!< GLint
  1305. int32 internalformat; //!< GLint
  1306. int32 width; //!< GLsizei
  1307. int32 height; //!< GLsizei
  1308. int32 border; //!< GLint
  1309. uint32 format; //!< GLenum
  1310. uint32 type; //!< GLenum
  1311. };
  1312. //! Command that corresponds to glTexParameterf.
  1313. struct TexParameterf {
  1314. static const CommandId kCmdId = 377;
  1315. CommandHeader header;
  1316. uint32 target; //!< GLenum
  1317. uint32 pname; //!< GLenum
  1318. float param; //!< GLfloat
  1319. };
  1320. //! Command that corresponds to glTexParameterfv.
  1321. struct TexParameterfv {
  1322. static const CommandId kCmdId = 378;
  1323. CommandHeader header;
  1324. uint32 target; //!< GLenum
  1325. uint32 pname; //!< GLenum
  1326. uint32 params_shm_id; //!< uint32
  1327. uint32 params_shm_offset; //!< uint32
  1328. };
  1329. //! Immediate version of command that corresponds to glTexParameterfv.
  1330. struct TexParameterfvImmediate {
  1331. static const CommandId kCmdId = 379;
  1332. CommandHeader header;
  1333. uint32 target; //!< GLenum
  1334. uint32 pname; //!< GLenum
  1335. };
  1336. //! Command that corresponds to glTexParameteri.
  1337. struct TexParameteri {
  1338. static const CommandId kCmdId = 380;
  1339. CommandHeader header;
  1340. uint32 target; //!< GLenum
  1341. uint32 pname; //!< GLenum
  1342. int32 param; //!< GLint
  1343. };
  1344. //! Command that corresponds to glTexParameteriv.
  1345. struct TexParameteriv {
  1346. static const CommandId kCmdId = 381;
  1347. CommandHeader header;
  1348. uint32 target; //!< GLenum
  1349. uint32 pname; //!< GLenum
  1350. uint32 params_shm_id; //!< uint32
  1351. uint32 params_shm_offset; //!< uint32
  1352. };
  1353. //! Immediate version of command that corresponds to glTexParameteriv.
  1354. struct TexParameterivImmediate {
  1355. static const CommandId kCmdId = 382;
  1356. CommandHeader header;
  1357. uint32 target; //!< GLenum
  1358. uint32 pname; //!< GLenum
  1359. };
  1360. //! Command that corresponds to glTexSubImage2D.
  1361. struct TexSubImage2D {
  1362. static const CommandId kCmdId = 383;
  1363. CommandHeader header;
  1364. uint32 target; //!< GLenum
  1365. int32 level; //!< GLint
  1366. int32 xoffset; //!< GLint
  1367. int32 yoffset; //!< GLint
  1368. int32 width; //!< GLsizei
  1369. int32 height; //!< GLsizei
  1370. uint32 format; //!< GLenum
  1371. uint32 type; //!< GLenum
  1372. uint32 pixels_shm_id; //!< uint32
  1373. uint32 pixels_shm_offset; //!< uint32
  1374. };
  1375. //! Immediate version of command that corresponds to glTexSubImage2D.
  1376. struct TexSubImage2DImmediate {
  1377. static const CommandId kCmdId = 384;
  1378. CommandHeader header;
  1379. uint32 target; //!< GLenum
  1380. int32 level; //!< GLint
  1381. int32 xoffset; //!< GLint
  1382. int32 yoffset; //!< GLint
  1383. int32 width; //!< GLsizei
  1384. int32 height; //!< GLsizei
  1385. uint32 format; //!< GLenum
  1386. uint32 type; //!< GLenum
  1387. };
  1388. //! Command that corresponds to glUniform1f.
  1389. struct Uniform1f {
  1390. static const CommandId kCmdId = 385;
  1391. CommandHeader header;
  1392. int32 location; //!< GLint
  1393. float x; //!< GLfloat
  1394. };
  1395. //! Command that corresponds to glUniform1fv.
  1396. struct Uniform1fv {
  1397. static const CommandId kCmdId = 386;
  1398. CommandHeader header;
  1399. int32 location; //!< GLint
  1400. int32 count; //!< GLsizei
  1401. uint32 v_shm_id; //!< uint32
  1402. uint32 v_shm_offset; //!< uint32
  1403. };
  1404. //! Immediate version of command that corresponds to glUniform1fv.
  1405. struct Uniform1fvImmediate {
  1406. static const CommandId kCmdId = 387;
  1407. CommandHeader header;
  1408. int32 location; //!< GLint
  1409. int32 count; //!< GLsizei
  1410. };
  1411. //! Command that corresponds to glUniform1i.
  1412. struct Uniform1i {
  1413. static const CommandId kCmdId = 388;
  1414. CommandHeader header;
  1415. int32 location; //!< GLint
  1416. int32 x; //!< GLint
  1417. };
  1418. //! Command that corresponds to glUniform1iv.
  1419. struct Uniform1iv {
  1420. static const CommandId kCmdId = 389;
  1421. CommandHeader header;
  1422. int32 location; //!< GLint
  1423. int32 count; //!< GLsizei
  1424. uint32 v_shm_id; //!< uint32
  1425. uint32 v_shm_offset; //!< uint32
  1426. };
  1427. //! Immediate version of command that corresponds to glUniform1iv.
  1428. struct Uniform1ivImmediate {
  1429. static const CommandId kCmdId = 390;
  1430. CommandHeader header;
  1431. int32 location; //!< GLint
  1432. int32 count; //!< GLsizei
  1433. };
  1434. //! Command that corresponds to glUniform2f.
  1435. struct Uniform2f {
  1436. static const CommandId kCmdId = 391;
  1437. CommandHeader header;
  1438. int32 location; //!< GLint
  1439. float x; //!< GLfloat
  1440. float y; //!< GLfloat
  1441. };
  1442. //! Command that corresponds to glUniform2fv.
  1443. struct Uniform2fv {
  1444. static const CommandId kCmdId = 392;
  1445. CommandHeader header;
  1446. int32 location; //!< GLint
  1447. int32 count; //!< GLsizei
  1448. uint32 v_shm_id; //!< uint32
  1449. uint32 v_shm_offset; //!< uint32
  1450. };
  1451. //! Immediate version of command that corresponds to glUniform2fv.
  1452. struct Uniform2fvImmediate {
  1453. static const CommandId kCmdId = 393;
  1454. CommandHeader header;
  1455. int32 location; //!< GLint
  1456. int32 count; //!< GLsizei
  1457. };
  1458. //! Command that corresponds to glUniform2i.
  1459. struct Uniform2i {
  1460. static const CommandId kCmdId = 394;
  1461. CommandHeader header;
  1462. int32 location; //!< GLint
  1463. int32 x; //!< GLint
  1464. int32 y; //!< GLint
  1465. };
  1466. //! Command that corresponds to glUniform2iv.
  1467. struct Uniform2iv {
  1468. static const CommandId kCmdId = 395;
  1469. CommandHeader header;
  1470. int32 location; //!< GLint
  1471. int32 count; //!< GLsizei
  1472. uint32 v_shm_id; //!< uint32
  1473. uint32 v_shm_offset; //!< uint32
  1474. };
  1475. //! Immediate version of command that corresponds to glUniform2iv.
  1476. struct Uniform2ivImmediate {
  1477. static const CommandId kCmdId = 396;
  1478. CommandHeader header;
  1479. int32 location; //!< GLint
  1480. int32 count; //!< GLsizei
  1481. };
  1482. //! Command that corresponds to glUniform3f.
  1483. struct Uniform3f {
  1484. static const CommandId kCmdId = 397;
  1485. CommandHeader header;
  1486. int32 location; //!< GLint
  1487. float x; //!< GLfloat
  1488. float y; //!< GLfloat
  1489. float z; //!< GLfloat
  1490. };
  1491. //! Command that corresponds to glUniform3fv.
  1492. struct Uniform3fv {
  1493. static const CommandId kCmdId = 398;
  1494. CommandHeader header;
  1495. int32 location; //!< GLint
  1496. int32 count; //!< GLsizei
  1497. uint32 v_shm_id; //!< uint32
  1498. uint32 v_shm_offset; //!< uint32
  1499. };
  1500. //! Immediate version of command that corresponds to glUniform3fv.
  1501. struct Uniform3fvImmediate {
  1502. static const CommandId kCmdId = 399;
  1503. CommandHeader header;
  1504. int32 location; //!< GLint
  1505. int32 count; //!< GLsizei
  1506. };
  1507. //! Command that corresponds to glUniform3i.
  1508. struct Uniform3i {
  1509. static const CommandId kCmdId = 400;
  1510. CommandHeader header;
  1511. int32 location; //!< GLint
  1512. int32 x; //!< GLint
  1513. int32 y; //!< GLint
  1514. int32 z; //!< GLint
  1515. };
  1516. //! Command that corresponds to glUniform3iv.
  1517. struct Uniform3iv {
  1518. static const CommandId kCmdId = 401;
  1519. CommandHeader header;
  1520. int32 location; //!< GLint
  1521. int32 count; //!< GLsizei
  1522. uint32 v_shm_id; //!< uint32
  1523. uint32 v_shm_offset; //!< uint32
  1524. };
  1525. //! Immediate version of command that corresponds to glUniform3iv.
  1526. struct Uniform3ivImmediate {
  1527. static const CommandId kCmdId = 402;
  1528. CommandHeader header;
  1529. int32 location; //!< GLint
  1530. int32 count; //!< GLsizei
  1531. };
  1532. //! Command that corresponds to glUniform4f.
  1533. struct Uniform4f {
  1534. static const CommandId kCmdId = 403;
  1535. CommandHeader header;
  1536. int32 location; //!< GLint
  1537. float x; //!< GLfloat
  1538. float y; //!< GLfloat
  1539. float z; //!< GLfloat
  1540. float w; //!< GLfloat
  1541. };
  1542. //! Command that corresponds to glUniform4fv.
  1543. struct Uniform4fv {
  1544. static const CommandId kCmdId = 404;
  1545. CommandHeader header;
  1546. int32 location; //!< GLint
  1547. int32 count; //!< GLsizei
  1548. uint32 v_shm_id; //!< uint32
  1549. uint32 v_shm_offset; //!< uint32
  1550. };
  1551. //! Immediate version of command that corresponds to glUniform4fv.
  1552. struct Uniform4fvImmediate {
  1553. static const CommandId kCmdId = 405;
  1554. CommandHeader header;
  1555. int32 location; //!< GLint
  1556. int32 count; //!< GLsizei
  1557. };
  1558. //! Command that corresponds to glUniform4i.
  1559. struct Uniform4i {
  1560. static const CommandId kCmdId = 406;
  1561. CommandHeader header;
  1562. int32 location; //!< GLint
  1563. int32 x; //!< GLint
  1564. int32 y; //!< GLint
  1565. int32 z; //!< GLint
  1566. int32 w; //!< GLint
  1567. };
  1568. //! Command that corresponds to glUniform4iv.
  1569. struct Uniform4iv {
  1570. static const CommandId kCmdId = 407;
  1571. CommandHeader header;
  1572. int32 location; //!< GLint
  1573. int32 count; //!< GLsizei
  1574. uint32 v_shm_id; //!< uint32
  1575. uint32 v_shm_offset; //!< uint32
  1576. };
  1577. //! Immediate version of command that corresponds to glUniform4iv.
  1578. struct Uniform4ivImmediate {
  1579. static const CommandId kCmdId = 408;
  1580. CommandHeader header;
  1581. int32 location; //!< GLint
  1582. int32 count; //!< GLsizei
  1583. };
  1584. //! Command that corresponds to glUniformMatrix2fv.
  1585. struct UniformMatrix2fv {
  1586. static const CommandId kCmdId = 409;
  1587. CommandHeader header;
  1588. int32 location; //!< GLint
  1589. int32 count; //!< GLsizei
  1590. uint32 transpose; //!< GLboolean
  1591. uint32 value_shm_id; //!< uint32
  1592. uint32 value_shm_offset; //!< uint32
  1593. };
  1594. //! Immediate version of command that corresponds to glUniformMatrix2fv.
  1595. struct UniformMatrix2fvImmediate {
  1596. static const CommandId kCmdId = 410;
  1597. CommandHeader header;
  1598. int32 location; //!< GLint
  1599. int32 count; //!< GLsizei
  1600. uint32 transpose; //!< GLboolean
  1601. };
  1602. //! Command that corresponds to glUniformMatrix3fv.
  1603. struct UniformMatrix3fv {
  1604. static const CommandId kCmdId = 411;
  1605. CommandHeader header;
  1606. int32 location; //!< GLint
  1607. int32 count; //!< GLsizei
  1608. uint32 transpose; //!< GLboolean
  1609. uint32 value_shm_id; //!< uint32
  1610. uint32 value_shm_offset; //!< uint32
  1611. };
  1612. //! Immediate version of command that corresponds to glUniformMatrix3fv.
  1613. struct UniformMatrix3fvImmediate {
  1614. static const CommandId kCmdId = 412;
  1615. CommandHeader header;
  1616. int32 location; //!< GLint
  1617. int32 count; //!< GLsizei
  1618. uint32 transpose; //!< GLboolean
  1619. };
  1620. //! Command that corresponds to glUniformMatrix4fv.
  1621. struct UniformMatrix4fv {
  1622. static const CommandId kCmdId = 413;
  1623. CommandHeader header;
  1624. int32 location; //!< GLint
  1625. int32 count; //!< GLsizei
  1626. uint32 transpose; //!< GLboolean
  1627. uint32 value_shm_id; //!< uint32
  1628. uint32 value_shm_offset; //!< uint32
  1629. };
  1630. //! Immediate version of command that corresponds to glUniformMatrix4fv.
  1631. struct UniformMatrix4fvImmediate {
  1632. static const CommandId kCmdId = 414;
  1633. CommandHeader header;
  1634. int32 location; //!< GLint
  1635. int32 count; //!< GLsizei
  1636. uint32 transpose; //!< GLboolean
  1637. };
  1638. //! Command that corresponds to glUseProgram.
  1639. struct UseProgram {
  1640. static const CommandId kCmdId = 415;
  1641. CommandHeader header;
  1642. uint32 program; //!< GLuint
  1643. };
  1644. //! Command that corresponds to glValidateProgram.
  1645. struct ValidateProgram {
  1646. static const CommandId kCmdId = 416;
  1647. CommandHeader header;
  1648. uint32 program; //!< GLuint
  1649. };
  1650. //! Command that corresponds to glVertexAttrib1f.
  1651. struct VertexAttrib1f {
  1652. static const CommandId kCmdId = 417;
  1653. CommandHeader header;
  1654. uint32 indx; //!< GLuint
  1655. float x; //!< GLfloat
  1656. };
  1657. //! Command that corresponds to glVertexAttrib1fv.
  1658. struct VertexAttrib1fv {
  1659. static const CommandId kCmdId = 418;
  1660. CommandHeader header;
  1661. uint32 indx; //!< GLuint
  1662. uint32 values_shm_id; //!< uint32
  1663. uint32 values_shm_offset; //!< uint32
  1664. };
  1665. //! Immediate version of command that corresponds to glVertexAttrib1fv.
  1666. struct VertexAttrib1fvImmediate {
  1667. static const CommandId kCmdId = 419;
  1668. CommandHeader header;
  1669. uint32 indx; //!< GLuint
  1670. };
  1671. //! Command that corresponds to glVertexAttrib2f.
  1672. struct VertexAttrib2f {
  1673. static const CommandId kCmdId = 420;
  1674. CommandHeader header;
  1675. uint32 indx; //!< GLuint
  1676. float x; //!< GLfloat
  1677. float y; //!< GLfloat
  1678. };
  1679. //! Command that corresponds to glVertexAttrib2fv.
  1680. struct VertexAttrib2fv {
  1681. static const CommandId kCmdId = 421;
  1682. CommandHeader header;
  1683. uint32 indx; //!< GLuint
  1684. uint32 values_shm_id; //!< uint32
  1685. uint32 values_shm_offset; //!< uint32
  1686. };
  1687. //! Immediate version of command that corresponds to glVertexAttrib2fv.
  1688. struct VertexAttrib2fvImmediate {
  1689. static const CommandId kCmdId = 422;
  1690. CommandHeader header;
  1691. uint32 indx; //!< GLuint
  1692. };
  1693. //! Command that corresponds to glVertexAttrib3f.
  1694. struct VertexAttrib3f {
  1695. static const CommandId kCmdId = 423;
  1696. CommandHeader header;
  1697. uint32 indx; //!< GLuint
  1698. float x; //!< GLfloat
  1699. float y; //!< GLfloat
  1700. float z; //!< GLfloat
  1701. };
  1702. //! Command that corresponds to glVertexAttrib3fv.
  1703. struct VertexAttrib3fv {
  1704. static const CommandId kCmdId = 424;
  1705. CommandHeader header;
  1706. uint32 indx; //!< GLuint
  1707. uint32 values_shm_id; //!< uint32
  1708. uint32 values_shm_offset; //!< uint32
  1709. };
  1710. //! Immediate version of command that corresponds to glVertexAttrib3fv.
  1711. struct VertexAttrib3fvImmediate {
  1712. static const CommandId kCmdId = 425;
  1713. CommandHeader header;
  1714. uint32 indx; //!< GLuint
  1715. };
  1716. //! Command that corresponds to glVertexAttrib4f.
  1717. struct VertexAttrib4f {
  1718. static const CommandId kCmdId = 426;
  1719. CommandHeader header;
  1720. uint32 indx; //!< GLuint
  1721. float x; //!< GLfloat
  1722. float y; //!< GLfloat
  1723. float z; //!< GLfloat
  1724. float w; //!< GLfloat
  1725. };
  1726. //! Command that corresponds to glVertexAttrib4fv.
  1727. struct VertexAttrib4fv {
  1728. static const CommandId kCmdId = 427;
  1729. CommandHeader header;
  1730. uint32 indx; //!< GLuint
  1731. uint32 values_shm_id; //!< uint32
  1732. uint32 values_shm_offset; //!< uint32
  1733. };
  1734. //! Immediate version of command that corresponds to glVertexAttrib4fv.
  1735. struct VertexAttrib4fvImmediate {
  1736. static const CommandId kCmdId = 428;
  1737. CommandHeader header;
  1738. uint32 indx; //!< GLuint
  1739. };
  1740. //! Command that corresponds to glVertexAttribPointer.
  1741. struct VertexAttribPointer {
  1742. static const CommandId kCmdId = 429;
  1743. CommandHeader header;
  1744. uint32 indx; //!< GLuint
  1745. int32 size; //!< GLint
  1746. uint32 type; //!< GLenum
  1747. uint32 normalized; //!< GLboolean
  1748. int32 stride; //!< GLsizei
  1749. uint32 offset; //!< GLuint
  1750. };
  1751. //! Command that corresponds to glViewport.
  1752. struct Viewport {
  1753. static const CommandId kCmdId = 430;
  1754. CommandHeader header;
  1755. int32 x; //!< GLint
  1756. int32 y; //!< GLint
  1757. int32 width; //!< GLsizei
  1758. int32 height; //!< GLsizei
  1759. };
  1760. //! Command that corresponds to SwapBuffers.
  1761. struct SwapBuffers {
  1762. static const CommandId kCmdId = 431;
  1763. CommandHeader header;
  1764. };
  1765. //! Command that corresponds to GetMaxValueInBuffer.
  1766. struct GetMaxValueInBuffer {
  1767. static const CommandId kCmdId = 436;
  1768. typedef GLuint Result;
  1769. CommandHeader header;
  1770. uint32 buffer_id; //!< GLuint
  1771. int32 count; //!< GLsizei
  1772. uint32 type; //!< GLenum
  1773. uint32 offset; //!< GLuint
  1774. uint32 result_shm_id; //!< uint32
  1775. uint32 result_shm_offset; //!< uint32
  1776. };
  1777. //! Command that generates shared ids for contexts that share resources.
  1778. struct GenSharedIds {
  1779. static const CommandId kCmdId = 439;
  1780. CommandHeader header;
  1781. uint32 namespace_id; //!< GLuint
  1782. uint32 id_offset; //!< GLuint
  1783. int32 n; //!< GLsizei
  1784. uint32 ids_shm_id; //!< uint32
  1785. uint32 ids_shm_offset; //!< uint32
  1786. };
  1787. //! Command that deletes shared ids.
  1788. struct DeleteSharedIds {
  1789. static const CommandId kCmdId = 440;
  1790. CommandHeader header;
  1791. uint32 namespace_id; //!< GLuint
  1792. int32 n; //!< GLsizei
  1793. uint32 ids_shm_id; //!< uint32
  1794. uint32 ids_shm_offset; //!< uint32
  1795. };
  1796. //! Command that registers shared ids. It is an error to attempt
  1797. //! to register an id that is already registered.
  1798. struct RegisterSharedIds {
  1799. static const CommandId kCmdId = 441;
  1800. CommandHeader header;
  1801. uint32 namespace_id; //!< GLuint
  1802. int32 n; //!< GLsizei
  1803. uint32 ids_shm_id; //!< uint32
  1804. uint32 ids_shm_offset; //!< uint32
  1805. };
  1806. //! Command that enables features. The bucket should contain the feature string.
  1807. struct CommandBufferEnable {
  1808. static const CommandId kCmdId = 442;
  1809. typedef GLint Result;
  1810. CommandHeader header;
  1811. uint32 bucket_id; //!< GLuint
  1812. uint32 result_shm_id; //!< uint32
  1813. uint32 result_shm_offset; //!< uint32
  1814. };