User Tools

Site Tools


development:csdk:2.0:getting_started

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
development:csdk:2.0:getting_started [2024/11/14 18:22] clydedevelopment:csdk:2.0:getting_started [2024/11/14 18:23] (current) clyde
Line 97: Line 97:
 </code> </code>
  
-//init_graphics()// takes care of some setup used for other drawing functions, and should be called pretty early on.+''init_graphics()'' takes care of some setup used for other drawing functions, and should be called pretty early on.
  
-The GameTank has a double buffer, and typically you'll be drawing on one frame while the other is being presented to the television. //flip_buffer()// toggles both the render target and the output buffer. In the beginning it's used to clear the screen on both buffers, and then is used on every frame right after the beginning of the video sync period.+The GameTank has a double buffer, and typically you'll be drawing on one frame while the other is being presented to the television. ''flip_buffer()'' toggles both the render target and the output buffer. In the beginning it's used to clear the screen on both buffers, and then is used on every frame right after the beginning of the video sync period.
  
-A notable feature of the SDK is a queued drawing API. The GameTank's blitter gives it the ability to continue executing code while pixels are being copied into the framebuffer. Making the most of this ability requires performing as much CPU computation as we can during a blit operation instead of simply waiting for a blit to finish. Eventually though there is nothing else to do but wait, and //await_draw_queue()// allows us to wait not just for the current draw but for all drawings we've requested that are still pending.+A notable feature of the SDK is a queued drawing API. The GameTank's blitter gives it the ability to continue executing code while pixels are being copied into the framebuffer. Making the most of this ability requires performing as much CPU computation as we can during a blit operation instead of simply waiting for a blit to finish. Eventually though there is nothing else to do but wait, and ''await_draw_queue()'' allows us to wait not just for the current draw but for all drawings we've requested that are still pending.
  
-//queue_draw_box// draws a box with a solid color at a given location. queue_clear_screen and queue_clear_border are essentially shortcuts for calling queue_draw_box on the full screen or the screen edges. This is part of the queued drawing API, so if it is called multiple times consecutively the first box will begin drawing while the sucessive calls are added to a list to be automatically drawn when the previous box finishes.+''queue_draw_box'' draws a box with a solid color at a given location. ''queue_clear_screen'' and ''queue_clear_border'' are essentially shortcuts for calling ''queue_draw_box'' on the full screen or the screen edges. This is part of the queued drawing API, so if it is called multiple times consecutively the first box will begin drawing while the sucessive calls are added to a list to be automatically drawn when the previous box finishes.
  
-//await_vsync// waits for a number of Vertical Sync signals, and is used for synchronizing with the television picture. //await_vsync(1)// doesn't wait for an entire 1/60s frame, but instead waits until the beginning of the next vertical sync period. This is when the electron beam will be approaching the top-left corner of the monitor, and soon begin to emit the next full frame.+''await_vsync'' waits for a number of Vertical Sync signals, and is used for synchronizing with the television picture. ''await_vsync(1)'' doesn't wait for an entire 1/60s frame, but instead waits until the beginning of the next vertical sync period. This is when the electron beam will be approaching the top-left corner of the monitor, and soon begin to emit the next full frame.
  
 ===== Testing on hardware ===== ===== Testing on hardware =====
development/csdk/2.0/getting_started.1731608534.txt.gz · Last modified: 2024/11/14 18:22 by clyde