Edit

kc3-lang/angle/src/libGLESv2/angletypes.h

Branch :

  • Show log

    Commit

  • Author : daniel@transgaming.com
    Date : 2012-11-28 20:55:09
    Hash : 7436971e
    Message : Added clear type enum and clear parameters structure. TRAC #22125 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1484 736b8ea6-26fd-11df-bfd4-992fa37f6226

  • src/libGLESv2/angletypes.h
  • //
    // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    // angletypes.h : Defines a variety of structures and enum types that are used throughout libGLESv2
    
    #ifndef LIBGLESV2_ANGLETYPES_H_
    #define LIBGLESV2_ANGLETYPES_H_
    
    #define GL_APICALL
    #include <GLES2/gl2.h>
    
    namespace gl
    {
    
    enum TextureType
    {
        TEXTURE_2D,
        TEXTURE_CUBE,
    
        TEXTURE_TYPE_COUNT,
        TEXTURE_UNKNOWN
    };
    
    enum SamplerType
    {
        SAMPLER_PIXEL,
        SAMPLER_VERTEX
    };
    
    struct Color
    {
        float red;
        float green;
        float blue;
        float alpha;
    };
    
    struct Rectangle
    {
        int x;
        int y;
        int width;
        int height;
    };
    
    struct RasterizerState
    {
        bool cullFace;
        GLenum cullMode;
        GLenum frontFace;
    
        bool polygonOffsetFill;
        GLfloat polygonOffsetFactor;
        GLfloat polygonOffsetUnits;
    
        bool scissorTest;
    };
    
    struct BlendState
    {
        bool blend;
        GLenum sourceBlendRGB;
        GLenum destBlendRGB;
        GLenum sourceBlendAlpha;
        GLenum destBlendAlpha;
        GLenum blendEquationRGB;
        GLenum blendEquationAlpha;
    
        bool colorMaskRed;
        bool colorMaskGreen;
        bool colorMaskBlue;
        bool colorMaskAlpha;
    
        bool sampleAlphaToCoverage;
    
        bool dither;
    };
    
    struct DepthStencilState
    {
        bool depthTest;
        GLenum depthFunc;
        bool depthMask;
    
        bool stencilTest;
        GLenum stencilFunc;
        GLuint stencilMask;
        GLenum stencilFail;
        GLenum stencilPassDepthFail;
        GLenum stencilPassDepthPass;
        GLuint stencilWritemask;
        GLenum stencilBackFunc;
        GLuint stencilBackMask;
        GLenum stencilBackFail;
        GLenum stencilBackPassDepthFail;
        GLenum stencilBackPassDepthPass;
        GLuint stencilBackWritemask;
    };
    
    struct ClearParameters
    {
        GLbitfield mask;
    
        Color colorClearValue;
        bool colorMaskRed;
        bool colorMaskGreen;
        bool colorMaskBlue;
        bool colorMaskAlpha;
    
        float depthClearValue;
    
        GLint stencilClearValue;
        GLuint stencilWriteMask;
    };
    
    }
    
    #endif // LIBGLESV2_ANGLETYPES_H_