Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
30
Task/Window-creation/Odin/window-creation.odin
Normal file
30
Task/Window-creation/Odin/window-creation.odin
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package main
|
||||
|
||||
import "vendor:sdl2"
|
||||
|
||||
main :: proc() {
|
||||
using sdl2
|
||||
|
||||
window: ^Window = ---
|
||||
renderer: ^Renderer = ---
|
||||
event: Event = ---
|
||||
|
||||
Init(INIT_VIDEO)
|
||||
CreateWindowAndRenderer(
|
||||
640, 480,
|
||||
WINDOW_SHOWN,
|
||||
&window, &renderer
|
||||
)
|
||||
|
||||
SetWindowTitle(window, "Empty window")
|
||||
RenderPresent(renderer)
|
||||
|
||||
for event.type != .QUIT {
|
||||
Delay(10)
|
||||
PollEvent(&event)
|
||||
}
|
||||
|
||||
DestroyRenderer(renderer)
|
||||
DestroyWindow(window)
|
||||
Quit()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue