add glTexParameteri() and fix glTexParameteriv()
diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h
index 0c7ad46..a85f275 100644
--- a/include/private/opengles/gl_context.h
+++ b/include/private/opengles/gl_context.h
@@ -456,7 +456,7 @@
void validate();
matrixf_t& top() { return stack[depth]; }
const matrixf_t& top() const { return stack[depth]; }
- const uint32_t top_ops() const { return ops[depth]; }
+ uint32_t top_ops() const { return ops[depth]; }
inline bool isRigidBody() const {
return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
}
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index b6f534b..14a910c 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -900,7 +900,7 @@
memcpy(textureObject->crop_rect, params, 4*sizeof(GLint));
break;
default:
- ogles_error(c, GL_INVALID_ENUM);
+ texParameterx(target, pname, GLfixed(params[0]), c);
return;
}
}
@@ -919,6 +919,13 @@
texParameterx(target, pname, param, c);
}
+void glTexParameteri(
+ GLenum target, GLenum pname, GLint param)
+{
+ ogles_context_t* c = ogles_context_t::get();
+ texParameterx(target, pname, GLfixed(param), c);
+}
+
// ----------------------------------------------------------------------------
#if 0
#pragma mark -