devkitPro / opengx

OpenGL-like wrapper for Nintendo Wii/GameCube
19 stars 2 forks source link

draw: restore drawing of loop lines #63

Closed mardy closed 3 months ago

mardy commented 3 months ago

This got broken in 586168c91f314a8bf01f3efaac5c45d80eb43d27, which changed the code to compare a GX mode (an 8-bit integer) with GL_LINE_LOOP (which is a GLenum, 16-bit wide).

We fix this by refactoring the draw_mode() function to return a small struct containing both the GX mode and a flag to indicate if looping is needed.