// $Source: /usr/local/SimSoft/SoftShop/XGraph/Space/Texture.h,v $
// $Revision: 1.10 $
// $Author: baum $
// $Date: 2001/11/29 15:52:24 $
//
// Login name of the user who locked the revision
// $Locker:  $
// Tag name used to checkout the file
// $Name: Release-20 $
// State assigned to revision
// $State: Exp $
//
//
// $Log: Texture.h,v $
// Revision 1.10  2001/11/29 15:52:24  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _TEXTURE_H
#define _TEXTURE_H  1

#ifndef WIN32
#define __rtti
#endif

#include "IdObject.h"

#include <iostream.h>

#include "RefCount.h"
#include "Strings.h"

#ifdef _TEXTURE_CPP
#  undef _impexp
#  define _impexp __declspec(dllexport)
#elif defined BUILD_XGRAPH_DLL
#  undef _impexp
#  define _impexp
#else
#  undef _impexp
#  define _impexp __declspec(dllimport)
#endif

#if defined __GNUG__ || defined __hpux
#  undef _impexp
#  define _impexp
#endif

//==================================================================
//		Class-Header
//		for class Texture
//==================================================================

//##ModelId=4030D77C0222
class _impexp __rtti Texture : public Identity, public RefCounter {
  public: 
    // functions to create a Texture
	//##ModelId=4030D77C0225
    static Texture *create (const char *texFileName);

    // find Texture with 'name'
	//##ModelId=4030D77C0233
    static Texture *find (const char *name);

    // dispose, perhaps destruct
	//##ModelId=4030D77C0236
    void dispose ();

    // Building an OpenGL-DisplayList
	//##ModelId=4030D77C0237
    virtual void buildOGL ();

  private: 
	//##ModelId=4030D77C0243
    Texture  (const char *texFileName);
	//##ModelId=4030D77C0245
    ~Texture ();

    // date-members
	//##ModelId=4030D77C0247
    Ustring ObjFileName;
	//##ModelId=4030D77C0251
    unsigned char* ObjImage;
	//##ModelId=4030D77C0262
    unsigned ObjIndex;

	//##ModelId=4030D77C0266
    virtual void stream (ostream& ostr) const;

    // kick all Textures
	//##ModelId=4030D77C0271
    static void deleteAll ();

    // kick all unreferenzed Textures
	//##ModelId=4030D77C0273
    static void clean ();

    // everything declared, but not defined
	//##ModelId=4030D77C0280
    Texture ();
	//##ModelId=4030D77C0281
    Texture (const Texture&);
	//##ModelId=4030D77C0283
    const Texture& operator = (const Texture&);

  // friends
    friend class Attribute;
};

#endif // !_TEXTURE_H
