Edit

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

Branch :

  • Show log

    Commit

  • Author : daniel@transgaming.com
    Date : 2013-01-11 04:07:42
    Hash : 8bc304a1
    Message : Move sampler state structure to angle types header. TRAC #22251 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Geoff Lang/Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1662 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;
    };
    
    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 SamplerState
    {
        GLenum minFilter;
        GLenum magFilter;
        GLenum wrapS;
        GLenum wrapT;
        float maxAnisotropy;
        int lodOffset;
    };
    
    struct ClearParameters
    {
        GLbitfield mask;
    
        Color colorClearValue;
        bool colorMaskRed;
        bool colorMaskGreen;
        bool colorMaskBlue;
        bool colorMaskAlpha;
    
        float depthClearValue;
    
        GLint stencilClearValue;
        GLuint stencilWriteMask;
    };
    
    }
    
    #endif // LIBGLESV2_ANGLETYPES_H_