Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Turns out you can't have too many draw commands

    General Discussion
    2
    2
    197
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Discostew
      Discostew F last edited by

      Doing some testing, and commented out the update() function so nothing would be shown on the screen. The only draw commands being done was clear() and print(). After a short while, the program stopped with an error saying...

      Error: Out of command memory: Too much drawing between calls to update().
      

      So there's a limit, but how much?

      1 Reply Last reply Reply Quote 1
      • ITzTravelInTime
        ITzTravelInTime F last edited by

        In some cases this can also bring to a stack overflow, the functions like clear and draw are essentially screen writing commands for the video engine, but the engine seems to have a fixed length array of operations it can do beetween each update call, this is done probably for optimization purposes, so all the drawing commands can be performed very quickly by optimized and possibly compiled code from the engine in a reasonably short ammount of time, so you program can have smooth graphics while being written in an interpreted language, luckly the limit of commands beetween update calls is quite high so it should be plenty for every program.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post