mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Renamed some things.
This commit is contained in:
@@ -352,7 +352,7 @@ bool Canvas::setWrap(const Texture::Wrap &w)
|
||||
wrap = w;
|
||||
|
||||
if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot))
|
||||
&& (width != next_p2(width) || height != next_p2(height)))
|
||||
&& (width != nextP2(width) || height != nextP2(height)))
|
||||
{
|
||||
if (wrap.s != WRAP_CLAMP || wrap.t != WRAP_CLAMP)
|
||||
success = false;
|
||||
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
uint32 getTextureCacheID() const;
|
||||
|
||||
static bool getConstant(const char *in, AlignMode &out);
|
||||
static bool getConstant(AlignMode in, const char *&out);
|
||||
static bool getConstant(AlignMode in, const char *&out);
|
||||
|
||||
static int fontCount;
|
||||
|
||||
|
||||
@@ -1106,7 +1106,7 @@ void Graphics::setBlendMode(BlendMode mode, BlendAlpha alphamode)
|
||||
|
||||
if (mode == BLEND_LIGHTEN || mode == BLEND_DARKEN)
|
||||
{
|
||||
if (!isSupported(SUPPORT_LIGHTEN))
|
||||
if (!isSupported(FEATURE_LIGHTEN))
|
||||
throw love::Exception("The 'lighten' and 'darken' blend modes are not supported on this system.");
|
||||
}
|
||||
|
||||
@@ -1680,15 +1680,15 @@ double Graphics::getSystemLimit(SystemLimit limittype) const
|
||||
}
|
||||
}
|
||||
|
||||
bool Graphics::isSupported(Support feature) const
|
||||
bool Graphics::isSupported(Feature feature) const
|
||||
{
|
||||
switch (feature)
|
||||
{
|
||||
case SUPPORT_MULTI_CANVAS_FORMATS:
|
||||
case FEATURE_MULTI_CANVAS_FORMATS:
|
||||
return Canvas::isMultiFormatMultiCanvasSupported();
|
||||
case SUPPORT_CLAMP_ZERO:
|
||||
case FEATURE_CLAMP_ZERO:
|
||||
return gl.isClampZeroTextureWrapSupported();
|
||||
case SUPPORT_LIGHTEN:
|
||||
case FEATURE_LIGHTEN:
|
||||
return GLAD_VERSION_1_4 || GLAD_ES_VERSION_3_0 || GLAD_EXT_blend_minmax;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -468,7 +468,7 @@ public:
|
||||
/**
|
||||
* Gets whether a graphics feature is supported on this system.
|
||||
**/
|
||||
bool isSupported(Support feature) const;
|
||||
bool isSupported(Feature feature) const;
|
||||
|
||||
void push(StackType type = STACK_TRANSFORM);
|
||||
void pop();
|
||||
|
||||
@@ -308,7 +308,7 @@ bool Image::loadVolatile()
|
||||
|
||||
// NPOT textures don't support mipmapping without full NPOT support.
|
||||
if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot))
|
||||
&& (width != next_p2(width) || height != next_p2(height)))
|
||||
&& (width != nextP2(width) || height != nextP2(height)))
|
||||
{
|
||||
flags.mipmaps = false;
|
||||
filter.mipmap = FILTER_NONE;
|
||||
@@ -519,7 +519,7 @@ bool Image::setWrap(const Texture::Wrap &w)
|
||||
wrap = w;
|
||||
|
||||
if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot))
|
||||
&& (width != next_p2(width) || height != next_p2(height)))
|
||||
&& (width != nextP2(width) || height != nextP2(height)))
|
||||
{
|
||||
if (wrap.s != WRAP_CLAMP || wrap.t != WRAP_CLAMP)
|
||||
success = false;
|
||||
|
||||
@@ -1387,11 +1387,11 @@ int w_setDefaultShaderCode(lua_State *L)
|
||||
|
||||
int w_getSupported(lua_State *L)
|
||||
{
|
||||
lua_createtable(L, 0, (int) Graphics::SUPPORT_MAX_ENUM);
|
||||
lua_createtable(L, 0, (int) Graphics::FEATURE_MAX_ENUM);
|
||||
|
||||
for (int i = 0; i < (int) Graphics::SUPPORT_MAX_ENUM; i++)
|
||||
for (int i = 0; i < (int) Graphics::FEATURE_MAX_ENUM; i++)
|
||||
{
|
||||
Graphics::Support feature = (Graphics::Support) i;
|
||||
auto feature = (Graphics::Feature) i;
|
||||
const char *name = nullptr;
|
||||
|
||||
if (!Graphics::getConstant(feature, name))
|
||||
|
||||
Reference in New Issue
Block a user