diff options
author | sanine <sanine.not@pm.me> | 2023-03-12 00:44:46 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-03-12 00:44:46 -0600 |
commit | f1444d38ed6c8a350cbeb6edd01306df42ccf2f6 (patch) | |
tree | ea24a0bc1d5bcffa6b9c9ecc937f46d3227ce23b /demo/fancy | |
parent | 427a7e24281ca345fa2799da628baa7cf5f81269 (diff) |
add glGetString bind
Diffstat (limited to 'demo/fancy')
-rw-r--r-- | demo/fancy/main.lua | 10 |
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; |