This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
notes:comporg:spring2024:projects:def0 [2024/02/15 01:09] – [Comparisons] jwieland | notes:comporg:spring2024:projects:def0 [2024/02/15 04:58] (current) – [Drawing Regions] rspringe | ||
---|---|---|---|
Line 45: | Line 45: | ||
=====Drawing Regions===== | =====Drawing Regions===== | ||
+ | Before a region can be drawn, its borders have to be defined within the texture file. | ||
+ | |||
+ | This is done similarly to the define_region functions in C: | ||
+ | <code C> | ||
+ | define_region(minX, | ||
+ | </ | ||
+ | |||
+ | Except that here, you have to input each coordinate value individually, | ||
+ | |||
+ | Getting only the necessary lines from the compiled code, defining a region would look like so: | ||
+ | <code asm> | ||
+ | out GPU_RegionMinX, | ||
+ | out GPU_RegionMinY, | ||
+ | . . . | ||
+ | out GPU_RegionHotSpotY, | ||
+ | </ | ||
+ | |||
+ | Where " | ||
+ | |||
To display your regions you have to say where you want to display the region. That is done by putting in values for X and Y into 2 different registers. Here is what that looks like: | To display your regions you have to say where you want to display the region. That is done by putting in values for X and Y into 2 different registers. Here is what that looks like: | ||