void glUpdateOffscreenImageYAGL(GLuint texture, uint32_t width, uint32_t height, uint32_t bpp, const void *pixels)
void glGenUniformLocationYAGL(uint32_t location, GLuint program, const GLchar *name)
void glDeleteUniformLocationsYAGL(const uint32_t *locations)
+
+#
+# GLES 3.0
+#
+
+void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
yagl_transport_put_out_array(t, locations, locations_count, sizeof(uint32_t));
yagl_transport_end(t);
}
+
+/*
+ * glGetInternalformativ wrapper. id = 248
+ */
+void yagl_host_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params, int32_t params_maxcount, int32_t *params_count)
+{
+ struct yagl_transport *t = yagl_get_transport();
+
+ yagl_transport_begin(t, yagl_api_id_gles, 248, 6 * 8, 4 * 8 + yagl_transport_array_size(params, params_maxcount, sizeof(GLint)));
+ yagl_transport_put_out_GLenum(t, target);
+ yagl_transport_put_out_GLenum(t, internalformat);
+ yagl_transport_put_out_GLenum(t, pname);
+ yagl_transport_put_out_GLsizei(t, bufSize);
+ yagl_transport_put_in_array(t, params, params_maxcount, params_count, sizeof(GLint));
+ yagl_transport_end(t);
+}
*/
void yagl_host_glDeleteUniformLocationsYAGL(const uint32_t *locations, int32_t locations_count);
+/*
+ * glGetInternalformativ wrapper. id = 248
+ */
+void yagl_host_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params, int32_t params_maxcount, int32_t *params_count);
+
#endif
YAGL_API void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
{
+ int32_t num = 0;
+
YAGL_LOG_FUNC_ENTER_SPLIT5(glGetInternalformativ, GLenum, GLenum, GLenum, GLsizei, GLint*, target, internalformat, pname, bufSize, params);
YAGL_GET_CTX();
- YAGL_SET_ERR(GL_INVALID_OPERATION);
+ if (bufSize < 0) {
+ YAGL_SET_ERR(GL_INVALID_VALUE);
+ goto out;
+ }
+ yagl_host_glGetInternalformativ(target, internalformat, pname, bufSize, params, bufSize, &num);
+
+out:
YAGL_LOG_FUNC_EXIT(NULL);
}