More code restructuring.

Move all love.graphics functionality that doesn’t call OpenGL out of the OpenGL backend Graphics class.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-12-30 18:36:54 -04:00
parent d94b363b39
commit f12596dd19
38 changed files with 1603 additions and 1431 deletions
+4 -11
View File
@@ -27,7 +27,10 @@ namespace graphics
{
love::Type Texture::type("Texture", &Drawable::type);
Texture::Filter Texture::defaultFilter;
Texture::FilterMode Texture::defaultMipmapFilter = Texture::FILTER_LINEAR;
float Texture::defaultMipmapSharpness = 0.0f;
Texture::Texture()
: format(PIXELFORMAT_UNKNOWN)
@@ -35,7 +38,7 @@ Texture::Texture()
, height(0)
, pixelWidth(0)
, pixelHeight(0)
, filter(getDefaultFilter())
, filter(defaultFilter)
, wrap()
, vertices()
{
@@ -122,16 +125,6 @@ const Vertex *Texture::getVertices() const
return vertices;
}
void Texture::setDefaultFilter(const Filter &f)
{
defaultFilter = f;
}
const Texture::Filter &Texture::getDefaultFilter()
{
return defaultFilter;
}
bool Texture::validateFilter(const Filter &f, bool mipmapsAllowed)
{
if (!mipmapsAllowed && f.mipmap != FILTER_NONE)