diff options
Diffstat (limited to 'es_1_1/2Axform.c')
-rwxr-xr-x | es_1_1/2Axform.c | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/es_1_1/2Axform.c b/es_1_1/2Axform.c new file mode 100755 index 0000000..c8d1afd --- /dev/null +++ b/es_1_1/2Axform.c @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2010 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * DongKyun Yun <dk77.yun@samsung.com> + * SangJin Kim <sangjin3.kim@samsung.com> + * HyunGoo Kang <hyungoo1.kang@samsung.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + +#include "gl_imp.h" + +GL_API void GL_APIENTRY EXTFN(ActiveTexture)(GLenum texture) { + GLint tex; + FNPTR(ActiveTexture)(texture); + FNPTR(GetIntegerv)(GL_ACTIVE_TEXTURE, &tex); + CCV(activeTexture) = tex - GL_TEXTURE0; +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(DepthRangef)(GLclampf zNear, GLclampf zFar) { + FNPTR(DepthRange)(f2d(zNear), f2d(zFar)); +} +#endif + +GL_API void GL_APIENTRY EXTFN(DepthRangex)(GLclampx zNear, GLclampx zFar) { + FNPTR(DepthRange)(x2d(zNear), x2d(zFar)); +} + +GL_API void GL_APIENTRY EXTFN(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) { + FNPTR(Viewport)(x, y, width, height); +} + +GL_API void GL_APIENTRY EXTFN(MatrixMode)(GLenum mode) { + FNPTR(MatrixMode)(mode); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(LoadMatrixf)(const GLfloat* m) { + FNPTR(LoadMatrixf)(m); +} +#endif + +GL_API void GL_APIENTRY EXTFN(LoadMatrixx)(const GLfixed* m) { + GLfloat f[16]; + xv2fv(m, f, 16); + FNPTR(LoadMatrixf)(f); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(MultMatrixf)(const GLfloat* m) { + FNPTR(MultMatrixf)(m); +} +#endif + +GL_API void GL_APIENTRY EXTFN(MultMatrixx)(const GLfixed* m) { + GLfloat f[16]; + xv2fv(m, f, 16); + FNPTR(MultMatrixf)(f); +} + +GL_API void GL_APIENTRY EXTFN(LoadIdentity)(void) { + FNPTR(LoadIdentity)(); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { + FNPTR(Rotatef)(angle, x, y, z); +} +#endif + +GL_API void GL_APIENTRY EXTFN(Rotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) { + FNPTR(Rotatef)(x2f(angle), x2f(x), x2f(y), x2f(z)); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(Translatef)(GLfloat x, GLfloat y, GLfloat z) { + FNPTR(Translatef)(x, y, z); +} +#endif + +GL_API void GL_APIENTRY EXTFN(Translatex)(GLfixed x, GLfixed y, GLfixed z) { + FNPTR(Translatef)(x2f(x), x2f(y), x2f(z)); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(Scalef)(GLfloat x, GLfloat y, GLfloat z) { + FNPTR(Scalef)(x, y, z); +} +#endif + +GL_API void GL_APIENTRY EXTFN(Scalex)(GLfixed x, GLfixed y, GLfixed z) { + FNPTR(Scalef)(x2f(x), x2f(y), x2f(z)); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(Frustumf)(GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { + FNPTR(Frustum)(f2d(left), f2d(right), f2d(bottom), f2d(top), f2d(zNear), f2d(zFar)); +} +#endif + +GL_API void GL_APIENTRY EXTFN(Frustumx)(GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { + FNPTR(Frustum)(x2d(left), x2d(right), x2d(bottom), x2d(top), x2d(zNear), x2d(zFar)); +} + +#ifdef ALEXGL_PROVIDE_COMMON +GL_API void GL_APIENTRY EXTFN(Orthof)(GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { + FNPTR(Ortho)(f2d(left), f2d(right), f2d(bottom), f2d(top), f2d(zNear), f2d(zFar)); +} +#endif + +GL_API void GL_APIENTRY EXTFN(Orthox)(GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { + FNPTR(Ortho)(x2d(left), x2d(right), x2d(bottom), x2d(top), x2d(zNear), x2d(zFar)); +} + +GL_API void GL_APIENTRY EXTFN(PopMatrix)(void) { + FNPTR(PopMatrix)(); +} + +GL_API void GL_APIENTRY EXTFN(PushMatrix)(void) { + FNPTR(PushMatrix)(); +} |