[BGM Shader] Add a safety check for tweaking framebuffer sizes
This commit is contained in:
parent
313872f115
commit
8b006976b4
|
@ -67,6 +67,9 @@ func _draw() -> void:
|
|||
var draw_rows: int = self.render_queue[0][1]
|
||||
rows_drawn += draw_rows
|
||||
if rows_drawn > OUTPUT_HEIGHT:
|
||||
if self.waiting_for_viewport.empty():
|
||||
print('Could not fit %s into %dx%d output framebuffer, it needs %d rows'%[self.render_queue[0][2], OUTPUT_WIDTH, OUTPUT_HEIGHT, draw_rows])
|
||||
self.render_queue.pop_front()
|
||||
break
|
||||
|
||||
# Draw the next ImageTexture
|
||||
|
|
Loading…
Reference in New Issue