app :: App :: create_gamnit
The gamnit services redefine this method to prepare optimizations and more. Clients may also refine this method to prepare custom OpenGL resources.
# Hook to setup the OpenGL context: compiling shaders, creating VBO, reloading textures, etc.
#
# The gamnit services redefine this method to prepare optimizations and more.
# Clients may also refine this method to prepare custom OpenGL resources.
fun create_gamnit do end
lib/gamnit/gamnit.nit:34,2--38,25
redef fun create_gamnit
do
super
var program = dynres_program
program.compile_and_link
var error = program.error
assert error == null else print_error error
dynamic_context_cache = null
end
lib/gamnit/dynamic_resolution.nit:71,2--81,4
redef fun create_gamnit
do
super
create_flat
end
lib/gamnit/flat/flat_core.nit:423,2--427,4
redef fun create_gamnit
do
super
var program = shadow_depth_program
program.compile_and_link
var error = program.error
assert error == null else print_error error
end
lib/gamnit/depth/shadow.nit:55,2--63,4
redef fun create_gamnit
do
super
# Cull the invisible triangles in the back of the geometries
glCullFace gl_BACK
# Prepare programs
var programs = [blinn_phong_program, normals_program, explosion_program, smoke_program, static_program, selection_program: GamnitProgram]
for program in programs do
program.compile_and_link
var gamnit_error = program.error
assert gamnit_error == null else print_error gamnit_error
end
end
lib/gamnit/depth/depth.nit:37,2--51,4