| 1 | /* |
| 2 | Copyright (c) 2012, Broadcom Europe Ltd |
| 3 | All rights reserved. |
| 4 | |
| 5 | Redistribution and use in source and binary forms, with or without |
| 6 | modification, 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 | |
| 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY |
| 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 23 | ON 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 |
| 25 | SOFTWARE, 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 | extern GLboolean glxx_client_IsRenderbuffer(GLuint renderbuffer); |
| 46 | extern void glxx_client_BindRenderbuffer(GLenum target, GLuint renderbuffer); |
| 47 | extern void glxx_client_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers); |
| 48 | extern void glxx_client_GenRenderbuffers(GLsizei n, GLuint *renderbuffers); |
| 49 | extern void glxx_client_RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); |
| 50 | extern void glxx_client_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params); |
| 51 | extern GLboolean glxx_client_IsFramebuffer(GLuint framebuffer); |
| 52 | extern void glxx_client_BindFramebuffer(GLenum target, GLuint framebuffer); |
| 53 | extern void glxx_client_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers); |
| 54 | extern void glxx_client_GenFramebuffers(GLsizei n, GLuint *framebuffers); |
| 55 | extern GLenum glxx_client_CheckFramebufferStatus(GLenum target); |
| 56 | extern void glxx_client_FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); |
| 57 | extern void glxx_client_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); |
| 58 | extern void glxx_client_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params); |
| 59 | extern void glxx_client_GenerateMipmap(GLenum target); |
| 60 | |
| 61 | GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer) |
| 62 | { |
| 63 | return glxx_client_IsRenderbuffer(renderbuffer); |
| 64 | } |
| 65 | |
| 66 | GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer) |
| 67 | { |
| 68 | glxx_client_BindRenderbuffer(target, renderbuffer); |
| 69 | } |
| 70 | |
| 71 | GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers) |
| 72 | { |
| 73 | glxx_client_DeleteRenderbuffers(n, renderbuffers); |
| 74 | } |
| 75 | |
| 76 | GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers) |
| 77 | { |
| 78 | glxx_client_GenRenderbuffers(n, renderbuffers); |
| 79 | } |
| 80 | |
| 81 | GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) |
| 82 | { |
| 83 | glxx_client_RenderbufferStorage(target, internalformat, width, height); |
| 84 | } |
| 85 | |
| 86 | GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params) |
| 87 | { |
| 88 | glxx_client_GetRenderbufferParameteriv(target, pname, params); |
| 89 | } |
| 90 | |
| 91 | GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer) |
| 92 | { |
| 93 | return glxx_client_IsFramebuffer(framebuffer); |
| 94 | } |
| 95 | |
| 96 | GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer) |
| 97 | { |
| 98 | glxx_client_BindFramebuffer(target, framebuffer); |
| 99 | } |
| 100 | |
| 101 | GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers) |
| 102 | { |
| 103 | glxx_client_DeleteFramebuffers(n, framebuffers); |
| 104 | } |
| 105 | |
| 106 | GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers) |
| 107 | { |
| 108 | glxx_client_GenFramebuffers(n, framebuffers); |
| 109 | } |
| 110 | |
| 111 | GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target) |
| 112 | { |
| 113 | return glxx_client_CheckFramebufferStatus(target); |
| 114 | } |
| 115 | |
| 116 | GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
| 117 | { |
| 118 | glxx_client_FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); |
| 119 | } |
| 120 | |
| 121 | GL_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 | |
| 126 | GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params) |
| 127 | { |
| 128 | glxx_client_GetFramebufferAttachmentParameteriv(target, attachment, pname, params); |
| 129 | } |
| 130 | |
| 131 | GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target) |
| 132 | { |
| 133 | glxx_client_GenerateMipmap(target); |
| 134 | } |
| 135 | |