Initial commit
[profile/ivi/simulator-opengl.git] / es_1_1 / 33point.c
1 /* 
2  * Copyright (C) 2010 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
3  * 
4  * Contact:
5  * DongKyun Yun <dk77.yun@samsung.com>
6  * SangJin Kim <sangjin3.kim@samsung.com>
7  * HyunGoo Kang <hyungoo1.kang@samsung.com>
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy of
10  * this software and associated documentation files (the "Software"), to deal in
11  * the Software without restriction, including without limitation the rights to
12  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
13  * of the Software, and to permit persons to whom the Software is furnished to do
14  * so, subject to the following conditions:
15  * 
16  * The above copyright notice and this permission notice shall be included in all
17  * copies or substantial portions of the Software.
18  * 
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  * 
27  * Contributors:
28  * - S-Core Co., Ltd
29  *
30  */
31
32 #include "gl_imp.h"
33
34 #ifdef ALEXGL_PROVIDE_COMMON
35 GL_API void GL_APIENTRY EXTFN(PointSize)(GLfloat size) {
36         FNPTR(PointSize)(size);
37 }
38 #endif
39
40 GL_API void GL_APIENTRY EXTFN(PointSizex)(GLfixed size) {
41         FNPTR(PointSize)(x2f(size));
42 }
43
44 #ifdef ALEXGL_PROVIDE_COMMON
45 #ifdef ALEXGL_PROVIDE_1_1
46 GL_API void GL_APIENTRY EXTFN(PointParameterf)(GLenum pname, GLfloat param) {
47         switch (pname) {
48         case GL_POINT_SIZE_MIN:
49         case GL_POINT_SIZE_MAX:
50         case GL_POINT_FADE_THRESHOLD_SIZE:
51                 FNPTR(PointParameterf)(pname, param);
52                 break;
53         default:
54                 INTFN(SetError)(GL_INVALID_ENUM);
55                 break;
56         }
57 }
58 #endif
59 #endif
60
61 #ifdef ALEXGL_PROVIDE_COMMON
62 #ifdef ALEXGL_PROVIDE_1_1
63 GL_API void GL_APIENTRY EXTFN(PointParameterfv)(GLenum pname, const GLfloat* params) {
64         switch (pname) {
65         case GL_POINT_SIZE_MIN:
66         case GL_POINT_SIZE_MAX:
67         case GL_POINT_FADE_THRESHOLD_SIZE:
68         case GL_POINT_DISTANCE_ATTENUATION:
69                 FNPTR(PointParameterfv)(pname, params);
70                 break;
71         default:
72                 INTFN(SetError)(GL_INVALID_ENUM);
73                 break;
74         }
75 }
76 #endif
77 #endif
78
79 #ifdef ALEXGL_PROVIDE_1_1
80 GL_API void GL_APIENTRY EXTFN(PointParameterx)(GLenum pname, GLfixed param) {
81         switch (pname) {
82         case GL_POINT_SIZE_MIN:
83         case GL_POINT_SIZE_MAX:
84         case GL_POINT_FADE_THRESHOLD_SIZE:
85                 FNPTR(PointParameterf)(pname, x2f(param));
86                 break;
87         default:
88                 INTFN(SetError)(GL_INVALID_ENUM);
89                 break;
90         }
91 }
92 #endif
93
94 #ifdef ALEXGL_PROVIDE_1_1
95 GL_API void GL_APIENTRY EXTFN(PointParameterxv)(GLenum pname, const GLfixed* params) {
96         GLfloat f[3];
97         switch (pname) {
98         case GL_POINT_SIZE_MIN:
99         case GL_POINT_SIZE_MAX:
100         case GL_POINT_FADE_THRESHOLD_SIZE:
101         case GL_POINT_DISTANCE_ATTENUATION:
102                 xv2fv(params, f, 3);
103                 FNPTR(PointParameterfv)(pname, f);
104                 break;
105         default:
106                 INTFN(SetError)(GL_INVALID_ENUM);
107                 break;
108         }
109 }
110 #endif