tetris: cleanup unused variable warnings
parent
48857090fc
commit
1c46dabc84
|
@ -334,7 +334,7 @@ fn (ctx mut FreeType) private_draw_text(_x, _y int, utext ustring, cfg gx.TextCf
|
||||||
}
|
}
|
||||||
// A new Unicode character. Load it and cache it.
|
// A new Unicode character. Load it and cache it.
|
||||||
if !found && _rune.len > 0 && _rune[0] > 32 {
|
if !found && _rune.len > 0 && _rune[0] > 32 {
|
||||||
c := _rune[0]
|
//c := _rune[0]
|
||||||
//println('cant draw rune "$_rune" code=$c, loading')
|
//println('cant draw rune "$_rune" code=$c, loading')
|
||||||
//continue
|
//continue
|
||||||
ch = ft_load_char(ctx.face, _rune.utf32_code())
|
ch = ft_load_char(ctx.face, _rune.utf32_code())
|
||||||
|
|
|
@ -133,10 +133,11 @@ pub fn new_shader(name string) Shader {
|
||||||
gl.shader_source(vertex_shader, 1, vertex_src, 0)
|
gl.shader_source(vertex_shader, 1, vertex_src, 0)
|
||||||
gl.compile_shader(vertex_shader)
|
gl.compile_shader(vertex_shader)
|
||||||
if gl.shader_compile_status(vertex_shader) == 0 {
|
if gl.shader_compile_status(vertex_shader) == 0 {
|
||||||
log := gl.shader_info_log(vertex_shader)
|
cerror := gl.shader_info_log(vertex_shader)
|
||||||
println('shader $vertex_shader compilation failed')
|
eprintln('vertex ${vertex_shader} shader compilation failed')
|
||||||
println('shader source = $vertex_src')
|
eprintln('shader source = ${vertex_src}')
|
||||||
println('shader failed to compile')
|
eprintln('failed to compile, with error')
|
||||||
|
eprintln(cerror)
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
// fragment shader
|
// fragment shader
|
||||||
|
@ -145,8 +146,11 @@ pub fn new_shader(name string) Shader {
|
||||||
gl.shader_source(fragment_shader, 1, fragment_src, 0)
|
gl.shader_source(fragment_shader, 1, fragment_src, 0)
|
||||||
gl.compile_shader(fragment_shader)
|
gl.compile_shader(fragment_shader)
|
||||||
if gl.shader_compile_status(fragment_shader) == 0 {
|
if gl.shader_compile_status(fragment_shader) == 0 {
|
||||||
println('fragment $fragment_shader shader compilation failed')
|
cerror := gl.shader_info_log(fragment_shader)
|
||||||
println('shader failed to compile')
|
eprintln('fragment ${fragment_shader} shader compilation failed')
|
||||||
|
eprintln('shader source = ${fragment_src}')
|
||||||
|
eprintln('failed to compile, with error')
|
||||||
|
eprintln(cerror)
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
// link shaders
|
// link shaders
|
||||||
|
@ -157,10 +161,12 @@ pub fn new_shader(name string) Shader {
|
||||||
// check for linking errors
|
// check for linking errors
|
||||||
success := gl.get_program_link_status(shader_program)
|
success := gl.get_program_link_status(shader_program)
|
||||||
if success == 0 {
|
if success == 0 {
|
||||||
println('shader compilation failed')
|
cerror := gl.shader_info_log(shader_program)
|
||||||
println('vertex source = $vertex_src')
|
eprintln('shader program linking failed')
|
||||||
println('fragment source = $fragment_src')
|
eprintln('vertex source = ${vertex_src}')
|
||||||
println('shader failed to compile')
|
eprintln('fragment source = ${fragment_src}')
|
||||||
|
eprintln('failed to compile, with error')
|
||||||
|
eprintln(cerror)
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
shader := Shader {
|
shader := Shader {
|
||||||
|
|
Loading…
Reference in New Issue