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
45extern GLboolean glxx_client_IsRenderbuffer(GLuint renderbuffer);
46extern void glxx_client_BindRenderbuffer(GLenum target, GLuint renderbuffer);
47extern void glxx_client_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
48extern void glxx_client_GenRenderbuffers(GLsizei n, GLuint *renderbuffers);
49extern void glxx_client_RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
50extern void glxx_client_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
51extern GLboolean glxx_client_IsFramebuffer(GLuint framebuffer);
52extern void glxx_client_BindFramebuffer(GLenum target, GLuint framebuffer);
53extern void glxx_client_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
54extern void glxx_client_GenFramebuffers(GLsizei n, GLuint *framebuffers);
55extern GLenum glxx_client_CheckFramebufferStatus(GLenum target);
56extern void glxx_client_FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
57extern void glxx_client_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
58extern void glxx_client_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
59extern void glxx_client_GenerateMipmap(GLenum target);
60
61GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer)
62{
63 return glxx_client_IsRenderbuffer(renderbuffer);
64}
65
66GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer)
67{
68 glxx_client_BindRenderbuffer(target, renderbuffer);
69}
70
71GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers)
72{
73 glxx_client_DeleteRenderbuffers(n, renderbuffers);
74}
75
76GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers)
77{
78 glxx_client_GenRenderbuffers(n, renderbuffers);
79}
80
81GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
82{
83 glxx_client_RenderbufferStorage(target, internalformat, width, height);
84}
85
86GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params)
87{
88 glxx_client_GetRenderbufferParameteriv(target, pname, params);
89}
90
91GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer)
92{
93 return glxx_client_IsFramebuffer(framebuffer);
94}
95
96GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer)
97{
98 glxx_client_BindFramebuffer(target, framebuffer);
99}
100
101GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers)
102{
103 glxx_client_DeleteFramebuffers(n, framebuffers);
104}
105
106GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers)
107{
108 glxx_client_GenFramebuffers(n, framebuffers);
109}
110
111GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target)
112{
113 return glxx_client_CheckFramebufferStatus(target);
114}
115
116GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
117{
118 glxx_client_FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
119}
120
121GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
122{
123 glxx_client_FramebufferTexture2D(target, attachment, textarget, texture, level);
124}
125
126GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params)
127{
128 glxx_client_GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
129}
130
131GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target)
132{
133 glxx_client_GenerateMipmap(target);
134}
135