\r
void APIENTRY glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)\r
{\r
- TRACE("(*)");\r
+ TRACE("(GLdouble left = %f, GLdouble right = %f, GLdouble bottom = %f, GLdouble top = %f, GLdouble zNear = %f, GLdouble zFar = %f)", left, right, bottom, top, zNear, zFar);\r
\r
gl::Context *context = gl::getContext();\r
\r
currentMatrixStack().multiply(m);\r
}\r
\r
+void Context::frustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)\r
+{\r
+ currentMatrixStack().frustum(left, right, bottom, top, zNear, zFar);\r
+}\r
+\r
void Context::ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)\r
{\r
currentMatrixStack().ortho(left, right, bottom, top, zNear, zFar);\r
void translate(GLfloat x, GLfloat y, GLfloat z);\r
void scale(GLfloat x, GLfloat y, GLfloat z);\r
void multiply(const GLfloat *m);\r
+ void frustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);\r
void ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);\r
\r
private:\r
\r
float A = (r + l) / (r - l);\r
float B = (t + b) / (t - b);\r
- float C = -(f + n) / (r - n);\r
- float D = -2 * r * n / (f - n);\r
+ float C = -(f + n) / (f - n);\r
+ float D = -2 * f * n / (f - n);\r
\r
Matrix frustum(2 * n / (r - l), 0, A, 0,\r
0, 2 * n / (t - b), B, 0,\r
\r
void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)\r
{\r
- UNIMPLEMENTED();\r
+ TRACE("(GLfloat left = %f, GLfloat right = %f, GLfloat bottom = %f, GLfloat top = %f, GLfloat zNear = %f, GLfloat zFar = %f)", left, right, bottom, top, zNear, zFar);\r
+\r
+ es1::Context *context = es1::getContext();\r
+\r
+ if(context)\r
+ {\r
+ context->frustum(left, right, bottom, top, zNear, zFar);\r
+ }\r
}\r
\r
void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)\r
{\r
TRACE("(GLenum type = 0x%X, GLsizei stride = %d, const GLvoid *pointer = 0x%0.8p)", type, stride, pointer);\r
\r
-glVertexAttribPointer(sw::Normal, 3, type, false, stride, pointer);\r
+ glVertexAttribPointer(sw::Normal, 3, type, false, stride, pointer);\r
}\r
\r
void GL_APIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)\r
UNIMPLEMENTED();\r
*params = GL_BACK;\r
break;\r
- case GL_DRAW_BUFFER1: // symbolic constant, initial value is GL_NONE
- case GL_DRAW_BUFFER2:
- case GL_DRAW_BUFFER3:
- case GL_DRAW_BUFFER4:
- case GL_DRAW_BUFFER5:
- case GL_DRAW_BUFFER6:
- case GL_DRAW_BUFFER7:
- case GL_DRAW_BUFFER8:
- case GL_DRAW_BUFFER9:
- case GL_DRAW_BUFFER10:
- case GL_DRAW_BUFFER11:
- case GL_DRAW_BUFFER12:
- case GL_DRAW_BUFFER13:
+ case GL_DRAW_BUFFER1: // symbolic constant, initial value is GL_NONE\r
+ case GL_DRAW_BUFFER2:\r
+ case GL_DRAW_BUFFER3:\r
+ case GL_DRAW_BUFFER4:\r
+ case GL_DRAW_BUFFER5:\r
+ case GL_DRAW_BUFFER6:\r
+ case GL_DRAW_BUFFER7:\r
+ case GL_DRAW_BUFFER8:\r
+ case GL_DRAW_BUFFER9:\r
+ case GL_DRAW_BUFFER10:\r
+ case GL_DRAW_BUFFER11:\r
+ case GL_DRAW_BUFFER12:\r
+ case GL_DRAW_BUFFER13:\r
case GL_DRAW_BUFFER14:\r
case GL_DRAW_BUFFER15:\r
UNIMPLEMENTED();\r
case GL_TEXTURE_BINDING_3D_OES:\r
case GL_COPY_READ_BUFFER_BINDING:\r
case GL_COPY_WRITE_BUFFER_BINDING:\r
- case GL_DRAW_BUFFER0:
- case GL_DRAW_BUFFER1:
- case GL_DRAW_BUFFER2:
- case GL_DRAW_BUFFER3:
- case GL_DRAW_BUFFER4:
- case GL_DRAW_BUFFER5:
- case GL_DRAW_BUFFER6:
- case GL_DRAW_BUFFER7:
- case GL_DRAW_BUFFER8:
- case GL_DRAW_BUFFER9:
- case GL_DRAW_BUFFER10:
- case GL_DRAW_BUFFER11:
- case GL_DRAW_BUFFER12:
+ case GL_DRAW_BUFFER0:\r
+ case GL_DRAW_BUFFER1:\r
+ case GL_DRAW_BUFFER2:\r
+ case GL_DRAW_BUFFER3:\r
+ case GL_DRAW_BUFFER4:\r
+ case GL_DRAW_BUFFER5:\r
+ case GL_DRAW_BUFFER6:\r
+ case GL_DRAW_BUFFER7:\r
+ case GL_DRAW_BUFFER8:\r
+ case GL_DRAW_BUFFER9:\r
+ case GL_DRAW_BUFFER10:\r
+ case GL_DRAW_BUFFER11:\r
+ case GL_DRAW_BUFFER12:\r
case GL_DRAW_BUFFER13:\r
case GL_DRAW_BUFFER14:\r
case GL_DRAW_BUFFER15:\r