mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user