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
+22 -1
View File
@@ -88,6 +88,22 @@ static GLenum getGLBlendFactor(BlendFactor factor)
return 0;
}
love::graphics::Graphics *createInstance()
{
love::graphics::Graphics *instance = nullptr;
try
{
instance = new Graphics();
}
catch (love::Exception &e)
{
printf("Cannot create OpenGL renderer: %s\n", e.what());
}
return instance;
}
Graphics::Graphics()
: windowHasStencil(false)
, mainVAO(0)
@@ -1322,7 +1338,12 @@ void Graphics::setWireframe(bool enable)
Graphics::Renderer Graphics::getRenderer() const
{
return GLAD_ES_VERSION_2_0 ? RENDERER_OPENGLES : RENDERER_OPENGL;
return RENDERER_OPENGL;
}
bool Graphics::usesGLSLES() const
{
return GLAD_ES_VERSION_2_0;
}
Graphics::RendererInfo Graphics::getRendererInfo() const