Update realtime_xlib.nim
This commit is contained in:
parent
a6c1c63e30
commit
da59293417
|
@ -1,6 +1,10 @@
|
|||
## This example show how to have real time pixie using the X11 API.
|
||||
|
||||
import math, pixie, x11/[x, xlib], std/os
|
||||
import math, pixie, std/os
|
||||
import
|
||||
x11/xlib,
|
||||
x11/xutil,
|
||||
x11/x
|
||||
|
||||
let
|
||||
w: int32 = 256
|
||||
|
@ -17,7 +21,6 @@ var
|
|||
graphicsContext: GC
|
||||
frameCount = 0
|
||||
|
||||
|
||||
proc render() =
|
||||
## Called every frame by main while loop
|
||||
|
||||
|
@ -51,11 +54,6 @@ proc render() =
|
|||
frameBuffer), w.cuint, h.cuint, 8, w*4)
|
||||
discard XPutImage(display, window, graphicsContext, image, 0, 0, 0, 0, w.cuint, h.cuint)
|
||||
|
||||
import
|
||||
x11/xlib,
|
||||
x11/xutil,
|
||||
x11/x
|
||||
|
||||
const
|
||||
borderWidth = 0
|
||||
eventMask = ButtonPressMask or KeyPressMask or ExposureMask
|
||||
|
|
Loading…
Reference in a new issue