Add a GraphicsFeature support enum for 32 bit index buffers.

Some old OpenGL ES 2 systems don't support them.
This commit is contained in:
Alex Szpakowski
2022-01-03 16:09:38 -04:00
parent ac8f5374c2
commit 42e8df1489
4 changed files with 8 additions and 2 deletions
+3
View File
@@ -76,6 +76,9 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
if (indexbuffer)
{
if (!caps.features[Graphics::FEATURE_INDEX_BUFFER_32BIT] && format == DATAFORMAT_UINT32)
throw love::Exception("32 bit index buffer formats are not supported on this system.");
if (format != DATAFORMAT_UINT16 && format != DATAFORMAT_UINT32)
throw love::Exception("Index buffers only support uint16 and uint32 data types.");