diff options
Diffstat (limited to 'es_1_1/gl_real.c')
-rwxr-xr-x | es_1_1/gl_real.c | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/es_1_1/gl_real.c b/es_1_1/gl_real.c new file mode 100755 index 0000000..fec8bde --- /dev/null +++ b/es_1_1/gl_real.c @@ -0,0 +1,191 @@ +/* + * 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" + +void xv2xv(const GLfixed* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = x2x(*src++); + } +} + +void xv2fv(const GLfixed* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = x2f(*src++); + } +} + +void xv2dv(const GLfixed* src, GLdouble* dst, int n) { + while (n--) { + *dst++ = x2d(*src++); + } +} + +void fv2xv(const GLfloat* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = f2x(*src++); + } +} + +void fv2fv(const GLfloat* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = f2f(*src++); + } +} + +void fv2dv(const GLfloat* src, GLdouble* dst, int n) { + while (n--) { + *dst++ = f2d(*src++); + } +} + +void dv2xv(const GLdouble* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = d2x(*src++); + } +} + +void dv2fv(const GLdouble* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = d2f(*src++); + } +} + +void xv2boolv(const GLfixed* src, GLboolean* dst, int n) { + while (n--) { + *dst++ = x2bool(*src++); + } +} + +void fv2boolv(const GLfloat* src, GLboolean* dst, int n) { + while (n--) { + *dst++ = f2bool(*src++); + } +} + +void clampxv2boolv(const GLfixed* src, GLboolean* dst, int n) { + while (n--) { + *dst++ = clampx2bool(*src++); + } +} + +void clampfv2boolv(const GLfloat* src, GLboolean* dst, int n) { + while (n--) { + *dst++ = clampf2bool(*src++); + } +} + + + +void bv2xv(const GLbyte* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = b2x(*src++); + } +} + +void bv2fv(const GLbyte* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = b2f(*src++); + } +} + +void bv2clampxv(const GLbyte* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = b2clampx(*src++); + } +} + +void bv2clampfv(const GLbyte* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = b2clampf(*src++); + } +} + +void ubv2clampxv(const GLbyte* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = ub2clampx(*src++); + } +} + +void ubv2clampfv(const GLbyte* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = ub2clampf(*src++); + } +} + +void sv2xv(const GLshort* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = s2x(*src++); + } +} + +void sv2fv(const GLshort* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = s2f(*src++); + } +} + +void sv2clampxv(const GLshort* src, GLfixed* dst, int n) { + while (n--) { + *dst++ = s2clampx(*src++); + } +} + +void sv2clampfv(const GLshort* src, GLfloat* dst, int n) { + while (n--) { + *dst++ = s2clampf(*src++); + } +} + +void xv2iv(const GLfixed* src, GLint* dst, int n) { + while (n--) { + *dst++ = x2i(*src++); + } +} + +void fv2iv(const GLfloat* src, GLint* dst, int n) { + while (n--) { + *dst++ = f2i(*src++); + } +} + +void clampxv2iv(const GLfixed* src, GLint* dst, int n) { + while (n--) { + *dst++ = clampx2i(*src++); + } +} + +void clampfv2iv(const GLfloat* src, GLint* dst, int n) { + while (n--) { + *dst++ = clampf2i(*src++); + } +} + |