metal: initial work on windowing and instance creation

This commit is contained in:
Alex Szpakowski
2020-01-30 20:35:33 -04:00
parent 74cf9b8236
commit d687b4c099
9 changed files with 243 additions and 81 deletions
+8 -1
View File
@@ -151,7 +151,7 @@ public:
enum Renderer
{
RENDERER_OPENGL = 0,
RENDERER_OPENGLES,
RENDERER_METAL,
RENDERER_MAX_ENUM
};
@@ -797,6 +797,11 @@ public:
**/
virtual Renderer getRenderer() const = 0;
/**
* Whether shaders will use GLSL ES or not (mobile shaders).
**/
virtual bool usesGLSLES() const = 0;
/**
* Returns system-dependent renderer information.
* Returned strings can vary greatly between systems! Do not rely on it for
@@ -853,6 +858,8 @@ public:
return (T *) scratchBuffer.data();
}
static Graphics *createInstance(const std::vector<Renderer> &renderers);
static bool getConstant(const char *in, DrawMode &out);
static bool getConstant(DrawMode in, const char *&out);
static std::vector<std::string> getConstants(DrawMode);