Merge pull request #227 from zetashift/master
fix typo in realtime_sdl example
This commit is contained in:
commit
f64ae08744
1 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ var
|
||||||
frameCount = 0
|
frameCount = 0
|
||||||
window: WindowPtr
|
window: WindowPtr
|
||||||
render: RendererPtr
|
render: RendererPtr
|
||||||
mainSerface: SurfacePtr
|
mainSurface: SurfacePtr
|
||||||
mainTexture: TexturePtr
|
mainTexture: TexturePtr
|
||||||
evt = sdl2.defaultEvent
|
evt = sdl2.defaultEvent
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ proc display() =
|
||||||
inc frameCount
|
inc frameCount
|
||||||
|
|
||||||
var dataPtr = ctx.image.data[0].addr
|
var dataPtr = ctx.image.data[0].addr
|
||||||
mainSerface.pixels = dataPtr
|
mainSurface.pixels = dataPtr
|
||||||
mainTexture = render.createTextureFromSurface(mainSerface)
|
mainTexture = render.createTextureFromSurface(mainSurface)
|
||||||
render.copy(mainTexture, nil, nil)
|
render.copy(mainTexture, nil, nil)
|
||||||
render.present()
|
render.present()
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ const
|
||||||
gmask = uint32 0x0000ff00
|
gmask = uint32 0x0000ff00
|
||||||
bmask = uint32 0x00ff0000
|
bmask = uint32 0x00ff0000
|
||||||
amask = uint32 0xff000000
|
amask = uint32 0xff000000
|
||||||
mainSerface = createRGBSurface(0, cint w, cint h, 32, rmask, gmask, bmask, amask)
|
mainSurface = createRGBSurface(0, cint w, cint h, 32, rmask, gmask, bmask, amask)
|
||||||
|
|
||||||
render = createRenderer(window, -1, 0)
|
render = createRenderer(window, -1, 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue