bmx-ng / sdl.mod

SDL backend for BlitzMax
7 stars 6 forks source link

Fix: Handle SetViewport() and Cls()'s immediate mode by flushing batches before #8

Closed GWRon closed 8 years ago

GWRon commented 8 years ago

Problem: SetViewport() and Cls() do their adjustments immediately while all drawing commands (DrawRect, DrawImage...) are batched. This leads to the odd behaviour of viewport adjustments being executed before the batch is rendered. So they happen at another position in the queue then intended. Same for Cls(). So calling Cls() between two "DrawRect()" (which share the same primitive_id) would get executed before the batch renders these two rectangles.

GWRon commented 8 years ago

For now this wont work, as the "primitive_id" wont be changed on SetViewport()-calls, which leads to uncontrollable handling of the shaders.