1 Name 2 3 CHROMIUM_get_multiple 4 5 Name Strings 6 7 GL_CHROMIUM_get_multiple 8 9 Version 10 11 Last Modifed Date: July 22, 2011 12 13 Dependencies 14 15 OpenGL ES 2.0 is required. 16 17 Overview 18 19 This extension adds the ability to query multiple state and program 20 information in a single call. 21 22 Issues 23 24 25 New Tokens 26 27 None 28 29 New Procedures and Functions 30 31 void GetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, 32 GLint* results, GLsizeiptr size) 33 34 <pnames> points to an array of state enums that would normally be queried by 35 GetIntegerv. <count> is the number of pnames. <results> points memory large 36 enough to contain all the state being queried. <size> is the size of the 37 buffer pointed to be <results> 38 39 Example: <pnames> points to an array with VIEWPORT and MAX_TEXTURE_SIZE. 40 VIEWPORT returns 4 values, MAX_TEXTURE_SIZE returns 1 value. Therefore 41 results must point to a buffer of size 5 * sizeof(GLint) and size must be at 42 least 5 * sizeof(GLint) 43 44 INVALID_ENUM is generated if any of the pnames are not valid for GetIntegerv 45 46 INVALID_VALUE is generated if <size> does not equal the size needed for the 47 query 48 49 INVALID_VALUE is generated if the memory pointed to be <results> has not 50 been zeroed out. 51 52 void GetProgrmaInfoCHROMIUM (GLuint program, GLsizei bufsize, 53 GLsizei* size, void* info) 54 55 <program> is the program to query. <bufsize> is the size of the buffer to 56 hold the results. <size> is a pointer to a GLsizei to store the size needed 57 to hold the results. <info> is a pointer to memory to store the result. 58 59 To query the space needed for the results set <info> to NULL. 60 61 The format of the data that will be stored in the memory pointed to by 62 <info> is as follows. 63 64 struct ProgramInfoHeader { 65 uint32 link_status; // same as GetProgramiv called with LINK_STATUS 66 uint32 num_attribs; // the number of active attributes 67 uint32 num_uniforms; // the number of active uniforms 68 ProgramInput inputs[num_attribs + num_uniforms]; 69 } 70 71 // The data for one attrib or uniform from GetProgramInfoCHROMIUM. 72 struct ProgramInput { 73 uint32 type; // The type (GL_VEC3, GL_SAMPLER_2D, etc. 74 int32 size; // The size (size of array for uniforms) 75 uint32 location_offset; // offset from ProgramInfoHeader to 'size' 76 // locations for uniforms, 1 for attribs. 77 uint32 name_offset; // offset from ProgrmaInfoHeader to start of 78 // name. 79 uint32 name_length; // length of the name. 80 }; 81 82 It is important to note that for attribs, size is the size of the attrib and 83 location_offset points to a single location. For uniforms, size is the 84 number of array elements and location_offset points to an array of size 85 locations, one of each element of the array. 86 87 INVALID_VALUE is generated if <bufsize> is less than 0 88 89 INVALID_VALUE is generated if <size> is NULL 90 91 INVALID_OPERATION is returned if <size> is less than the size needed to hold 92 all the results. 93 94 95 NOTE: This function is not intended to be used directly. Chromium uses it 96 internally to cache data. 97 98 99 Errors 100 101 None. 102 103 New State 104 105 None. 106 107 Revision History 108 109 7/22/2011 Documented the extension 110