polygon filler, rudimentary GL
[gba_blender] / src / gfx.h
index 5ea579a..6ba6af5 100644 (file)
--- a/src/gfx.h
+++ b/src/gfx.h
@@ -22,11 +22,9 @@ along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 #define wait_vblank()  while(REG_VCOUNT < 160)
 
-#define swap_buffers() \
+#define present(x) \
        do { \
-               static int vis; \
-               vis ^= 0x10; \
-               REG_DISPCNT = DISPCNT_BG2 | 4 | vis; \
+               REG_DISPCNT = DISPCNT_BG2 | 4 | ((x) << 4); \
        } while(0)
 
 #define set_bg_color(idx, r, g, b) \