/*-----------------------------------------------------------------
LOG
    GEM - Graphics Environment for Multimedia

    The state to pass among GEM objects

    Copyright (c) 1997-2000 Mark Danks.
    For information on usage and redistribution, and for a DISCLAIMER OF ALL
    WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.

-----------------------------------------------------------------*/

#ifndef INCLUDE_GEMSTATE_H_
#define INCLUDE_GEMSTATE_H_

#include "Base/GemExportDef.h"

struct pixBlock;
class TexCoord;

/*-----------------------------------------------------------------
-------------------------------------------------------------------
CLASS
    GemState
    
    The state to pass among GEM objects

DESCRIPTION
    
-----------------------------------------------------------------*/
class GEM_EXTERN GemState
{
    public:

        //////////
        // Has something changed since the last time?
        int                 dirty;

    	//////////
    	// Are we in a display list creation?
    	int 	    	    inDisplayList;
    	
    	//////////
    	// Lighting on?
    	int 	    	    lighting;
    	
    	//////////
    	// Smooth shading (flat is other type)
    	int 	    	    smooth;
    	
    	//////////
    	// Texture mapping on?
    	int 	    	    texture;
    	
    	//////////
    	// The image to texture map
    	pixBlock	        *image;
    	
    	//////////
    	// Texture coordinates.
    	// This can be NULL if there aren't any coordinates
    	TexCoord    	    *texCoords;
    	
    	//////////
    	// The number of TexCoords
    	int 	    	    numTexCoords;
    	
    	//////////
    	// Stereoscopic rendering?
		// 0 - no
		// 1 - left
		// 2 - right
    	int					stereo;
    	
		//////////
		// Milliseconds since last frame
		// If in Stereoscopic mode, then it is the same number for both left
		//		and right renderings
		float				tickTime;

        //////////
        // Constructor
    	GemState();
};

/*-----------------------------------------------------------------
-------------------------------------------------------------------
CLASS
	TexCoord
    

DESCRIPTION
    
-----------------------------------------------------------------*/
class GEM_EXTERN TexCoord
{
    public:
        TexCoord() : s(0.f), t(0.f) { }
        TexCoord(float s_, float t_) : s(s_), t(t_) { }
    	float   	    s;
    	float   	    t;
};
    	
#endif	// for header file
