use GL_TRIANGLE_FAN instead of nonexistent GL_POLYGONS

This commit is contained in:
Chris Sarbora 2024-08-01 04:41:03 -05:00
parent a06e78074f
commit 77fb0cd1ab
No known key found for this signature in database

View File

@ -1342,7 +1342,7 @@ void gpu_RenderPolygon(PosColorUVVertex *vData, uint32_t nv) {
gRenderer->setTextureEnabled(1, false); gRenderer->setTextureEnabled(1, false);
// draw the data in the arrays // draw the data in the arrays
dglDrawArrays(GL_POLYGON, 0, nv); dglDrawArrays(GL_TRIANGLE_FAN, 0, nv);
if (gpu_state.cur_texture_quality == 0) { if (gpu_state.cur_texture_quality == 0) {
// re-enable textures // re-enable textures
@ -1357,7 +1357,7 @@ void gpu_RenderPolygonUV2(PosColorUV2Vertex *vData, uint32_t nv) {
gRenderer->setTextureEnabled(1, true); gRenderer->setTextureEnabled(1, true);
gRenderer->setVertexData(0, nv, vData); gRenderer->setVertexData(0, nv, vData);
dglDrawArrays(GL_POLYGON, 0, nv); dglDrawArrays(GL_TRIANGLE_FAN, 0, nv);
OpenGL_polys_drawn++; OpenGL_polys_drawn++;
OpenGL_verts_processed += nv; OpenGL_verts_processed += nv;