Automatic closing of examples, revise drawing example

This commit is contained in:
Krzosa Karol
2022-09-28 14:09:20 +02:00
parent 4510f39397
commit 83ffc82f79
6 changed files with 27 additions and 31 deletions

View File

@@ -182,11 +182,9 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
Screen = bitmap.data; X = bitmap.size.x; Y = bitmap.size.y
Raymarcher_Update()
SelectObject(bitmap.hdc, bitmap.dib)
BitBlt(window_dc, 0, 0, (bitmap.size.x)->int, (bitmap.size.y)->int, bitmap.hdc, 0, 0, SRCCOPY)
frame_time := Time() - frame_start_time
frame_number += 1
TotalTime += frame_time
@@ -203,3 +201,6 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
new_frame_time = Time() - frame_start_time
frame_time = new_frame_time
if CStringCompare(lpCmdLine, "testing")
ExitProcess(0)