Skip to content

Commit

Permalink
Fix examples for 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Dec 6, 2018
1 parent eb23020 commit 1bacd77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/shader.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ proc cycle[T](x: var T) =

let texture = newTexture("resources/background.jpg")
var sprite = newSprite(texture)
var pxShader = newShader(nil, fragmentShaderFilename="resources/pixelate.frag")
var pxShader = newShader(nil, nil, fragmentShaderFilename="resources/pixelate.frag")
pxShader["texture"] = CurrentTexture


Expand All @@ -24,7 +24,8 @@ var text = newText(ipsum, font, 22)
text.position = vec2(30, 20)
text.color = Black
var wbShader = newShader(vertexShaderFilename="resources/wave.vert",
fragmentShaderFilename="resources/blur.frag")
geometryShaderFilename=nil,
fragmentShaderFilename="resources/blur.frag",)


var window = newRenderWindow(videoMode(800, 600), "SFML Shader",
Expand Down
2 changes: 1 addition & 1 deletion examples/sound_capture.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var sampleRate = parseInt(stdin.readLine())

var recorder = newSoundBufferRecorder()

recorder.start(cint(sampleRate))
discard recorder.start(cint(sampleRate))
echo "Recording... press Enter to stop"
discard stdin.readLine()
recorder.stop()
Expand Down

0 comments on commit 1bacd77

Please sign in to comment.