Remove more obsolete code.

This commit is contained in:
Sasha Szpakowski
2024-06-20 22:14:31 -03:00
parent 8ceae23aa3
commit 25a6576785
4 changed files with 0 additions and 18 deletions
-5
View File
@@ -1045,8 +1045,6 @@ void Graphics::setRenderTargets(const RenderTargets &rts)
if (rtcount > capabilities.limits[LIMIT_RENDER_TARGETS])
throw love::Exception("This system can't simultaneously render to %d textures.", rtcount);
bool multiformatsupported = capabilities.features[FEATURE_MULTI_RENDER_TARGET_FORMATS];
PixelFormat firstcolorformat = PIXELFORMAT_UNKNOWN;
if (!rts.colors.empty())
firstcolorformat = rts.colors[0].texture->getPixelFormat();
@@ -1087,9 +1085,6 @@ void Graphics::setRenderTargets(const RenderTargets &rts)
if (c->getPixelWidth(mip) != pixelw || c->getPixelHeight(mip) != pixelh)
throw love::Exception("All textures must have the same pixel dimensions.");
if (!multiformatsupported && format != firstcolorformat)
throw love::Exception("This system doesn't support multi-render-target rendering with different texture formats.");
if (c->getRequestedMSAA() != reqmsaa)
throw love::Exception("All textures must have the same MSAA value.");
-6
View File
@@ -163,9 +163,6 @@ void Mesh::finalizeAttribute(Graphics *gfx, BufferAttribute &attrib) const
if ((attrib.buffer->getUsageFlags() & BUFFERUSAGEFLAG_VERTEX) == 0)
throw love::Exception("Buffer must be created with vertex buffer support to be used as a Mesh vertex attribute.");
if (attrib.step == STEP_PER_INSTANCE && !gfx->getCapabilities().features[Graphics::FEATURE_INSTANCING])
throw love::Exception("Vertex attribute instancing is not supported on this system.");
if (attrib.startArrayIndex < 0 || attrib.startArrayIndex >= (int)attrib.buffer->getArrayLength())
throw love::Exception("Invalid start array index %d.", attrib.startArrayIndex + 1);
@@ -562,9 +559,6 @@ void Mesh::drawInternal(Graphics *gfx, const Matrix4 &m, int instancecount, Buff
if (vertexCount <= 0 || (instancecount <= 0 && indirectargs == nullptr))
return;
if (instancecount > 1 && !gfx->getCapabilities().features[Graphics::FEATURE_INSTANCING])
throw love::Exception("Instancing is not supported on this system.");
if (indirectargs != nullptr)
{
if (primitiveType == PRIMITIVE_TRIANGLE_FAN)
-5
View File
@@ -248,11 +248,6 @@ void OpenGL::setupContext()
glGetIntegerv(GL_SCISSOR_BOX, (GLint *) &state.scissor.x);
state.scissor.y = state.viewport.h - (state.scissor.y + state.scissor.h);
if (GLAD_VERSION_1_0)
glGetFloatv(GL_POINT_SIZE, &state.pointSize);
else
state.pointSize = 1.0f;
for (int i = 0; i < 2; i++)
state.boundFramebuffers[i] = std::numeric_limits<GLuint>::max();
bindFramebuffer(FRAMEBUFFER_ALL, getDefaultFBO());
-2
View File
@@ -511,8 +511,6 @@ private:
Rect viewport;
Rect scissor;
float pointSize;
bool depthWritesEnabled = true;
uint32 stencilWriteMask = LOVE_UINT32_MAX;
uint32 colorWriteMask = LOVE_UINT32_MAX;