hostsupport/hostopengles20/src/stencil.c
branchbug235_bringup_0
changeset 55 09263774e342
parent 53 c2ef9095503a
equal deleted inserted replaced
54:067180f57b12 55:09263774e342
       
     1 /* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2  *
       
     3  * Permission is hereby granted, free of charge, to any person obtaining a
       
     4  * copy of this software and associated documentation files (the "Software"),
       
     5  * to deal in the Software without restriction, including without limitation
       
     6  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
       
     7  * and/or sell copies of the Software, and to permit persons to whom the
       
     8  * Software is furnished to do so, subject to the following conditions:
       
     9  *
       
    10  * The above copyright notice and this permission notice shall be included
       
    11  * in all copies or substantial portions of the Software.
       
    12  *
       
    13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       
    14  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
       
    15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
       
    16  * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
       
    17  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
       
    18  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
       
    19  *
       
    20  * Initial Contributors:
       
    21  * Nokia Corporation - initial contribution.
       
    22  *
       
    23  * Contributors:
       
    24  *
       
    25  * Description:
       
    26  *
       
    27  */
       
    28 
       
    29 #include "common.h"
       
    30 #include "hgl.h"
       
    31 #include "context.h"
       
    32 
       
    33 GL_APICALL_BUILD void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
       
    34 {
       
    35 	DGLES2_ENTER();
       
    36 	ctx->hgl.StencilFunc(func, ref, mask);
       
    37 	DGLES2_LEAVE();
       
    38 }
       
    39 
       
    40 GL_APICALL_BUILD void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
       
    41 {
       
    42 	DGLES2_ENTER();
       
    43 	ctx->hgl.StencilFuncSeparate(face, func, ref, mask);
       
    44 	DGLES2_LEAVE();
       
    45 }
       
    46 
       
    47 GL_APICALL_BUILD void GL_APIENTRY glStencilMask(GLuint mask)
       
    48 {
       
    49 	DGLES2_ENTER();
       
    50 	ctx->hgl.StencilMask(mask);
       
    51 	DGLES2_LEAVE();
       
    52 }
       
    53 
       
    54 GL_APICALL_BUILD void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
       
    55 {
       
    56 	DGLES2_ENTER();
       
    57 	ctx->hgl.StencilMaskSeparate(face, mask);
       
    58 	DGLES2_LEAVE();
       
    59 }
       
    60 
       
    61 GL_APICALL_BUILD void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
       
    62 {
       
    63 	DGLES2_ENTER();
       
    64 	ctx->hgl.StencilOp(fail, zfail, zpass);
       
    65 	DGLES2_LEAVE();
       
    66 }
       
    67 
       
    68 GL_APICALL_BUILD void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
       
    69 {
       
    70 	DGLES2_ENTER();
       
    71 	ctx->hgl.StencilOpSeparate(face, fail, zfail, zpass);
       
    72 	DGLES2_LEAVE();
       
    73 }
       
    74 
       
    75 GL_APICALL_BUILD void GL_APIENTRY glClearStencil(GLint s)
       
    76 {
       
    77 	DGLES2_ENTER();
       
    78 	ctx->hgl.ClearStencil(s);
       
    79 	DGLES2_LEAVE();
       
    80 }
       
    81