YaGL: glGetUniformIndices implemented 43/13143/1
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 8 Nov 2013 16:12:22 +0000 (20:12 +0400)
committerStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 8 Nov 2013 16:12:22 +0000 (20:12 +0400)
Change-Id: I79b400b6f88b38055ed249ede3e0cd5739526de2

hw/yagl_apis/gles/yagl_gles_calls.c
hw/yagl_apis/gles/yagl_host_gles_calls.c
hw/yagl_apis/gles/yagl_host_gles_calls.h
hw/yagl_drivers/gles_ogl/yagl_gles_ogl.c
hw/yagl_gles_driver.h

index 31b24e0..7ff2d54 100644 (file)
@@ -2194,7 +2194,33 @@ static bool yagl_func_glGetActiveUniformsiv(struct yagl_transport *t)
 }
 
 /*
- * glGetIntegerv dispatcher. id = 107
+ * glGetUniformIndices dispatcher. id = 107
+ */
+static bool yagl_func_glGetUniformIndices(struct yagl_transport *t)
+{
+    GLuint program;
+    const GLchar *uniformNames;
+    int32_t uniformNames_count;
+    GLuint *uniformIndices;
+    int32_t uniformIndices_maxcount;
+    int32_t *uniformIndices_count;
+    program = yagl_transport_get_out_GLuint(t);
+    if (!yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&uniformNames, &uniformNames_count)) {
+        return false;
+    }
+    if (!yagl_transport_get_in_array(t, sizeof(GLuint), (void**)&uniformIndices, &uniformIndices_maxcount, &uniformIndices_count)) {
+        return false;
+    }
+    YAGL_LOG_FUNC_ENTER_SPLIT3(glGetUniformIndices, GLuint, void*, void*, program, uniformNames, uniformIndices);
+    *uniformIndices_count = 0;
+    (void)yagl_host_glGetUniformIndices(program, uniformNames, uniformNames_count, uniformIndices, uniformIndices_maxcount, uniformIndices_count);
+    YAGL_LOG_FUNC_EXIT(NULL);
+
+    return true;
+}
+
+/*
+ * glGetIntegerv dispatcher. id = 108
  */
 static bool yagl_func_glGetIntegerv(struct yagl_transport *t)
 {
@@ -2215,7 +2241,7 @@ static bool yagl_func_glGetIntegerv(struct yagl_transport *t)
 }
 
 /*
- * glGetFloatv dispatcher. id = 108
+ * glGetFloatv dispatcher. id = 109
  */
 static bool yagl_func_glGetFloatv(struct yagl_transport *t)
 {
@@ -2236,7 +2262,7 @@ static bool yagl_func_glGetFloatv(struct yagl_transport *t)
 }
 
 /*
- * glGetString dispatcher. id = 109
+ * glGetString dispatcher. id = 110
  */
 static bool yagl_func_glGetString(struct yagl_transport *t)
 {
@@ -2257,7 +2283,7 @@ static bool yagl_func_glGetString(struct yagl_transport *t)
 }
 
 /*
- * glIsEnabled dispatcher. id = 110
+ * glIsEnabled dispatcher. id = 111
  */
 static bool yagl_func_glIsEnabled(struct yagl_transport *t)
 {
@@ -2273,7 +2299,7 @@ static bool yagl_func_glIsEnabled(struct yagl_transport *t)
 }
 
 /*
- * glDeleteObjects dispatcher. id = 111
+ * glDeleteObjects dispatcher. id = 112
  */
 static bool yagl_func_glDeleteObjects(struct yagl_transport *t)
 {
@@ -2290,7 +2316,7 @@ static bool yagl_func_glDeleteObjects(struct yagl_transport *t)
 }
 
 /*
- * glBlendEquation dispatcher. id = 112
+ * glBlendEquation dispatcher. id = 113
  */
 static bool yagl_func_glBlendEquation(struct yagl_transport *t)
 {
@@ -2304,7 +2330,7 @@ static bool yagl_func_glBlendEquation(struct yagl_transport *t)
 }
 
 /*
- * glBlendEquationSeparate dispatcher. id = 113
+ * glBlendEquationSeparate dispatcher. id = 114
  */
 static bool yagl_func_glBlendEquationSeparate(struct yagl_transport *t)
 {
@@ -2320,7 +2346,7 @@ static bool yagl_func_glBlendEquationSeparate(struct yagl_transport *t)
 }
 
 /*
- * glBlendFunc dispatcher. id = 114
+ * glBlendFunc dispatcher. id = 115
  */
 static bool yagl_func_glBlendFunc(struct yagl_transport *t)
 {
@@ -2336,7 +2362,7 @@ static bool yagl_func_glBlendFunc(struct yagl_transport *t)
 }
 
 /*
- * glBlendFuncSeparate dispatcher. id = 115
+ * glBlendFuncSeparate dispatcher. id = 116
  */
 static bool yagl_func_glBlendFuncSeparate(struct yagl_transport *t)
 {
@@ -2356,7 +2382,7 @@ static bool yagl_func_glBlendFuncSeparate(struct yagl_transport *t)
 }
 
 /*
- * glBlendColor dispatcher. id = 116
+ * glBlendColor dispatcher. id = 117
  */
 static bool yagl_func_glBlendColor(struct yagl_transport *t)
 {
@@ -2376,7 +2402,7 @@ static bool yagl_func_glBlendColor(struct yagl_transport *t)
 }
 
 /*
- * glClear dispatcher. id = 117
+ * glClear dispatcher. id = 118
  */
 static bool yagl_func_glClear(struct yagl_transport *t)
 {
@@ -2390,7 +2416,7 @@ static bool yagl_func_glClear(struct yagl_transport *t)
 }
 
 /*
- * glClearColor dispatcher. id = 118
+ * glClearColor dispatcher. id = 119
  */
 static bool yagl_func_glClearColor(struct yagl_transport *t)
 {
@@ -2410,7 +2436,7 @@ static bool yagl_func_glClearColor(struct yagl_transport *t)
 }
 
 /*
- * glClearDepthf dispatcher. id = 119
+ * glClearDepthf dispatcher. id = 120
  */
 static bool yagl_func_glClearDepthf(struct yagl_transport *t)
 {
@@ -2424,7 +2450,7 @@ static bool yagl_func_glClearDepthf(struct yagl_transport *t)
 }
 
 /*
- * glClearStencil dispatcher. id = 120
+ * glClearStencil dispatcher. id = 121
  */
 static bool yagl_func_glClearStencil(struct yagl_transport *t)
 {
@@ -2438,7 +2464,7 @@ static bool yagl_func_glClearStencil(struct yagl_transport *t)
 }
 
 /*
- * glColorMask dispatcher. id = 121
+ * glColorMask dispatcher. id = 122
  */
 static bool yagl_func_glColorMask(struct yagl_transport *t)
 {
@@ -2458,7 +2484,7 @@ static bool yagl_func_glColorMask(struct yagl_transport *t)
 }
 
 /*
- * glCullFace dispatcher. id = 122
+ * glCullFace dispatcher. id = 123
  */
 static bool yagl_func_glCullFace(struct yagl_transport *t)
 {
@@ -2472,7 +2498,7 @@ static bool yagl_func_glCullFace(struct yagl_transport *t)
 }
 
 /*
- * glDepthFunc dispatcher. id = 123
+ * glDepthFunc dispatcher. id = 124
  */
 static bool yagl_func_glDepthFunc(struct yagl_transport *t)
 {
@@ -2486,7 +2512,7 @@ static bool yagl_func_glDepthFunc(struct yagl_transport *t)
 }
 
 /*
- * glDepthMask dispatcher. id = 124
+ * glDepthMask dispatcher. id = 125
  */
 static bool yagl_func_glDepthMask(struct yagl_transport *t)
 {
@@ -2500,7 +2526,7 @@ static bool yagl_func_glDepthMask(struct yagl_transport *t)
 }
 
 /*
- * glDepthRangef dispatcher. id = 125
+ * glDepthRangef dispatcher. id = 126
  */
 static bool yagl_func_glDepthRangef(struct yagl_transport *t)
 {
@@ -2516,7 +2542,7 @@ static bool yagl_func_glDepthRangef(struct yagl_transport *t)
 }
 
 /*
- * glEnable dispatcher. id = 126
+ * glEnable dispatcher. id = 127
  */
 static bool yagl_func_glEnable(struct yagl_transport *t)
 {
@@ -2530,7 +2556,7 @@ static bool yagl_func_glEnable(struct yagl_transport *t)
 }
 
 /*
- * glDisable dispatcher. id = 127
+ * glDisable dispatcher. id = 128
  */
 static bool yagl_func_glDisable(struct yagl_transport *t)
 {
@@ -2544,7 +2570,7 @@ static bool yagl_func_glDisable(struct yagl_transport *t)
 }
 
 /*
- * glFlush dispatcher. id = 128
+ * glFlush dispatcher. id = 129
  */
 static bool yagl_func_glFlush(struct yagl_transport *t)
 {
@@ -2556,7 +2582,7 @@ static bool yagl_func_glFlush(struct yagl_transport *t)
 }
 
 /*
- * glFrontFace dispatcher. id = 129
+ * glFrontFace dispatcher. id = 130
  */
 static bool yagl_func_glFrontFace(struct yagl_transport *t)
 {
@@ -2570,7 +2596,7 @@ static bool yagl_func_glFrontFace(struct yagl_transport *t)
 }
 
 /*
- * glGenerateMipmap dispatcher. id = 130
+ * glGenerateMipmap dispatcher. id = 131
  */
 static bool yagl_func_glGenerateMipmap(struct yagl_transport *t)
 {
@@ -2584,7 +2610,7 @@ static bool yagl_func_glGenerateMipmap(struct yagl_transport *t)
 }
 
 /*
- * glHint dispatcher. id = 131
+ * glHint dispatcher. id = 132
  */
 static bool yagl_func_glHint(struct yagl_transport *t)
 {
@@ -2600,7 +2626,7 @@ static bool yagl_func_glHint(struct yagl_transport *t)
 }
 
 /*
- * glLineWidth dispatcher. id = 132
+ * glLineWidth dispatcher. id = 133
  */
 static bool yagl_func_glLineWidth(struct yagl_transport *t)
 {
@@ -2614,7 +2640,7 @@ static bool yagl_func_glLineWidth(struct yagl_transport *t)
 }
 
 /*
- * glPixelStorei dispatcher. id = 133
+ * glPixelStorei dispatcher. id = 134
  */
 static bool yagl_func_glPixelStorei(struct yagl_transport *t)
 {
@@ -2630,7 +2656,7 @@ static bool yagl_func_glPixelStorei(struct yagl_transport *t)
 }
 
 /*
- * glPolygonOffset dispatcher. id = 134
+ * glPolygonOffset dispatcher. id = 135
  */
 static bool yagl_func_glPolygonOffset(struct yagl_transport *t)
 {
@@ -2646,7 +2672,7 @@ static bool yagl_func_glPolygonOffset(struct yagl_transport *t)
 }
 
 /*
- * glScissor dispatcher. id = 135
+ * glScissor dispatcher. id = 136
  */
 static bool yagl_func_glScissor(struct yagl_transport *t)
 {
@@ -2666,7 +2692,7 @@ static bool yagl_func_glScissor(struct yagl_transport *t)
 }
 
 /*
- * glStencilFunc dispatcher. id = 136
+ * glStencilFunc dispatcher. id = 137
  */
 static bool yagl_func_glStencilFunc(struct yagl_transport *t)
 {
@@ -2684,7 +2710,7 @@ static bool yagl_func_glStencilFunc(struct yagl_transport *t)
 }
 
 /*
- * glStencilMask dispatcher. id = 137
+ * glStencilMask dispatcher. id = 138
  */
 static bool yagl_func_glStencilMask(struct yagl_transport *t)
 {
@@ -2698,7 +2724,7 @@ static bool yagl_func_glStencilMask(struct yagl_transport *t)
 }
 
 /*
- * glStencilOp dispatcher. id = 138
+ * glStencilOp dispatcher. id = 139
  */
 static bool yagl_func_glStencilOp(struct yagl_transport *t)
 {
@@ -2716,7 +2742,7 @@ static bool yagl_func_glStencilOp(struct yagl_transport *t)
 }
 
 /*
- * glSampleCoverage dispatcher. id = 139
+ * glSampleCoverage dispatcher. id = 140
  */
 static bool yagl_func_glSampleCoverage(struct yagl_transport *t)
 {
@@ -2732,7 +2758,7 @@ static bool yagl_func_glSampleCoverage(struct yagl_transport *t)
 }
 
 /*
- * glViewport dispatcher. id = 140
+ * glViewport dispatcher. id = 141
  */
 static bool yagl_func_glViewport(struct yagl_transport *t)
 {
@@ -2752,7 +2778,7 @@ static bool yagl_func_glViewport(struct yagl_transport *t)
 }
 
 /*
- * glStencilFuncSeparate dispatcher. id = 141
+ * glStencilFuncSeparate dispatcher. id = 142
  */
 static bool yagl_func_glStencilFuncSeparate(struct yagl_transport *t)
 {
@@ -2772,7 +2798,7 @@ static bool yagl_func_glStencilFuncSeparate(struct yagl_transport *t)
 }
 
 /*
- * glStencilMaskSeparate dispatcher. id = 142
+ * glStencilMaskSeparate dispatcher. id = 143
  */
 static bool yagl_func_glStencilMaskSeparate(struct yagl_transport *t)
 {
@@ -2788,7 +2814,7 @@ static bool yagl_func_glStencilMaskSeparate(struct yagl_transport *t)
 }
 
 /*
- * glStencilOpSeparate dispatcher. id = 143
+ * glStencilOpSeparate dispatcher. id = 144
  */
 static bool yagl_func_glStencilOpSeparate(struct yagl_transport *t)
 {
@@ -2808,7 +2834,7 @@ static bool yagl_func_glStencilOpSeparate(struct yagl_transport *t)
 }
 
 /*
- * glPointSize dispatcher. id = 144
+ * glPointSize dispatcher. id = 145
  */
 static bool yagl_func_glPointSize(struct yagl_transport *t)
 {
@@ -2822,7 +2848,7 @@ static bool yagl_func_glPointSize(struct yagl_transport *t)
 }
 
 /*
- * glAlphaFunc dispatcher. id = 145
+ * glAlphaFunc dispatcher. id = 146
  */
 static bool yagl_func_glAlphaFunc(struct yagl_transport *t)
 {
@@ -2838,7 +2864,7 @@ static bool yagl_func_glAlphaFunc(struct yagl_transport *t)
 }
 
 /*
- * glMatrixMode dispatcher. id = 146
+ * glMatrixMode dispatcher. id = 147
  */
 static bool yagl_func_glMatrixMode(struct yagl_transport *t)
 {
@@ -2852,7 +2878,7 @@ static bool yagl_func_glMatrixMode(struct yagl_transport *t)
 }
 
 /*
- * glLoadIdentity dispatcher. id = 147
+ * glLoadIdentity dispatcher. id = 148
  */
 static bool yagl_func_glLoadIdentity(struct yagl_transport *t)
 {
@@ -2864,7 +2890,7 @@ static bool yagl_func_glLoadIdentity(struct yagl_transport *t)
 }
 
 /*
- * glPopMatrix dispatcher. id = 148
+ * glPopMatrix dispatcher. id = 149
  */
 static bool yagl_func_glPopMatrix(struct yagl_transport *t)
 {
@@ -2876,7 +2902,7 @@ static bool yagl_func_glPopMatrix(struct yagl_transport *t)
 }
 
 /*
- * glPushMatrix dispatcher. id = 149
+ * glPushMatrix dispatcher. id = 150
  */
 static bool yagl_func_glPushMatrix(struct yagl_transport *t)
 {
@@ -2888,7 +2914,7 @@ static bool yagl_func_glPushMatrix(struct yagl_transport *t)
 }
 
 /*
- * glRotatef dispatcher. id = 150
+ * glRotatef dispatcher. id = 151
  */
 static bool yagl_func_glRotatef(struct yagl_transport *t)
 {
@@ -2908,7 +2934,7 @@ static bool yagl_func_glRotatef(struct yagl_transport *t)
 }
 
 /*
- * glTranslatef dispatcher. id = 151
+ * glTranslatef dispatcher. id = 152
  */
 static bool yagl_func_glTranslatef(struct yagl_transport *t)
 {
@@ -2926,7 +2952,7 @@ static bool yagl_func_glTranslatef(struct yagl_transport *t)
 }
 
 /*
- * glScalef dispatcher. id = 152
+ * glScalef dispatcher. id = 153
  */
 static bool yagl_func_glScalef(struct yagl_transport *t)
 {
@@ -2944,7 +2970,7 @@ static bool yagl_func_glScalef(struct yagl_transport *t)
 }
 
 /*
- * glOrthof dispatcher. id = 153
+ * glOrthof dispatcher. id = 154
  */
 static bool yagl_func_glOrthof(struct yagl_transport *t)
 {
@@ -2968,7 +2994,7 @@ static bool yagl_func_glOrthof(struct yagl_transport *t)
 }
 
 /*
- * glColor4f dispatcher. id = 154
+ * glColor4f dispatcher. id = 155
  */
 static bool yagl_func_glColor4f(struct yagl_transport *t)
 {
@@ -2988,7 +3014,7 @@ static bool yagl_func_glColor4f(struct yagl_transport *t)
 }
 
 /*
- * glColor4ub dispatcher. id = 155
+ * glColor4ub dispatcher. id = 156
  */
 static bool yagl_func_glColor4ub(struct yagl_transport *t)
 {
@@ -3008,7 +3034,7 @@ static bool yagl_func_glColor4ub(struct yagl_transport *t)
 }
 
 /*
- * glNormal3f dispatcher. id = 156
+ * glNormal3f dispatcher. id = 157
  */
 static bool yagl_func_glNormal3f(struct yagl_transport *t)
 {
@@ -3026,7 +3052,7 @@ static bool yagl_func_glNormal3f(struct yagl_transport *t)
 }
 
 /*
- * glPointParameterf dispatcher. id = 157
+ * glPointParameterf dispatcher. id = 158
  */
 static bool yagl_func_glPointParameterf(struct yagl_transport *t)
 {
@@ -3042,7 +3068,7 @@ static bool yagl_func_glPointParameterf(struct yagl_transport *t)
 }
 
 /*
- * glPointParameterfv dispatcher. id = 158
+ * glPointParameterfv dispatcher. id = 159
  */
 static bool yagl_func_glPointParameterfv(struct yagl_transport *t)
 {
@@ -3061,7 +3087,7 @@ static bool yagl_func_glPointParameterfv(struct yagl_transport *t)
 }
 
 /*
- * glFogf dispatcher. id = 159
+ * glFogf dispatcher. id = 160
  */
 static bool yagl_func_glFogf(struct yagl_transport *t)
 {
@@ -3077,7 +3103,7 @@ static bool yagl_func_glFogf(struct yagl_transport *t)
 }
 
 /*
- * glFogfv dispatcher. id = 160
+ * glFogfv dispatcher. id = 161
  */
 static bool yagl_func_glFogfv(struct yagl_transport *t)
 {
@@ -3096,7 +3122,7 @@ static bool yagl_func_glFogfv(struct yagl_transport *t)
 }
 
 /*
- * glFrustumf dispatcher. id = 161
+ * glFrustumf dispatcher. id = 162
  */
 static bool yagl_func_glFrustumf(struct yagl_transport *t)
 {
@@ -3120,7 +3146,7 @@ static bool yagl_func_glFrustumf(struct yagl_transport *t)
 }
 
 /*
- * glLightf dispatcher. id = 162
+ * glLightf dispatcher. id = 163
  */
 static bool yagl_func_glLightf(struct yagl_transport *t)
 {
@@ -3138,7 +3164,7 @@ static bool yagl_func_glLightf(struct yagl_transport *t)
 }
 
 /*
- * glLightfv dispatcher. id = 163
+ * glLightfv dispatcher. id = 164
  */
 static bool yagl_func_glLightfv(struct yagl_transport *t)
 {
@@ -3159,7 +3185,7 @@ static bool yagl_func_glLightfv(struct yagl_transport *t)
 }
 
 /*
- * glGetLightfv dispatcher. id = 164
+ * glGetLightfv dispatcher. id = 165
  */
 static bool yagl_func_glGetLightfv(struct yagl_transport *t)
 {
@@ -3182,7 +3208,7 @@ static bool yagl_func_glGetLightfv(struct yagl_transport *t)
 }
 
 /*
- * glLightModelf dispatcher. id = 165
+ * glLightModelf dispatcher. id = 166
  */
 static bool yagl_func_glLightModelf(struct yagl_transport *t)
 {
@@ -3198,7 +3224,7 @@ static bool yagl_func_glLightModelf(struct yagl_transport *t)
 }
 
 /*
- * glLightModelfv dispatcher. id = 166
+ * glLightModelfv dispatcher. id = 167
  */
 static bool yagl_func_glLightModelfv(struct yagl_transport *t)
 {
@@ -3217,7 +3243,7 @@ static bool yagl_func_glLightModelfv(struct yagl_transport *t)
 }
 
 /*
- * glMaterialf dispatcher. id = 167
+ * glMaterialf dispatcher. id = 168
  */
 static bool yagl_func_glMaterialf(struct yagl_transport *t)
 {
@@ -3235,7 +3261,7 @@ static bool yagl_func_glMaterialf(struct yagl_transport *t)
 }
 
 /*
- * glMaterialfv dispatcher. id = 168
+ * glMaterialfv dispatcher. id = 169
  */
 static bool yagl_func_glMaterialfv(struct yagl_transport *t)
 {
@@ -3256,7 +3282,7 @@ static bool yagl_func_glMaterialfv(struct yagl_transport *t)
 }
 
 /*
- * glGetMaterialfv dispatcher. id = 169
+ * glGetMaterialfv dispatcher. id = 170
  */
 static bool yagl_func_glGetMaterialfv(struct yagl_transport *t)
 {
@@ -3279,7 +3305,7 @@ static bool yagl_func_glGetMaterialfv(struct yagl_transport *t)
 }
 
 /*
- * glShadeModel dispatcher. id = 170
+ * glShadeModel dispatcher. id = 171
  */
 static bool yagl_func_glShadeModel(struct yagl_transport *t)
 {
@@ -3293,7 +3319,7 @@ static bool yagl_func_glShadeModel(struct yagl_transport *t)
 }
 
 /*
- * glLogicOp dispatcher. id = 171
+ * glLogicOp dispatcher. id = 172
  */
 static bool yagl_func_glLogicOp(struct yagl_transport *t)
 {
@@ -3307,7 +3333,7 @@ static bool yagl_func_glLogicOp(struct yagl_transport *t)
 }
 
 /*
- * glMultMatrixf dispatcher. id = 172
+ * glMultMatrixf dispatcher. id = 173
  */
 static bool yagl_func_glMultMatrixf(struct yagl_transport *t)
 {
@@ -3324,7 +3350,7 @@ static bool yagl_func_glMultMatrixf(struct yagl_transport *t)
 }
 
 /*
- * glLoadMatrixf dispatcher. id = 173
+ * glLoadMatrixf dispatcher. id = 174
  */
 static bool yagl_func_glLoadMatrixf(struct yagl_transport *t)
 {
@@ -3341,7 +3367,7 @@ static bool yagl_func_glLoadMatrixf(struct yagl_transport *t)
 }
 
 /*
- * glClipPlanef dispatcher. id = 174
+ * glClipPlanef dispatcher. id = 175
  */
 static bool yagl_func_glClipPlanef(struct yagl_transport *t)
 {
@@ -3360,7 +3386,7 @@ static bool yagl_func_glClipPlanef(struct yagl_transport *t)
 }
 
 /*
- * glGetClipPlanef dispatcher. id = 175
+ * glGetClipPlanef dispatcher. id = 176
  */
 static bool yagl_func_glGetClipPlanef(struct yagl_transport *t)
 {
@@ -3381,7 +3407,7 @@ static bool yagl_func_glGetClipPlanef(struct yagl_transport *t)
 }
 
 /*
- * glUpdateOffscreenImageYAGL dispatcher. id = 176
+ * glUpdateOffscreenImageYAGL dispatcher. id = 177
  */
 static bool yagl_func_glUpdateOffscreenImageYAGL(struct yagl_transport *t)
 {
@@ -3406,7 +3432,7 @@ static bool yagl_func_glUpdateOffscreenImageYAGL(struct yagl_transport *t)
 }
 
 /*
- * glGenUniformLocationYAGL dispatcher. id = 177
+ * glGenUniformLocationYAGL dispatcher. id = 178
  */
 static bool yagl_func_glGenUniformLocationYAGL(struct yagl_transport *t)
 {
@@ -3427,7 +3453,7 @@ static bool yagl_func_glGenUniformLocationYAGL(struct yagl_transport *t)
 }
 
 /*
- * glDeleteUniformLocationsYAGL dispatcher. id = 178
+ * glDeleteUniformLocationsYAGL dispatcher. id = 179
  */
 static bool yagl_func_glDeleteUniformLocationsYAGL(struct yagl_transport *t)
 {
@@ -3443,7 +3469,7 @@ static bool yagl_func_glDeleteUniformLocationsYAGL(struct yagl_transport *t)
     return true;
 }
 
-const uint32_t yagl_gles_api_num_funcs = 178;
+const uint32_t yagl_gles_api_num_funcs = 179;
 
 yagl_api_func yagl_gles_api_funcs[] = {
     &yagl_func_glDrawArrays,
@@ -3552,6 +3578,7 @@ yagl_api_func yagl_gles_api_funcs[] = {
     &yagl_func_glVertexAttrib4f,
     &yagl_func_glVertexAttrib4fv,
     &yagl_func_glGetActiveUniformsiv,
+    &yagl_func_glGetUniformIndices,
     &yagl_func_glGetIntegerv,
     &yagl_func_glGetFloatv,
     &yagl_func_glGetString,
index 26a6e72..8f87ebe 100644 (file)
@@ -1604,6 +1604,34 @@ void yagl_host_glGetActiveUniformsiv(GLuint program,
     *params_count = uniformIndices_count * num_pnames;
 }
 
+void yagl_host_glGetUniformIndices(GLuint program,
+    const GLchar *uniformNames, int32_t uniformNames_count,
+    GLuint *uniformIndices, int32_t uniformIndices_maxcount, int32_t *uniformIndices_count)
+{
+    GLuint obj = yagl_gles_object_get(program);
+    int max_active_uniform_bufsize = 1, i;
+    const GLchar **name_pointers;
+
+    gles_api_ts->driver->GetProgramiv(obj,
+                                      GL_ACTIVE_UNIFORM_MAX_LENGTH,
+                                      &max_active_uniform_bufsize);
+
+    name_pointers = g_malloc(uniformIndices_maxcount * sizeof(*name_pointers));
+
+    for (i = 0; i < uniformIndices_maxcount; ++i) {
+        name_pointers[i] = &uniformNames[max_active_uniform_bufsize * i];
+    }
+
+    gles_api_ts->driver->GetUniformIndices(obj,
+                                           uniformIndices_maxcount,
+                                           name_pointers,
+                                           uniformIndices);
+
+    g_free(name_pointers);
+
+    *uniformIndices_count = uniformIndices_maxcount;
+}
+
 void yagl_host_glGetIntegerv(GLenum pname,
     GLint *params, int32_t params_maxcount, int32_t *params_count)
 {
index d8d4e97..bec066c 100644 (file)
@@ -363,6 +363,9 @@ void yagl_host_glVertexAttrib4fv(GLuint indx,
 void yagl_host_glGetActiveUniformsiv(GLuint program,
     const GLuint *uniformIndices, int32_t uniformIndices_count,
     GLint *params, int32_t params_maxcount, int32_t *params_count);
+void yagl_host_glGetUniformIndices(GLuint program,
+    const GLchar *uniformNames, int32_t uniformNames_count,
+    GLuint *uniformIndices, int32_t uniformIndices_maxcount, int32_t *uniformIndices_count);
 void yagl_host_glGetIntegerv(GLenum pname,
     GLint *params, int32_t params_maxcount, int32_t *params_count);
 void yagl_host_glGetFloatv(GLenum pname,
index 47c9968..a6d788b 100644 (file)
@@ -210,6 +210,7 @@ struct yagl_gles_driver *yagl_gles_ogl_create(struct yagl_dyn_lib *dyn_lib,
         YAGL_GLES_OGL_GET_PROC(driver, BindVertexArray, glBindVertexArray);
         YAGL_GLES_OGL_GET_PROC(driver, DeleteVertexArrays, glDeleteVertexArrays);
         YAGL_GLES_OGL_GET_PROC(driver, GetActiveUniformsiv, glGetActiveUniformsiv);
+        YAGL_GLES_OGL_GET_PROC(driver, GetUniformIndices, glGetUniformIndices);
     }
 
     driver->destroy = &yagl_gles_ogl_destroy;
index 4b15b5b..fe5cd58 100644 (file)
@@ -179,6 +179,7 @@ struct yagl_gles_driver
     YAGL_GLES_DRIVER_FUNC5(VertexAttrib4f, GLuint, GLfloat, GLfloat, GLfloat, GLfloat, indx, x, y, z, w)
     YAGL_GLES_DRIVER_FUNC2(VertexAttrib4fv, GLuint, const GLfloat*, indx, values)
     YAGL_GLES_DRIVER_FUNC5(GetActiveUniformsiv, GLuint, GLsizei, const GLuint*, GLenum, GLint*, program, uniformCount, uniformIndices, pname, params)
+    YAGL_GLES_DRIVER_FUNC4(GetUniformIndices, GLuint, GLsizei, const GLchar* const*, GLuint*, program, uniformCount, uniformNames, uniformIndices)
     YAGL_GLES_DRIVER_FUNC2(GetIntegerv, GLenum, GLint*, pname, params)
     YAGL_GLES_DRIVER_FUNC2(GetFloatv, GLenum, GLfloat*, pname, params)
     YAGL_GLES_DRIVER_FUNC_RET1(const GLubyte*, GetString, GLenum, name)