#ifndef _CORE_FACTORY_H #define _CORE_FACTORY_H #include "common.h" #include "core.h" #include "core_opengl.h" #include "core_d3d9.h" class CoreFactory { private: char *title; unsigned int width,height; int colorsize,depthsize; int flags; CoreFactory(): title(NULL),width(640),height(480),colorsize(16),depthsize(16),flags(0) {} CoreFactory(const CoreFactory&); CoreFactory &operator=(const CoreFactory &pml); ~CoreFactory(); public: static CoreFactory& Singleton() { static CoreFactory singleton; return singleton; } void Set(const char *title); void Set(const char *title,unsigned int width,unsigned int height); void Set(const char *title,unsigned int width,unsigned int height,int colorsize,int depthsize,int flags); Core *Create(int coretype); }; #endif