mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-21 18:59:13 +00:00
All kinds of fixes and updates
This commit is contained in:
@@ -14,8 +14,8 @@ class IApplication;
|
||||
|
||||
struct IApplicationCallback
|
||||
{
|
||||
virtual int appMain(IApplication*) {return 0;}
|
||||
virtual void appQuitting(IApplication*) {}
|
||||
virtual int appMain(IApplication*)=0;
|
||||
virtual void appQuitting(IApplication*)=0;
|
||||
virtual void appFilesOpen(IApplication*, const std::vector<SystemString>&) {}
|
||||
};
|
||||
|
||||
@@ -51,34 +51,34 @@ public:
|
||||
virtual const std::vector<SystemString>& getArgs() const=0;
|
||||
|
||||
/* Constructors/initializers for sub-objects */
|
||||
virtual std::unique_ptr<IWindow> newWindow(const SystemString& title)=0;
|
||||
virtual IWindow* newWindow(const SystemString& title)=0;
|
||||
|
||||
};
|
||||
|
||||
std::unique_ptr<IApplication>
|
||||
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const SystemString& uniqueName,
|
||||
const SystemString& friendlyName,
|
||||
const SystemString& pname,
|
||||
const std::vector<SystemString>& args,
|
||||
bool singleInstance=true);
|
||||
int
|
||||
ApplicationRun(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const SystemString& uniqueName,
|
||||
const SystemString& friendlyName,
|
||||
const SystemString& pname,
|
||||
const std::vector<SystemString>& args,
|
||||
bool singleInstance=true);
|
||||
extern IApplication* APP;
|
||||
|
||||
static inline std::unique_ptr<IApplication>
|
||||
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const SystemString& uniqueName,
|
||||
const SystemString& friendlyName,
|
||||
int argc, const SystemChar** argv,
|
||||
bool singleInstance=true)
|
||||
static inline int
|
||||
ApplicationRun(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const SystemString& uniqueName,
|
||||
const SystemString& friendlyName,
|
||||
int argc, const SystemChar** argv,
|
||||
bool singleInstance=true)
|
||||
{
|
||||
if (APP)
|
||||
return std::unique_ptr<IApplication>();
|
||||
return 1;
|
||||
std::vector<SystemString> args;
|
||||
for (int i=1 ; i<argc ; ++i)
|
||||
args.push_back(argv[i]);
|
||||
return ApplicationBootstrap(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
||||
return ApplicationRun(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "glew.h"
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace boo
|
||||
{
|
||||
@@ -13,9 +14,11 @@ namespace boo
|
||||
class GLES3DataFactory : public IGraphicsDataFactory
|
||||
{
|
||||
IGraphicsContext* m_parent;
|
||||
std::unique_ptr<IGraphicsData> m_deferredData;
|
||||
IGraphicsData* m_deferredData = nullptr;
|
||||
std::unordered_set<IGraphicsData*> m_committedData;
|
||||
public:
|
||||
GLES3DataFactory(IGraphicsContext* parent);
|
||||
~GLES3DataFactory() {}
|
||||
|
||||
Platform platform() const {return PlatformOGLES3;}
|
||||
const char* platformName() const {return "OpenGL ES 3.0";}
|
||||
@@ -42,7 +45,9 @@ public:
|
||||
size_t texCount, const ITexture** texs);
|
||||
|
||||
void reset();
|
||||
std::unique_ptr<IGraphicsData> commit();
|
||||
IGraphicsData* commit();
|
||||
void destroyData(IGraphicsData*);
|
||||
void destroyAllData();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ struct IShaderDataBinding {};
|
||||
* resource batch. */
|
||||
struct IGraphicsData
|
||||
{
|
||||
virtual ~IGraphicsData() {}
|
||||
};
|
||||
|
||||
/** Used by platform shader pipeline constructors */
|
||||
@@ -173,7 +172,9 @@ struct IGraphicsDataFactory
|
||||
size_t texCount, const ITexture** texs)=0;
|
||||
|
||||
virtual void reset()=0;
|
||||
virtual std::unique_ptr<IGraphicsData> commit()=0;
|
||||
virtual IGraphicsData* commit()=0;
|
||||
virtual void destroyData(IGraphicsData*)=0;
|
||||
virtual void destroyAllData()=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user