1/*
2Copyright (c) 2012, Broadcom Europe Ltd
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the copyright holder nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#define GL_GLEXT_PROTOTYPES /* we want the prototypes so the compiler will check that the signatures match */
29
30#include "interface/khronos/common/khrn_client_mangle.h"
31
32#include "interface/khronos/common/khrn_int_common.h"
33
34#include "interface/khronos/glxx/glxx_client.h"
35#include "interface/khronos/common/khrn_client_rpc.h"
36
37#ifdef RPC_DIRECT
38#include "interface/khronos/glxx/glxx_int_impl.h"
39#include "interface/khronos/glxx/gl11_int_impl.h"
40#endif
41
42#include "interface/khronos/include/GLES/gl.h"
43#include "interface/khronos/include/GLES/glext.h"
44
45/* GL_OES_draw_texture */
46
47GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
48{
49 glDrawTexfOES((GLfloat)x,(GLfloat)y,(GLfloat)x, (GLfloat)width,(GLfloat)height);
50}
51
52GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height)
53{
54 glDrawTexfOES((GLfloat)x,(GLfloat)y,(GLfloat)x, (GLfloat)width,(GLfloat)height);
55}
56
57GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
58{
59 glDrawTexfOES(fixed_to_float(x), fixed_to_float(y), fixed_to_float(x), fixed_to_float(width), fixed_to_float(height));
60}
61
62GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords)
63{
64 glDrawTexfOES((GLfloat)coords[0],(GLfloat)coords[1],(GLfloat)coords[2], (GLfloat)coords[3],(GLfloat)coords[4]);
65}
66
67GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords)
68{
69 glDrawTexfOES((GLfloat)coords[0],(GLfloat)coords[1],(GLfloat)coords[2], (GLfloat)coords[3],(GLfloat)coords[4]);
70}
71
72GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords)
73{
74 glDrawTexfOES(fixed_to_float(coords[0]), fixed_to_float(coords[1]), fixed_to_float(coords[2]), fixed_to_float(coords[3]), fixed_to_float(coords[4]));
75}
76
77GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
78{
79 CLIENT_THREAD_STATE_T *thread = CLIENT_GET_THREAD_STATE();
80 if (IS_OPENGLES_11(thread)) {
81 RPC_CALL5(glDrawTexfOES_impl_11,
82 thread,
83 GLDRAWTEXFOES_ID_11,
84 RPC_FLOAT(x),
85 RPC_FLOAT(y),
86 RPC_FLOAT(z),
87 RPC_FLOAT(width),
88 RPC_FLOAT(height));
89 }
90}
91
92GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords)
93{
94 glDrawTexfOES((GLfloat)coords[0],(GLfloat)coords[1],(GLfloat)coords[2], (GLfloat)coords[3],(GLfloat)coords[4]);
95}
96