+void
+jwzgles_glBindTexture (GLuint target, GLuint texture)
+{
+ Assert (!state->compiling_verts,
+ "glBindTexture not allowed inside glBegin");
+
+ /* We implement 1D textures as 2D textures. */
+ if (target == GL_TEXTURE_1D) target = GL_TEXTURE_2D;
+
+ if (state->compiling_list)
+ {
+ void_int vv[2];
+ vv[0].i = target;
+ vv[1].i = texture;
+ list_push ("glBindTexture", (list_fn_cb) &jwzgles_glBindTexture,
+ PROTO_II, vv);
+ }
+ else
+ {
+ if (! state->replaying_list)
+ LOG3 ("direct %-12s %s %d", "glBindTexture",
+ mode_desc(target), texture);
+ glBindTexture (target, texture); /* the real one */
+ CHECK("glBindTexture");
+ }
+}
+
+
+