/*
 * This source file is part of KEOS (Free 3D Engine)
 * For the latest info, see http://www.keosengine.org/
 * E-mails : thierry.vouriot@keosengine.org, yeri@keosengine.org
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place - Suite 330, Boston, MA 02111-1307, USA, or go to
 * http://www.gnu.org/copyleft/lesser.txt.
 *
 */

#ifndef KEOS_ENUMS_H
#define KEOS_ENUMS_H

namespace Keos
{
    //! Primitive types
    enum TPrimitiveType
    {
        PT_TRIANGLELIST,
        PT_TRIANGLESTRIP,
        PT_TRIANGLEFAN,
        PT_LINELIST,
        PT_LINESTRIP,
        PT_POINTLIST
    };

    //! Buffer creation flags
    enum
    {
        BUF_STATIC  = 1 << 0,
        BUF_DYNAMIC = 1 << 1
    };

    //! Buffer/Textures lock flags
    enum
    {
        LOCK_READONLY  = 1 << 0,
        LOCK_WRITEONLY = 1 << 1
    };

    //! Matrix types
    enum TMatrixType
    {
        MAT_MODELVIEW,
        MAT_PROJECTION,
        MAT_TEXTURE_0,
        MAT_TEXTURE_1,
        MAT_TEXTURE_2,
        MAT_TEXTURE_3
    };

    //! Pixels formats
    enum TPixelFormat
    {
        PXF_L8,       // Luminance 8 bits
        PXF_A8L8,     // Alpha and luminance 16 bits
        PXF_A1R5G5B5, // RGB 16 bits 1555
	    PXF_A4R4G4B4, // RGB 16 bits 4444
	    PXF_R8G8B8,   // RGB 24 bits 888
	    PXF_A8R8G8B8, // ARGB 32 bits 8888
        PXF_DXTC1,    // Compressed format DXT1 8 bits
        PXF_DXTC3,    // Compressed format DXT3 16 bits
        PXF_DXTC5     // Compressed format DXT5 16 bits
    };
    
    //! Textures creation flags
    enum
    {
        TEX_NOMIPMAP = 1 << 0 
    };

    //! Intersections types
    enum TIntersection
    {
        INT_IN,        // Completely inside
        INT_OUT,       // Completely outside
        INT_INTERSECTS // Intersection
    };

    //! Alpha-blending
    enum TBlend
    {
        BLEND_SRCALPHA,     // Alpha source
        BLEND_INVSRCALPHA,  // Opposite of the alpha source
        BLEND_DESTALPHA,    // Alpha destination
        BLEND_INVDESTALPHA, // Opposite of the alpha destination
        BLEND_SRCCOLOR,     // Color source
        BLEND_INVSRCCOLOR,  // Opposite of the color source
        BLEND_DESTCOLOR,    // Color destination
        BLEND_INVDESTCOLOR, // Opposite of the color destination
        BLEND_ONE,          // One
        BLEND_ZERO          // Zero
    };

    //! Textures operators
    enum TTextureOp
    {
        TXO_COLOR_FIRSTARG, // Selection of the first parameter of colour
        TXO_COLOR_ADD,      // Addition between both parameters of colour
        TXO_COLOR_MODULATE, // Modulation between both parameters of colour
        TXO_ALPHA_FIRSTARG, // Selection of the first parameter of alpha
        TXO_ALPHA_ADD,      // Addition between both parameters of alpha
        TXO_ALPHA_MODULATE  // Modulation between both parameters of alpha
    };

    //! Arguments of mixing of the units of texture
    enum TTextureArg
    {
        TXA_DIFFUSE,  // Diffuse color
        TXA_TEXTURE,  // Texture
        TXA_PREVIOUS, // Result of the unity of previous texture
        TXA_CONSTANT  // Constant
    };
    
    //! Align modes
    enum TAlign
    {
        ALIGN_LEFT    = 1 << 0, // To the left
        ALIGN_HCENTER = 1 << 1, // Horizontal center
        ALIGN_RIGHT   = 1 << 2, // To the right
        ALIGN_TOP     = 1 << 3, // At the top
        ALIGN_VCENTER = 1 << 4, // Vertical center
        ALIGN_BOTTOM  = 1 << 5  // At the bottom
    };

    //! Render parameters
    enum TRenderParameter
    {
        RENDER_ZWRITE,     // Writing on Z-Buffer
        RENDER_ALPHABLEND, // Alpha-blending
    };

    //! Shaders types
    enum TShaderType
    {
        SHADER_VERTEX,
        SHADER_PIXEL
    };

} // namespace Keos

#endif // KEOS_ENUMS_H

