Initial integration of Metal API

This commit is contained in:
Jack Andersen
2015-11-08 16:24:45 -10:00
parent 606e3676b1
commit 2be32d6ca4
7 changed files with 516 additions and 943 deletions

View File

@@ -6,17 +6,20 @@
#include "boo/IGraphicsContext.hpp"
#include <vector>
#include <unordered_set>
#include <unordered_map>
namespace boo
{
struct MetalContext;
class MetalDataFactory : public IGraphicsDataFactory
{
IGraphicsContext* m_parent;
IGraphicsData* m_deferredData = nullptr;
std::unordered_set<IGraphicsData*> m_committedData;
struct MetalContext* m_ctx;
public:
MetalDataFactory(IGraphicsContext* parent);
MetalDataFactory(IGraphicsContext* parent, MetalContext* ctx);
~MetalDataFactory() {}
Platform platform() const {return PlatformMetal;}
@@ -36,7 +39,7 @@ public:
IVertexFormat* newVertexFormat(size_t elementCount, const VertexElementDescriptor* elements);
IShaderPipeline* newShaderPipeline(const char* vertSource, const char* fragSource,
size_t texCount, const char** texNames,
IVertexFormat* vtxFmt, ITextureR* target,
BlendFactor srcFac, BlendFactor dstFac,
bool depthTest, bool depthWrite, bool backfaceCulling);
@@ -53,14 +56,6 @@ public:
void destroyAllData();
};
struct MetalContext
{
struct Window
{
};
};
}
#endif // GDEV_METAL_HPP