Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/frag_svg.nim
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ proc start(title, vertexShaderText, fragmentShaderText: string) =
title = "Shady hidden window",
size = ivec2(900, 900),
visible = true,
openglMajorVersion = 4,
openglMinorVersion = 1,
openglVersion = OpenGL4Dot1,
)
# Connect the GL context.
window.makeContextCurrent()
Expand Down
4 changes: 2 additions & 2 deletions examples/triangle.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ proc basicVert(
vPos: Vec3,
vertColor: var Vec3
) =
gl_Position = MVP * vec4(vPos.x, vPos.y, 0.0, 1.0)
gl_Position = Mat4(MVP) * vec4(vPos.x, vPos.y, 0.0, 1.0)
vertColor = vCol

proc basicFrag(fragColor: var Vec4, vertColor: Vec3) =
Expand Down Expand Up @@ -119,7 +119,7 @@ proc draw() {.cdecl.} =
# Swap buffers (this will display the red color)
window.swapBuffers()

proc onResize(handle: staticglfw.Window, w, h: int32) {.cdecl.} =
proc onResize(handle: staticglfw.Window, w, h: cint) {.cdecl.} =
draw()
discard window.setFramebufferSizeCallback(onResize)

Expand Down
Loading