Mercurial > repos > tabletprog
comparison samples/sdl.tp @ 283:0ec4f1b68a38
Add copyTo method to texture that allows copying to a rectangular region on the renderer rather than stretching to fit the entire renderer
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 21 Jul 2014 20:27:38 -0700 |
parents | eb83863fd33e |
children | 99c18127da04 |
comparison
equal
deleted
inserted
replaced
282:361a449a7235 | 283:0ec4f1b68a38 |
---|---|
14 sdl clearError | 14 sdl clearError |
15 if: (tex copy) != 0 { | 15 if: (tex copy) != 0 { |
16 print: "Failed to copy texture to renderer: " . (sdl getError) . "\n" | 16 print: "Failed to copy texture to renderer: " . (sdl getError) . "\n" |
17 } | 17 } |
18 surf free | 18 surf free |
19 tex copyTo: (sdl rect: 160 120 size: 320 224) | |
19 render present | 20 render present |
20 sdl delay: 3000u32 | 21 sdl delay: 3000u32 |
21 tex destroy | 22 tex destroy |
22 } none: { | 23 } none: { |
23 surf free | 24 surf free |