summaryrefslogtreecommitdiff
path: root/demo/fancy/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'demo/fancy/main.lua')
-rw-r--r--demo/fancy/main.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/demo/fancy/main.lua b/demo/fancy/main.lua
index 19b3239..3defde6 100644
--- a/demo/fancy/main.lua
+++ b/demo/fancy/main.lua
@@ -24,6 +24,12 @@ glfw.MakeContextCurrent(w)
gl.InitGlad()
gl.Enable(gl.DEPTH_TEST)
+-- query gl data
+print("vendor", gl.GetString(gl.VENDOR))
+print("renderer", gl.GetString(gl.RENDERER))
+print("version", gl.GetString(gl.VERSION))
+print("glsl version", gl.GetString(gl.SHADING_LANGUAGE_VERSION))
+
--window.setFramebufferSizeCallback(w, function(_, width, height)
-- print(string.format("resize: (%d, %d)", width, height))
-- gl.Viewport(0, 0, width, height)
@@ -33,7 +39,7 @@ gl.Enable(gl.DEPTH_TEST)
--====== compile shaders ======--
local vertexShaderSource = [[
-#version 330 core
+#version 410 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;
@@ -53,7 +59,7 @@ void main()
]]
local fragmentShaderSource = [[
-#version 330 core
+#version 410 core
out vec4 FragColor;
in vec3 pos;