blob: bad2c68a8bf07dc48316ef7bd6dcd345604a805a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
for k, v in pairs(honey.shader) do
print(k, v)
end
honey.input.key.bind(honey.input.key.escape, honey.exit)
local vertex_shader = [[
#version 330 core
layout(location = 0) in vec3 position;
void main()
{
gl_Position.xyz = position;
gl_Position.w = 1.0;
} ]]
local fragment_shader = [[
#version 330 core
out vec4 color;
void main() { color = vec4(1,0,0,1); } ]]
local shader = honey.shader.new(vertex_shader, fragment_shader)
local plane = honey.primitives.plane(1,1)
function honey.update(dt)
end
function honey.draw()
honey.mesh.draw(plane, shader)
end
|