Skip to content

Commit

Permalink
Remove more obsolete code.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Jun 21, 2024
1 parent 8ceae23 commit 25a6576
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions src/modules/graphics/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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.");

Expand Down
6 changes: 0 additions & 6 deletions src/modules/graphics/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions src/modules/graphics/opengl/OpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 0 additions & 2 deletions src/modules/graphics/opengl/OpenGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ class OpenGL
Rect viewport;
Rect scissor;

float pointSize;

bool depthWritesEnabled = true;
uint32 stencilWriteMask = LOVE_UINT32_MAX;
uint32 colorWriteMask = LOVE_UINT32_MAX;
Expand Down

0 comments on commit 25a6576

Please sign in to comment.