mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
Remove a couple internal support checks that aren't needed anymore.
This commit is contained in:
@@ -50,7 +50,6 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
|
|||||||
throw love::Exception("Data format must contain values.");
|
throw love::Exception("Data format must contain values.");
|
||||||
|
|
||||||
const auto &caps = gfx->getCapabilities();
|
const auto &caps = gfx->getCapabilities();
|
||||||
bool supportsGLSL3 = caps.features[Graphics::FEATURE_GLSL3];
|
|
||||||
|
|
||||||
bool indexbuffer = usageFlags & BUFFERUSAGEFLAG_INDEX;
|
bool indexbuffer = usageFlags & BUFFERUSAGEFLAG_INDEX;
|
||||||
bool vertexbuffer = usageFlags & BUFFERUSAGEFLAG_VERTEX;
|
bool vertexbuffer = usageFlags & BUFFERUSAGEFLAG_VERTEX;
|
||||||
@@ -107,9 +106,6 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
|
|||||||
if (info.baseType == DATA_BASETYPE_BOOL)
|
if (info.baseType == DATA_BASETYPE_BOOL)
|
||||||
throw love::Exception("Bool types are not supported in vertex buffers.");
|
throw love::Exception("Bool types are not supported in vertex buffers.");
|
||||||
|
|
||||||
if ((info.baseType == DATA_BASETYPE_INT || info.baseType == DATA_BASETYPE_UINT) && !supportsGLSL3)
|
|
||||||
throw love::Exception("Integer vertex attribute data types require GLSL 3 support.");
|
|
||||||
|
|
||||||
if (decl.name.empty())
|
if (decl.name.empty())
|
||||||
throw love::Exception("Vertex buffer attributes must have a name.");
|
throw love::Exception("Vertex buffer attributes must have a name.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2163,9 +2163,6 @@ void Graphics::drawFromShader(PrimitiveType primtype, int vertexcount, int insta
|
|||||||
|
|
||||||
flushBatchedDraws();
|
flushBatchedDraws();
|
||||||
|
|
||||||
if (!capabilities.features[FEATURE_GLSL3])
|
|
||||||
throw love::Exception("drawFromShader is not supported on this system (GLSL3 support is required.)");
|
|
||||||
|
|
||||||
if (Shader::isDefaultActive() || !Shader::current)
|
if (Shader::isDefaultActive() || !Shader::current)
|
||||||
throw love::Exception("drawFromShader can only be used with a custom shader.");
|
throw love::Exception("drawFromShader can only be used with a custom shader.");
|
||||||
|
|
||||||
@@ -2191,9 +2188,6 @@ void Graphics::drawFromShader(Buffer *indexbuffer, int indexcount, int instancec
|
|||||||
{
|
{
|
||||||
flushBatchedDraws();
|
flushBatchedDraws();
|
||||||
|
|
||||||
if (!capabilities.features[FEATURE_GLSL3])
|
|
||||||
throw love::Exception("drawFromShader is not supported on this system (GLSL3 support is required.)");
|
|
||||||
|
|
||||||
if (!(indexbuffer->getUsageFlags() & BUFFERUSAGEFLAG_INDEX))
|
if (!(indexbuffer->getUsageFlags() & BUFFERUSAGEFLAG_INDEX))
|
||||||
throw love::Exception("The buffer passed to drawFromShader must be an index buffer.");
|
throw love::Exception("The buffer passed to drawFromShader must be an index buffer.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user