[SCM] applications.git branch, master, updated. fa63c74fb48777247f1159b6d1421ea1c1312805
Damien Bouvarel
d.bouvarel at lisaac.org
Sat Feb 6 11:27:07 UTC 2010
The following commit has been merged in the master branch:
commit fa63c74fb48777247f1159b6d1421ea1c1312805
Author: Damien Bouvarel <d.bouvarel at lisaac.org>
Date: Sat Feb 6 12:21:42 2010 +0100
opengl cleanup
diff --git a/examples/misc/chess/.project b/examples/misc/chess/.project
deleted file mode 100644
index 80894d2..0000000
--- a/examples/misc/chess/.project
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>chess</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.lisaac.ldt.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.lisaac.ldt.lisaac</nature>
- </natures>
- <linkedResources>
- <link>
- <name>lib/abstract_keycode.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/low_level/abstract_keycode.li</location>
- </link>
- <link>
- <name>lib/abstract_matrix.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/low_level/abstract_matrix.li</location>
- </link>
- <link>
- <name>lib/arrayed.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/arrayed.li</location>
- </link>
- <link>
- <name>lib/arrayed_collection.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/arrayed_collection.li</location>
- </link>
- <link>
- <name>lib/blending.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/blending.li</location>
- </link>
- <link>
- <name>lib/block.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/base/block.li</location>
- </link>
- <link>
- <name>lib/boolean.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/base/boolean.li</location>
- </link>
- <link>
- <name>lib/bounce_plane.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/bounce_plane.li</location>
- </link>
- <link>
- <name>lib/camera.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/camera.li</location>
- </link>
- <link>
- <name>lib/capabilities.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/capabilities.li</location>
- </link>
- <link>
- <name>lib/collection.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/collection.li</location>
- </link>
- <link>
- <name>lib/event_listener.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/event_listener.li</location>
- </link>
- <link>
- <name>lib/fast_array.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/fast_array.li</location>
- </link>
- <link>
- <name>lib/float_real.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/float_real.li</location>
- </link>
- <link>
- <name>lib/font.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/font.li</location>
- </link>
- <link>
- <name>lib/framework.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/framework.li</location>
- </link>
- <link>
- <name>lib/framework_any.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/low_level/framework_any.li</location>
- </link>
- <link>
- <name>lib/framework_event.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/framework_event.li</location>
- </link>
- <link>
- <name>lib/i_dont_know_prototyping.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/kernel/i_dont_know_prototyping.li</location>
- </link>
- <link>
- <name>lib/image.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/image.li</location>
- </link>
- <link>
- <name>lib/integer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/integer.li</location>
- </link>
- <link>
- <name>lib/keycode.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/keycode.li</location>
- </link>
- <link>
- <name>lib/light.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/light.li</location>
- </link>
- <link>
- <name>lib/log.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/log.li</location>
- </link>
- <link>
- <name>lib/material.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/material.li</location>
- </link>
- <link>
- <name>lib/matrix4.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/matrix4.li</location>
- </link>
- <link>
- <name>lib/numeric.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/numeric.li</location>
- </link>
- <link>
- <name>lib/object.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/kernel/object.li</location>
- </link>
- <link>
- <name>lib/opengl.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/opengl.li</location>
- </link>
- <link>
- <name>lib/opengl_abstract.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/opengl_abstract.li</location>
- </link>
- <link>
- <name>lib/opengl_specific.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/opengl_specific.li</location>
- </link>
- <link>
- <name>lib/particle_system.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/particle_system.li</location>
- </link>
- <link>
- <name>lib/plane.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/plane.li</location>
- </link>
- <link>
- <name>lib/platform.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/platform.li</location>
- </link>
- <link>
- <name>lib/point_force.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/point_force.li</location>
- </link>
- <link>
- <name>lib/real.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/real.li</location>
- </link>
- <link>
- <name>lib/real_32.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/real_32.li</location>
- </link>
- <link>
- <name>lib/renderer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/renderer.li</location>
- </link>
- <link>
- <name>lib/reshape.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/reshape.li</location>
- </link>
- <link>
- <name>lib/rgb.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/rgb.li</location>
- </link>
- <link>
- <name>lib/scene.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/scene.li</location>
- </link>
- <link>
- <name>lib/shader.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/shader.li</location>
- </link>
- <link>
- <name>lib/sphere.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/primitives/sphere.li</location>
- </link>
- <link>
- <name>lib/state.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/state.li</location>
- </link>
- <link>
- <name>lib/string.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/string/string.li</location>
- </link>
- <link>
- <name>lib/texture.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/texture.li</location>
- </link>
- <link>
- <name>lib/traversable.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/traversable.li</location>
- </link>
- <link>
- <name>lib/uinteger_32.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/uinteger_32.li</location>
- </link>
- <link>
- <name>lib/unsigned_integer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/unsigned_integer.li</location>
- </link>
- <link>
- <name>lib/vector3.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/vector3.li</location>
- </link>
- <link>
- <name>lib/vector4.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/vector4.li</location>
- </link>
- <link>
- <name>lib/viewport.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/viewport.li</location>
- </link>
- </linkedResources>
-</projectDescription>
diff --git a/examples/misc/chess/chess.li b/examples/misc/chess/chess.li
index 086c396..f9ae1af 100644
--- a/examples/misc/chess/chess.li
+++ b/examples/misc/chess/chess.li
@@ -29,11 +29,11 @@ Section Header
Section Inherit
- - parent_framework:FRAMEWORK := FRAMEWORK;
+ - parent_canvas:GL_CANVAS := GL_CANVAS;
+ parent_scene:Expanded SCENE;
- - parent_reshape:RESHAPE := RESHAPE;
+ - parent_reshape:GL_RESHAPE := GL_RESHAPE;
- parent_event_listener:EVENT_LISTENER := EVENT_LISTENER;
@@ -42,12 +42,12 @@ Section Public
- main <-
(
// pixel format query
- CAPABILITIES.use_stencil_buffer;
+ GL_CAPABILITIES.use_stencil_buffer;
OPENGL.set_reshape Self;
OPENGL.make (800,600) title "3D Chess Game";
- FRAMEWORK.make OPENGL;
+ GL_CANVAS.make OPENGL;
attach_scene Self;
add_key_listener Self;
@@ -73,10 +73,10 @@ Section Public
- current_world:SCENE;
- - board_texture:TEXTURE;
+ - board_texture:GL_TEXTURE;
- - black_texture:TEXTURE;
- - white_texture:TEXTURE;
+ - black_texture:GL_TEXTURE;
+ - white_texture:GL_TEXTURE;
- camera:CHESSCAM;
@@ -86,28 +86,28 @@ Section Public
- move_ok_color:COLOR := RGB.create (0,0.7,0);
- illegal_move_color:COLOR := RGB.create (0.8,0,0);
- - light:LIGHT;
+ - light:GL_LIGHT;
- light_pos:VECTOR3(REAL_32);
- - light_shader:SHADER;
+ - light_shader:GL_SHADER;
- loc_texture:INTEGER;
- sphere:SPHERE;// to represent light source
- - piece_material:MATERIAL;
- - board_material:MATERIAL;
+ - piece_material:GL_MATERIAL;
+ - board_material:GL_MATERIAL;
- shadow_matrix:MATRIX4(REAL_32);
- - shadow_plane:PLANE;
+ - shadow_plane:GL_PLANE;
- particle_system:PARTICLE_SYSTEM;// when capture is on
- - particle_texture:TEXTURE;
+ - particle_texture:GL_TEXTURE;
- modelview:MATRIX4(REAL_32);
- dx:VECTOR3(REAL_32) := VECTOR3(REAL_32).zero;
- dy:VECTOR3(REAL_32) := VECTOR3(REAL_32).zero;
- - logo:TEXTURE;
+ - logo:GL_TEXTURE;
- initialize:BOOLEAN <-
@@ -123,8 +123,8 @@ Section Public
// load textures
//
- black_texture := renderer.texture2d.create_from (IMAGE.create "textures/black.bmp");
- white_texture := renderer.texture2d.create_from (IMAGE.create "textures/white.bmp");
+ black_texture := renderer.texture.create_from (IMAGE.create "textures/black.bmp");
+ white_texture := renderer.texture.create_from (IMAGE.create "textures/white.bmp");
dim := 256;
@@ -141,8 +141,8 @@ Section Public
};
};
- board_texture := renderer.texture2d.create_from_data board size (dim,dim) type 1;
- logo := renderer.texture2d.create_from (IMAGE.create "textures/logo.bmp");
+ board_texture := renderer.texture.create_from_data board size (dim,dim) type 1;
+ logo := renderer.texture.create_from (IMAGE.create "textures/logo.bmp");
//
// load models
@@ -217,9 +217,9 @@ Section Public
// load particle texture
- renderer.texture2d.set_wrapping_mode (renderer.texture2d.clamp);
- particle_texture := renderer.texture2d.create_from (IMAGE.create "textures/particle.bmp");
- renderer.texture2d.set_wrapping_mode (renderer.texture2d.repeat);
+ renderer.texture.set_wrapping_mode (renderer.texture.clamp);
+ particle_texture := renderer.texture.create_from (IMAGE.create "textures/particle.bmp");
+ renderer.texture.set_wrapping_mode (renderer.texture.repeat);
modelview := MATRIX4(REAL_32).create;
@@ -343,11 +343,11 @@ Section Public
light_pos.set_z (100.0 * (1.0*counter).sin);
// debug light position
- renderer.texture2d.disable;
+ renderer.texture.disable;
renderer.color_buffer.set_color3f (0.9, 1.0, 0.6);
sphere.render;
renderer.color_buffer.set_color3f (1, 1, 1);
- renderer.texture2d.enable;
+ renderer.texture.enable;
renderer.enable_lighting;
@@ -412,7 +412,7 @@ Section Public
// draw logo
camera.is_traveling.if_false {
- renderer.light.push_attrib;
+ renderer.push_attrib;
renderer.transform.ortho_mode (renderer.width,renderer.height) do {
(gamestate.current_player = 1).if {
@@ -423,7 +423,7 @@ Section Public
logo.draw_strech (50,50,64,64);
renderer.color_buffer.set_color3f (1,1,1);
};
- renderer.light.pop_attrib;
+ renderer.pop_attrib;
};
//----- end rendering
);
@@ -604,7 +604,7 @@ Section Public
// shadow color (dark)
renderer.color_buffer.set_color3f (0, 0, 0);
- renderer.texture2d.disable;
+ renderer.texture.disable;
renderer.transform.new_matrix {
@@ -618,7 +618,7 @@ Section Public
};
};
renderer.color_buffer.set_color3f (1, 1, 1);
- renderer.texture2d.enable;
+ renderer.texture.enable;
);
//
@@ -794,9 +794,7 @@ Section Public
current_world.release;
};
- w.set_renderer renderer;
current_world := w;
-
current_world.initialize;
);
@@ -807,7 +805,7 @@ Section Public
- keydown k:INTEGER <-
(
(k = KEYCODE.k_escape).if {
- FRAMEWORK.stop;
+ GL_CANVAS.stop;
};
);
@@ -846,13 +844,13 @@ Section Public
(
+ ratio:REAL_32;
- ratio := renderer.width / renderer.height;
+ ratio := OPENGL.width / OPENGL.height;
- renderer.transform.new_projection {
- renderer.transform.load_identity;
+ OPENGL.transform.new_projection {
+ OPENGL.transform.load_identity;
- renderer.transform.perspective (renderer.fov, w.to_real/h.to_real, 0.1, 5000.0);
+ OPENGL.transform.perspective (OPENGL.fov, w.to_real/h.to_real, 0.1, 5000.0);
};
// clear modelview matrix
- renderer.transform.load_identity;
+ OPENGL.transform.load_identity;
);
diff --git a/examples/misc/chess/chesscam.li b/examples/misc/chess/chesscam.li
index ae4a419..abade00 100644
--- a/examples/misc/chess/chesscam.li
+++ b/examples/misc/chess/chesscam.li
@@ -60,7 +60,7 @@ Section Public
}.elseif {waypoints.count < 4} then {
waypoints.clear;
- FRAMEWORK.event.warp_mouse (screen_width>>1,screen_height>>1);
+ GL_CANVAS.event.warp_mouse (screen_width>>1,screen_height>>1);
// 'repair' camera after travelling
right := (view.cross std_up).normalized;
diff --git a/examples/misc/chess/gamestate.li b/examples/misc/chess/gamestate.li
index 770fe7c..a9ab156 100644
--- a/examples/misc/chess/gamestate.li
+++ b/examples/misc/chess/gamestate.li
@@ -93,7 +93,7 @@ Section Public
CHESS.camera.add_waypoint (CHESS.camera.position);
CHESS.camera.add_waypoint (CHESS.camera.view);
- (FRAMEWORK.random & 11b)
+ (GL_CANVAS.random & 11b)
.when 0 then {
// rotate over the chessboard
diff --git a/examples/misc/chess/piece.li b/examples/misc/chess/piece.li
index 168b0e5..304df11 100644
--- a/examples/misc/chess/piece.li
+++ b/examples/misc/chess/piece.li
@@ -77,9 +77,9 @@ Section Public
- check_move orig:SQUARE to dest:SQUARE :BOOLEAN <- deferred;
- - render r:RENDERER <-
+ - render r:OPENGL <-
(
- + texture:TEXTURE;
+ + texture:GL_TEXTURE;
+ x,y:REAL_32;
+ sz:INTEGER;
@@ -153,7 +153,7 @@ Section Public
- set_square sq:SQUARE <- (square := sq;);
- - set_renderer r:RENDERER at_position sq:SQUARE <-
+ - set_renderer r:OPENGL at_position sq:SQUARE <-
// translate to square
( + x,y:REAL_32;
diff --git a/examples/misc/chess/square.li b/examples/misc/chess/square.li
index 132dd19..e15e8a8 100644
--- a/examples/misc/chess/square.li
+++ b/examples/misc/chess/square.li
@@ -82,7 +82,7 @@ Section Public
- y:INTEGER <- value / 8;
- - render r:RENDERER color col:COLOR <-
+ - render r:OPENGL color col:COLOR <-
( + x,y,sz:INTEGER;
(x,y) := position;
@@ -94,7 +94,7 @@ Section Public
r.transform.translatef (3*CHESS.square_size+CHESS.square_size/2, 0, -3*CHESS.square_size-CHESS.square_size/2);
r.transform.translatef (-x*CHESS.square_size, 0, y*CHESS.square_size);
- r.texture2d.disable;
+ r.texture.disable;
r.color_buffer.set_color col;
r.blending.apply (r.blending.one,r.blending.zero);// erase color
diff --git a/examples/misc/chess/world1.li b/examples/misc/chess/world1.li
index 96d8a50..b148ced 100644
--- a/examples/misc/chess/world1.li
+++ b/examples/misc/chess/world1.li
@@ -42,30 +42,30 @@ Section Public
//
- water_resolution:INTEGER := 64;
- - water_texture:TEXTURE;
+ - water_texture:GL_TEXTURE;
- water_surface:FAST_ARRAY(REAL_32);
//
// shaded water effect
//
- - water_shader:SHADER;
+ - water_shader:GL_SHADER;
- loc_color_map:INTEGER; // variable locations in shader
- loc_noise_map:INTEGER;
- loc_time:INTEGER;
- - noise_map:TEXTURE;
+ - noise_map:GL_TEXTURE;
- skybox:SKYBOX;
- - fog:FOG;
+ - fog:GL_FOG;
- initialize:BOOLEAN <-
(
+ pos,dim:VECTOR3(REAL_32);
- + sky:FAST_ARRAY(TEXTURE);
- + tex:TEXTURE;
+ + sky:FAST_ARRAY(GL_TEXTURE);
+ + tex:GL_TEXTURE;
+ infolog:STRING;
//
@@ -73,7 +73,7 @@ Section Public
//
OPENGL.use_shaders.if_false {
- FRAMEWORK.log.append "Cannot support GLSL Shaders with ARB extensions";
+ GL_CANVAS.log.append "Cannot support GLSL Shaders with ARB extensions";
} else {
water_shader := renderer.shader.create ("shaders/water.vert","shaders/water.frag");
water_shader.enable;
@@ -83,8 +83,8 @@ Section Public
infolog := STRING.create 32;
water_shader.get_infolog infolog;
- FRAMEWORK.log.append "Compilation error(s) in water shader: ";
- FRAMEWORK.log.append infolog;
+ GL_CANVAS.log.append "Compilation error(s) in water shader: ";
+ GL_CANVAS.log.append infolog;
};
// get glsl uniform variables of shader
@@ -94,11 +94,11 @@ Section Public
water_shader.disable;
- renderer.texture2d.set_filter (renderer.texture2d.filter_linear);
+ renderer.texture.set_filter (renderer.texture.filter_linear);
// load noise texture
- noise_map := renderer.texture2d.create_from (IMAGE.create "textures/perlin_noise.bmp");
+ noise_map := renderer.texture.create_from (IMAGE.create "textures/perlin_noise.bmp");
//
- renderer.texture2d.set_filter (renderer.texture2d.filter_mipmap);
+ renderer.texture.set_filter (renderer.texture.filter_mipmap);
// stencilling is used for reflections
renderer.stencil_buffer.set_clear_value 0.0;
@@ -109,7 +109,7 @@ Section Public
//
noise := NOISE.create;
- water_texture := renderer.texture2d.create_from (IMAGE.create "textures/water.bmp");
+ water_texture := renderer.texture.create_from (IMAGE.create "textures/water.bmp");
water_surface := FAST_ARRAY(REAL_32).create (water_resolution*water_resolution);
// create noisy surface
@@ -126,15 +126,15 @@ Section Public
pos := VECTOR3(REAL_32).create (0,0,0);
dim := VECTOR3(REAL_32).create (1000,500,1000);
- sky := FAST_ARRAY(TEXTURE).create_with_capacity 5;
+ sky := FAST_ARRAY(GL_TEXTURE).create_with_capacity 5;
// clamp sky textures to make invisible edges
// not supported on every GL implementation...
- renderer.texture2d.set_wrapping_mode (renderer.texture2d.clamp_to_edge);
- //renderer.texture2d.set_wrapping_mode (renderer.texture2d.clamp);
+ renderer.texture.set_wrapping_mode (renderer.texture.clamp_to_edge);
+ //renderer.texture.set_wrapping_mode (renderer.texture.clamp);
1.to 5 do { i:INTEGER;
- tex := renderer.texture2d.create_from (IMAGE.create ("textures/sky"+i.to_string+".bmp"));
+ tex := renderer.texture.create_from (IMAGE.create ("textures/sky"+i.to_string+".bmp"));
sky.add_last tex;
};
@@ -171,7 +171,7 @@ Section Public
water_shader.bind_sampler water_texture unit 0 location loc_color_map;
// increase the 'timer' variable in shader
- counter := counter+ 1.0/FRAMEWORK.frame_per_second_max;
+ counter := counter+ 1.0/GL_CANVAS.frame_per_second_max;
water_shader.set_uniform1f loc_time to (counter);
@@ -320,7 +320,7 @@ Section Public
( + sz:INTEGER;
sz := 1000;
- renderer.texture2d.disable;
+ renderer.texture.disable;
renderer.transform.new_matrix {
@@ -342,7 +342,7 @@ Section Public
renderer.vb.add_vertex3f (sz, 0.0, sz);
};
};
- renderer.texture2d.enable;
+ renderer.texture.enable;
);
- release <-
diff --git a/examples/misc/gl_test/.project b/examples/misc/gl_test/.project
deleted file mode 100644
index d66867a..0000000
--- a/examples/misc/gl_test/.project
+++ /dev/null
@@ -1,564 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>gl_test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.lisaac.ldt.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.lisaac.ldt.lisaac</nature>
- </natures>
- <linkedResources>
- <link>
- <name>lib/abstract_evaluator.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/abstract_evaluator.li</location>
- </link>
- <link>
- <name>lib/abstract_keycode.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/low_level/abstract_keycode.li</location>
- </link>
- <link>
- <name>lib/abstract_matrix.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/low_level/abstract_matrix.li</location>
- </link>
- <link>
- <name>lib/abstract_string.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/string/abstract_string.li</location>
- </link>
- <link>
- <name>lib/arb_shader_object.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/extensions/arb_shader_object.li</location>
- </link>
- <link>
- <name>lib/arrayed.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/arrayed.li</location>
- </link>
- <link>
- <name>lib/arrayed_collection.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/arrayed_collection.li</location>
- </link>
- <link>
- <name>lib/blending.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/blending.li</location>
- </link>
- <link>
- <name>lib/block.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/base/block.li</location>
- </link>
- <link>
- <name>lib/bmp.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/bmp.li</location>
- </link>
- <link>
- <name>lib/bmp_header.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/format/bmp/bmp_header.li</location>
- </link>
- <link>
- <name>lib/boolean.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/base/boolean.li</location>
- </link>
- <link>
- <name>lib/bounce_plane.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/bounce_plane.li</location>
- </link>
- <link>
- <name>lib/camera.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/camera.li</location>
- </link>
- <link>
- <name>lib/capabilities.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/capabilities.li</location>
- </link>
- <link>
- <name>lib/character.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/base/character.li</location>
- </link>
- <link>
- <name>lib/collection.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/collection.li</location>
- </link>
- <link>
- <name>lib/color.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/color.li</location>
- </link>
- <link>
- <name>lib/color_buffer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/color_buffer.li</location>
- </link>
- <link>
- <name>lib/cone.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/primitives/cone.li</location>
- </link>
- <link>
- <name>lib/convert.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/kernel/convert.li</location>
- </link>
- <link>
- <name>lib/cylinder.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/primitives/cylinder.li</location>
- </link>
- <link>
- <name>lib/desk.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/desk.li</location>
- </link>
- <link>
- <name>lib/directory.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/file_system/directory.li</location>
- </link>
- <link>
- <name>lib/display_list.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/display_list.li</location>
- </link>
- <link>
- <name>lib/entry.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/file_system/entry.li</location>
- </link>
- <link>
- <name>lib/error.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/error.li</location>
- </link>
- <link>
- <name>lib/evaluator1d.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/evaluator1d.li</location>
- </link>
- <link>
- <name>lib/evaluator2d.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/evaluator2d.li</location>
- </link>
- <link>
- <name>lib/event.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/event/event.li</location>
- </link>
- <link>
- <name>lib/event_keyboard.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/event/event_keyboard.li</location>
- </link>
- <link>
- <name>lib/event_listener.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/event_listener.li</location>
- </link>
- <link>
- <name>lib/fast_array.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/fast_array.li</location>
- </link>
- <link>
- <name>lib/file_system.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib_os/unix/file_system/file_system.li</location>
- </link>
- <link>
- <name>lib/float_real.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/float_real.li</location>
- </link>
- <link>
- <name>lib/fog.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/fog.li</location>
- </link>
- <link>
- <name>lib/font.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/font.li</location>
- </link>
- <link>
- <name>lib/framework.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/framework.li</location>
- </link>
- <link>
- <name>lib/framework_any.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/low_level/framework_any.li</location>
- </link>
- <link>
- <name>lib/framework_event.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/framework_event.li</location>
- </link>
- <link>
- <name>lib/g_button.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/g_button.li</location>
- </link>
- <link>
- <name>lib/g_gldraw.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/gui/g_gldraw.li</location>
- </link>
- <link>
- <name>lib/g_group.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/low_level/g_group.li</location>
- </link>
- <link>
- <name>lib/g_out.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/g_out.li</location>
- </link>
- <link>
- <name>lib/g_raw.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/g_raw.li</location>
- </link>
- <link>
- <name>lib/gl.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl.li</location>
- </link>
- <link>
- <name>lib/gl_abstract_texture.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_abstract_texture.li</location>
- </link>
- <link>
- <name>lib/gl_color_buffer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_color_buffer.li</location>
- </link>
- <link>
- <name>lib/gl_desk.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/gui/gl_desk.li</location>
- </link>
- <link>
- <name>lib/gl_display_list.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_display_list.li</location>
- </link>
- <link>
- <name>lib/gl_error.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_error.li</location>
- </link>
- <link>
- <name>lib/gl_extension.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_extension.li</location>
- </link>
- <link>
- <name>lib/gl_light.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_light.li</location>
- </link>
- <link>
- <name>lib/gl_texture2d.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_texture2d.li</location>
- </link>
- <link>
- <name>lib/gl_transform.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_transform.li</location>
- </link>
- <link>
- <name>lib/gl_vertex_buffer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/gl_vertex_buffer.li</location>
- </link>
- <link>
- <name>lib/i_dont_know_prototyping.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/kernel/i_dont_know_prototyping.li</location>
- </link>
- <link>
- <name>lib/image.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/image.li</location>
- </link>
- <link>
- <name>lib/image_format.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/image_format.li</location>
- </link>
- <link>
- <name>lib/inbox.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/gui/low_level/inbox.li</location>
- </link>
- <link>
- <name>lib/index_buffer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/index_buffer.li</location>
- </link>
- <link>
- <name>lib/integer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/integer.li</location>
- </link>
- <link>
- <name>lib/keycode.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/keycode.li</location>
- </link>
- <link>
- <name>lib/light.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/light.li</location>
- </link>
- <link>
- <name>lib/linked_collection.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/linked_collection.li</location>
- </link>
- <link>
- <name>lib/linked_list.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/linked_list.li</location>
- </link>
- <link>
- <name>lib/log.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/log.li</location>
- </link>
- <link>
- <name>lib/material.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/material.li</location>
- </link>
- <link>
- <name>lib/matrix4.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/matrix4.li</location>
- </link>
- <link>
- <name>lib/md2_model.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/models/md2_model.li</location>
- </link>
- <link>
- <name>lib/model.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/model.li</location>
- </link>
- <link>
- <name>lib/native_array.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/native_array.li</location>
- </link>
- <link>
- <name>lib/numeric.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/numeric.li</location>
- </link>
- <link>
- <name>lib/object.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/kernel/object.li</location>
- </link>
- <link>
- <name>lib/opengl.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/opengl.li</location>
- </link>
- <link>
- <name>lib/opengl_abstract.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/opengl_abstract.li</location>
- </link>
- <link>
- <name>lib/opengl_specific.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/opengl/opengl_specific.li</location>
- </link>
- <link>
- <name>lib/particle.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/particle.li</location>
- </link>
- <link>
- <name>lib/particle_system.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/particle_system.li</location>
- </link>
- <link>
- <name>lib/platform.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/windows/platform.li</location>
- </link>
- <link>
- <name>lib/point_force.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/particles/point_force.li</location>
- </link>
- <link>
- <name>lib/quadrics.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/quadrics.li</location>
- </link>
- <link>
- <name>lib/real.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/real.li</location>
- </link>
- <link>
- <name>lib/real_32.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/real_32.li</location>
- </link>
- <link>
- <name>lib/renderer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/renderer.li</location>
- </link>
- <link>
- <name>lib/reshape.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/reshape.li</location>
- </link>
- <link>
- <name>lib/rgb.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/rgb.li</location>
- </link>
- <link>
- <name>lib/rgba.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/rgba.li</location>
- </link>
- <link>
- <name>lib/scene.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/framework/scene.li</location>
- </link>
- <link>
- <name>lib/shader.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/shader.li</location>
- </link>
- <link>
- <name>lib/sphere.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/primitives/sphere.li</location>
- </link>
- <link>
- <name>lib/state.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/state.li</location>
- </link>
- <link>
- <name>lib/std_file.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/file_system/std_file.li</location>
- </link>
- <link>
- <name>lib/string.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/string/string.li</location>
- </link>
- <link>
- <name>lib/string_constant.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/string/string_constant.li</location>
- </link>
- <link>
- <name>lib/terrain.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/3D/terrain.li</location>
- </link>
- <link>
- <name>lib/texture.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/texture.li</location>
- </link>
- <link>
- <name>lib/tga.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/tga.li</location>
- </link>
- <link>
- <name>lib/tga_header.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/images/tga_header.li</location>
- </link>
- <link>
- <name>lib/transform.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/transform.li</location>
- </link>
- <link>
- <name>lib/traversable.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/collection/low_level/traversable.li</location>
- </link>
- <link>
- <name>lib/uinteger_32.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/uinteger_32.li</location>
- </link>
- <link>
- <name>lib/uinteger_8.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/uinteger_8.li</location>
- </link>
- <link>
- <name>lib/unsigned_integer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/compiler/lib/number/low_level/unsigned_integer.li</location>
- </link>
- <link>
- <name>lib/vector3.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/vector3.li</location>
- </link>
- <link>
- <name>lib/vector4.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/math/vector4.li</location>
- </link>
- <link>
- <name>lib/vertex.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/vertex.li</location>
- </link>
- <link>
- <name>lib/vertex_buffer.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/vertex_buffer.li</location>
- </link>
- <link>
- <name>lib/viewport.li</name>
- <type>1</type>
- <location>/home/dams/GIT/libraries/opengl-binding/abstract_renderer/viewport.li</location>
- </link>
- </linkedResources>
-</projectDescription>
diff --git a/examples/misc/gl_test/data/heightmap.bmp b/examples/misc/gl_test/data/heightmap.bmp
deleted file mode 100644
index 460ef46..0000000
Binary files a/examples/misc/gl_test/data/heightmap.bmp and /dev/null differ
diff --git a/examples/misc/gl_test/data/terrain-texture.bmp b/examples/misc/gl_test/data/terrain-texture.bmp
deleted file mode 100644
index 6318fd7..0000000
Binary files a/examples/misc/gl_test/data/terrain-texture.bmp and /dev/null differ
diff --git a/examples/misc/gl_test/data/texture.bmp b/examples/misc/gl_test/data/texture.bmp
index 8bee5a3..70ffa89 100644
Binary files a/examples/misc/gl_test/data/texture.bmp and b/examples/misc/gl_test/data/texture.bmp differ
diff --git a/examples/misc/gl_test/data/texture.tga b/examples/misc/gl_test/data/texture.tga
index 7cf82a3..21537d3 100644
Binary files a/examples/misc/gl_test/data/texture.tga and b/examples/misc/gl_test/data/texture.tga differ
diff --git a/examples/misc/gl_test/data/toon.frag b/examples/misc/gl_test/data/toon.frag
deleted file mode 100644
index 594ec71..0000000
--- a/examples/misc/gl_test/data/toon.frag
+++ /dev/null
@@ -1,29 +0,0 @@
-
-uniform sampler2D Texture;
-
-varying vec3 lVec;
-varying vec3 norm;
-varying vec2 texCoord;
-
-void main(){
- vec4 tex_color = texture2D(Texture, texCoord);
-
- vec3 lightVec = normalize(lVec);
- float intensity = dot(lightVec, normalize(norm));
-
- //gl_FragColor = texture1D(CelShade, intensity);
-
- float gris;
-
- if (intensity > 0.8)
- gris = 0.2;
- else if (intensity > 0.25)
- gris = 0.4;
- else if (intensity > 0.10)
- gris = 0.9;
- else
- gris = 1.0;
-
- //gl_FragColor = vec4(gris);
- gl_FragColor = clamp(vec4(gris) * tex_color, 0.1, 1.0);
-}
\ No newline at end of file
diff --git a/examples/misc/gl_test/data/toon.vert b/examples/misc/gl_test/data/toon.vert
deleted file mode 100644
index a595cfb..0000000
--- a/examples/misc/gl_test/data/toon.vert
+++ /dev/null
@@ -1,15 +0,0 @@
-uniform vec3 lightPos;
-
-varying vec3 lVec;
-varying vec3 norm;
-varying vec2 texCoord;
-
-void main(){
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
-
- lVec = lightPos; // - gl_Vertex.xyz;
- norm = gl_Normal;
-
- texCoord = gl_MultiTexCoord0.xy;
-}
-
diff --git a/examples/misc/gl_test/framework_test.li b/examples/misc/gl_test/framework_test.li
index 6f376ad..276dd54 100644
--- a/examples/misc/gl_test/framework_test.li
+++ b/examples/misc/gl_test/framework_test.li
@@ -25,16 +25,14 @@ Section Header
Section Inherit
- - parent_framework:FRAMEWORK := FRAMEWORK;
-
- parent_event_listener:EVENT_LISTENER := EVENT_LISTENER;
Section Public
- - main <-
- ( + caps:CAPABILITIES;
+ - main <-
+ ( + caps:GL_CAPABILITIES;
- caps := CAPABILITIES;
+ caps := GL_CAPABILITIES.default;
// caps.use_fullscreen;
// caps.set ...
OPENGL.set_capabilities caps;
@@ -43,13 +41,13 @@ Section Public
OPENGL.make (800,600) title "GL Framework test";
// set up framework
- FRAMEWORK.make OPENGL;
+ GL_CANVAS.make OPENGL;
- attach_scene TEST_SCENE;
- add_key_listener Self;
+ GL_CANVAS.attach_scene TEST_SCENE;
+ GL_CANVAS.add_key_listener Self;
// start it all
- run;
+ GL_CANVAS.run;
);
//
@@ -76,7 +74,7 @@ Section Public
(k = KEYCODE.k_escape).if {
//
- FRAMEWORK.stop;
+ GL_CANVAS.stop;
//
};
);
diff --git a/examples/misc/gl_test/my_event_listener.li b/examples/misc/gl_test/my_event_listener.li
index 580b3f0..c9b2905 100644
--- a/examples/misc/gl_test/my_event_listener.li
+++ b/examples/misc/gl_test/my_event_listener.li
@@ -39,7 +39,7 @@ Section Public
k
.when (KEYCODE.k_escape) then {
- FRAMEWORK.stop;
+ GL_CANVAS.stop;
}.when (KEYCODE.k_f1) then {
//ENGINE.screenshot "screenshot.tga";
};
diff --git a/examples/misc/gl_test/my_object.li b/examples/misc/gl_test/my_object.li
index c40b3a3..036e8db 100644
--- a/examples/misc/gl_test/my_object.li
+++ b/examples/misc/gl_test/my_object.li
@@ -33,28 +33,27 @@ Section Public
+ name:UINTEGER_32;
- + geometry:DISPLAY_LIST;
+ + geometry:GL_DISPLAY_LIST;
+ position:VECTOR3(REAL_32);
+ rotation:VECTOR3(REAL_32);
-
-
- - create list:DISPLAY_LIST name id:UINTEGER_32 at (pos,rot:VECTOR3(REAL_32)) :SELF <-
+
+ - create list:GL_DISPLAY_LIST name id:UINTEGER_32 at (pos,rot:VECTOR3(REAL_32)) :SELF <-
( + result:SELF;
result := SELF.clone;
result.make (id,list,pos,rot);
result
);
- - make (id:UINTEGER_32,list:DISPLAY_LIST,pos,rot:VECTOR3(REAL_32)) <-
+ - make (id:UINTEGER_32,list:GL_DISPLAY_LIST,pos,rot:VECTOR3(REAL_32)) <-
(
name := id;
- geometry := list;
+ geometry := list;
position := pos.copy;
rotation := rot.copy;
);
-
- - draw renderer:RENDERER <-
+
+ - draw renderer:OPENGL <-
(
renderer.transform.new_matrix {
renderer.transform.rotatef (rotation.x, 1,0,0);
diff --git a/examples/misc/gl_test/my_scene1.li b/examples/misc/gl_test/my_scene1.li
index ab022cf..0911a29 100644
--- a/examples/misc/gl_test/my_scene1.li
+++ b/examples/misc/gl_test/my_scene1.li
@@ -34,13 +34,8 @@ Section Inherit
Section Public
- main <-
- ( + caps:CAPABILITIES;
-
- caps := CAPABILITIES;
- // caps.use_fullscreen;
- // caps.set ...
-
- start_test Self using caps;
+ (
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -49,10 +44,10 @@ Section Public
+ green:COLOR := RGB.create (0.0, 1.0, 0.0);
+ blue:COLOR := RGB.create (0.0, 0.0, 1.0);
- + index_buffer:INDEX_BUFFER;
- + vb:VERTEX_BUFFER;
+ + index_buffer:GL_INDEX_BUFFER;
+ + vb:GL_VERTEX_ARRAY;
- + shader:SHADER;
+ + shader:GL_SHADER;
+ loc:INTEGER;
@@ -100,7 +95,7 @@ Section Public
+ time:REAL_32;
- render t:REAL_32 <-
- (
+ (
(shader != NULL).if {
shader.set_uniform1f loc to time;
time := time + 1;
diff --git a/examples/misc/gl_test/my_scene10.li b/examples/misc/gl_test/my_scene10.li
index 6593b59..0227131 100644
--- a/examples/misc/gl_test/my_scene10.li
+++ b/examples/misc/gl_test/my_scene10.li
@@ -29,7 +29,7 @@ Section Inherit
+ parent_scene:Expanded SCENE;
- - parent_reshape:RESHAPE := RESHAPE;
+ - parent_reshape:GL_RESHAPE := GL_RESHAPE;
- parent_test_any:TEST_ANY := TEST_ANY;
@@ -38,7 +38,7 @@ Section Public
- main <-
(
OPENGL.set_reshape Self;
- start_test Self using CAPABILITIES;
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -47,13 +47,13 @@ Section Public
// NURBS test
//
- + curve:EVALUATOR1D;
+ + curve:GL_EVALUATOR1D;
+ resolution:INTEGER := 30;
+ points:FAST_ARRAY(VERTEX);
- + surface:EVALUATOR2D;
+ + surface:GL_EVALUATOR2D;
+ u_res:INTEGER := 8;
+ v_res:INTEGER := 30;
diff --git a/examples/misc/gl_test/my_scene11.li b/examples/misc/gl_test/my_scene11.li
deleted file mode 100644
index 9c26b7f..0000000
--- a/examples/misc/gl_test/my_scene11.li
+++ /dev/null
@@ -1,171 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Application //
-// //
-// LSIIT - ULP - CNRS - INRIA - FRANCE //
-// //
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation, either version 3 of the License, or //
-// (at your option) any later version. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see <http://www.gnu.org/licenses/>. //
-// //
-// http://isaacproject.u-strasbg.fr/ //
-///////////////////////////////////////////////////////////////////////////////
-
-Section Header
-
- + name := MY_SCENE11;
-
- - comment := "first program";
-
-Section Inherit
-
- - parent_framework:FRAMEWORK := FRAMEWORK;
-
- + parent_scene:Expanded SCENE;
-
- - parent_key_listener:EVENT_LISTENER := EVENT_LISTENER;
-
-Section Public
-
- - main <-
- (
- // create OpenGL device
- OPENGL.make (800,600) title "GL demo test";
-
- // set up framework
- FRAMEWORK.make OPENGL;
-
- attach_scene Self;
- add_key_listener Self;
- add_mouse_listener MY_EVENT_LISTENER;
-
- // start it all
- run;
- );
-
-Section Public
-
- //
- // Height Map test
- //
-
- + height_map:IMAGE;
-
- + terrain:TERRAIN;
-
- + light:LIGHT;
- + light_pos:VECTOR3(REAL_32);
- + material:MATERIAL;
-
- + test:TEXTURE;
-
- - initialize:BOOLEAN <-
- (
- + ambient,diffuse,specular,emission:COLOR;
- + shine:REAL_32;
- + tex:TEXTURE;
-
- ambient := RGBA.create (0.04, 0.04, 0.04, 0);
- diffuse := RGBA.create (0.9, 0.9, 0.9, 0);
- specular := RGBA.create (1.0, 1.0, 1.0, 0.0);
-
- light_pos := VECTOR3(REAL_32).create (0, 1, 0);
-
- light := renderer.light.create (ambient,diffuse,specular) at light_pos;
- light.set_directional;
-
- ambient := RGBA.create (0.2, 0.2, 0.2, 1.0);
- emission := RGBA.create (0, 0, 0, 1);
- diffuse := RGBA.create (1, 1, 1, 1);
- specular := RGBA.create (0, 0, 0, 0);
- shine := 128;
-
- material := renderer.material.create (ambient,diffuse,specular,emission,shine);
-
- height_map := IMAGE.create "data/heightmap.bmp";
- tex := renderer.texture2d.create_from (IMAGE.create "data/terrain-texture.bmp");
-
- test := renderer.texture2d.create_from (height_map.to_greyscale);
- terrain := TERRAIN.create height_map texture tex;
-
- terrain.rescale (0,70);
- xpos := (-terrain.width/2).to_real * terrain.w_step;
- zpos := (-terrain.height/2).to_real * terrain.h_step;
-
- light.enable;
- renderer.enable_lighting;
-
- renderer.disable_shading;
-
- renderer.culling.enable;
- renderer.culling.apply_front;
- // renderer.light.set_model_local_viewer TRUE;
-
- camera := CAMERA.create;
-
- camera.position.make (0,100,50);
- camera.view.make (0,-20,-50);
- camera.view.normalize;
- TRUE
- );
- + camera:CAMERA;
-
- + xpos:REAL_32;
- + zpos:REAL_32;
-
- - render t:REAL_32 <-
- (
- renderer.font.print_zone {
- out.print "Height Map test" at (30,40);
- };
-
- camera.look;
-
- // render terrain
- renderer.transform.new_matrix {
- material.apply_front;
- terrain.render (renderer.vb) at (xpos, 0, zpos);
- };
-
- // draw height map
- renderer.light.push_attrib;
- renderer.transform.ortho_mode (renderer.width,renderer.height) do {
- test.draw_strech (650,450,100,100);
- };
- renderer.light.pop_attrib;
- );
-
- - keydown k:INTEGER <-
- (
- + char:CHARACTER;
-
- char := k.to_character.to_upper;
-
- k
- .when (KEYCODE.k_escape) then {
- FRAMEWORK.stop;
- }.when (KEYCODE.k_up) then {
- zpos := zpos + 2;
- }.when (KEYCODE.k_down) then {
- zpos := zpos - 2;
- }.when (KEYCODE.k_left) then {
- xpos := xpos + 2;
- }.when (KEYCODE.k_right) then {
- xpos := xpos - 2;
- };
-
- char
- .when 'L' then {
- toggle_lighting;
- }.when 'W' then {
- toggle_wireframe;
- };
- );
diff --git a/examples/misc/gl_test/my_scene12.li b/examples/misc/gl_test/my_scene12.li
deleted file mode 100644
index 1b241c3..0000000
--- a/examples/misc/gl_test/my_scene12.li
+++ /dev/null
@@ -1,156 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Application //
-// //
-// LSIIT - ULP - CNRS - INRIA - FRANCE //
-// //
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation, either version 3 of the License, or //
-// (at your option) any later version. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see <http://www.gnu.org/licenses/>. //
-// //
-// http://isaacproject.u-strasbg.fr/ //
-///////////////////////////////////////////////////////////////////////////////
-
-Section Header
-
- + name := MY_SCENE12;
-
- - comment := "first program";
-
-Section Inherit
-
- + parent_scene:Expanded SCENE;
-
- - parent_test_any:TEST_ANY := TEST_ANY;
-
-Section Public
-
- - main <-
- (
- start_test Self using CAPABILITIES;
- );
-
-Section Public
-
- //
- // test shaders
- //
-
- + model:MODEL;
- + texture:TEXTURE;
-
- + light:LIGHT;
- + light_pos:VECTOR3(REAL_32) := VECTOR3(REAL_32).create (5,10,-180);
-
- + camera:CAMERA;
-
- + shader:SHADER;
- + lightpos_loc:INTEGER;
- + sampler_loc:INTEGER;
-
-
- - initialize:BOOLEAN <-
- (
- + ambient,diffuse,specular:COLOR;
- + infolog:STRING;
-
- camera := CAMERA.create;
-
- camera.position.make (0,10,-200);
- camera.view.make (0,-10,200);
- camera.view.normalize;
-
- // load model
- texture := renderer.texture2d.create_from (IMAGE.create "data/skin.tga");
- model := MD2_MODEL.create "data/model.md2" with texture;
-
- OPENGL.use_shaders.if_false {
- log.append "Cannot support GLSL Shaders with ARB extensions";
- } else {
- shader := renderer.shader.create ("data/toon.vert","data/toon.frag");
- shader.enable;
-
- shader.has_compiled.if_false {
- // print error log
- infolog := STRING.create 32;
- shader.get_infolog infolog;
- infolog.print;
- };
-
- lightpos_loc := shader.get_uniform_location "lightPos";
- sampler_loc := shader.get_uniform_location "Texture";
- };
-
- ambient := RGB.create (0.9, 0.9, 0.9);
- diffuse := RGB.create (1.0, 1.0, 1.0);
- specular := RGB.create (1.0, 1.0, 1.0);
-
- // create a light
- light := renderer.light.create (ambient,diffuse,specular) at light_pos;
- light.enable;
-
- renderer.enable_lighting;
- renderer.set_line_width 3;
- renderer.color_buffer.set_clear_value (0.5,0.5,0.5,0.5);
-
- renderer.culling.enable;
- renderer.culling.apply_front;
- TRUE
- );
-
- - render t:REAL_32 <-
- (
- model.update (t*10);
-
- renderer.font.enable;
- out.print "Toon shading" at (50,100);
- renderer.font.disable;
-
- camera.look;
-
- (shader != NULL).if {
- shader.enable;
- shader.set_uniform3f lightpos_loc to (light_pos.x,light_pos.y,light_pos.z);
- shader.bind_sampler texture unit 0 location sampler_loc;
- };
-
- // quake2 z axis is opengl y axis
- renderer.transform.rotatef(-90, 1,0,0);
- renderer.transform.rotatef(90, 0,0,1);
-
- light.enable;
-
- //-- render model normally
-
- renderer.culling.set_counter_clockwise;
- model.render;
-
- //-- disable shading and change culling order
- (shader != NULL).if {
- shader.disable;
- };
- renderer.culling.set_clockwise;
-
- // black
- renderer.color_buffer.set_color4f (0,0,0,0);
-
- // render outlines
- renderer.wireframe_mode TRUE;
- model.render;
- renderer.wireframe_mode FALSE;
- );
-
- - release <-
- (
- (shader != NULL).if {
- shader.delete;
- };
- );
diff --git a/examples/misc/gl_test/my_scene2.li b/examples/misc/gl_test/my_scene2.li
index 5cf746c..d660713 100644
--- a/examples/misc/gl_test/my_scene2.li
+++ b/examples/misc/gl_test/my_scene2.li
@@ -35,7 +35,7 @@ Section Public
- main <-
(
- start_test Self using CAPABILITIES;
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -48,7 +48,7 @@ Section Public
+ sphere:SPHERE := SPHERE.create (VECTOR3(REAL_32).create (0,0,0),2,10,10);
- + vb:VERTEX_BUFFER;
+ + vb:GL_VERTEX_BUFFER;
+ green:COLOR := RGB.create (0.0, 1.0, 0.0);
diff --git a/examples/misc/gl_test/my_scene3.li b/examples/misc/gl_test/my_scene3.li
index b699b8e..c5f7e0e 100644
--- a/examples/misc/gl_test/my_scene3.li
+++ b/examples/misc/gl_test/my_scene3.li
@@ -35,7 +35,7 @@ Section Public
- main <-
(
- start_test Self using CAPABILITIES;
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -44,13 +44,13 @@ Section Public
// test texturing & blending
//
- + tex1:TEXTURE;
- + tex2:TEXTURE;
+ + tex1:GL_TEXTURE;
+ + tex2:GL_TEXTURE;
- + vertex_array:VERTEX_BUFFER;
- + texel_array:VERTEX_BUFFER;
+ + vertex_array:GL_VERTEX_ARRAY;
+ + texel_array:GL_VERTEX_ARRAY;
- + bl:BLENDING;
+ + bl:GL_BLENDING;
+ alpha:REAL_32;
@@ -58,8 +58,8 @@ Section Public
(
+ x,y:REAL_32;
- tex1 := renderer.texture2d.create_from (IMAGE.create "data/texture.tga");
- tex2 := renderer.texture2d.create_from (IMAGE.create "data/flare.bmp");
+ tex1 := renderer.texture.create_from (IMAGE.create "data/texture.tga");
+ tex2 := renderer.texture.create_from (IMAGE.create "data/flare.bmp");
bl := renderer.blending;
@@ -83,7 +83,7 @@ Section Public
vertex_array.add_vertex2f (x, y+256);
vertex_array.add_vertex2f (x+256, y+256);
};
- texel_array := vertex_array.create_subarray;
+ texel_array := renderer.vertex_array.create 6;
texel_array.new_triangles {
texel_array.add_texel2f (0, 0);
texel_array.add_texel2f (1, 0);
@@ -128,8 +128,8 @@ Section Public
vertex_array.draw;
// disable multitexturing
- renderer.texture2d.disable_unit 1;
- renderer.texture2d.disable_unit 0;
+ renderer.texture.disable_unit 1;
+ renderer.texture.disable_unit 0;
//
// Blending test
diff --git a/examples/misc/gl_test/my_scene4.li b/examples/misc/gl_test/my_scene4.li
index 9e7752b..72354ee 100644
--- a/examples/misc/gl_test/my_scene4.li
+++ b/examples/misc/gl_test/my_scene4.li
@@ -27,8 +27,6 @@ Section Header
Section Inherit
- - parent_framework:FRAMEWORK := FRAMEWORK;
-
+ parent_scene:Expanded SCENE;
- parent_event_listener:EVENT_LISTENER := EVENT_LISTENER;
@@ -41,13 +39,13 @@ Section Public
OPENGL.make (800,600) title "GL demo test";
// set up framework
- FRAMEWORK.make OPENGL;
+ GL_CANVAS.make OPENGL;
- attach_scene Self;
- add_key_listener Self;
+ GL_CANVAS.attach_scene Self;
+ GL_CANVAS.add_key_listener Self;
// start it all
- run;
+ GL_CANVAS.run;
);
Section Public
@@ -66,7 +64,7 @@ Section Public
+ constraint:CONSTRAINT;
- + tex:TEXTURE;
+ + tex:GL_TEXTURE;
+ color_scheme:INTEGER;
@@ -93,8 +91,8 @@ Section Public
// load particle texture
- TEXTURE.set_wrapping_mode (TEXTURE.clamp);
- tex := renderer.texture2d.create_from (IMAGE.create "data/flare.bmp");
+ GL_TEXTURE.set_wrapping_mode (GL_TEXTURE.clamp);
+ tex := renderer.texture.create_from (IMAGE.create "data/flare.bmp");
modelview := MATRIX4(REAL_32).create;
TRUE
@@ -142,7 +140,7 @@ Section Public
- keydown k:INTEGER <-
(
(k = KEYCODE.k_escape).if {
- FRAMEWORK.stop;
+ GL_CANVAS.stop;
};
color_scheme := (color_scheme+1) % 4;
diff --git a/examples/misc/gl_test/my_scene5.li b/examples/misc/gl_test/my_scene5.li
index 7c2a207..fe3e315 100644
--- a/examples/misc/gl_test/my_scene5.li
+++ b/examples/misc/gl_test/my_scene5.li
@@ -35,7 +35,7 @@ Section Public
- main <-
(
- start_test Self using CAPABILITIES;
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -47,9 +47,9 @@ Section Public
+ sphere1:SPHERE;
+ sphere2:SPHERE;
- + light:LIGHT;
- + m1:MATERIAL;
- + m2:MATERIAL;
+ + light:GL_LIGHT;
+ + m1:GL_MATERIAL;
+ + m2:GL_MATERIAL;
+ light_position:VECTOR3(REAL_32);
@@ -104,11 +104,11 @@ Section Public
light.enable;
//--
renderer.transform.pop_matrix;
-
- m1.apply (MATERIAL.mode_front);
+
+ m1.apply (GL_MATERIAL.mode_front);
sphere1.render;
- m2.apply (MATERIAL.mode_front);
+ m2.apply (GL_MATERIAL.mode_front);
sphere2.render;
);
diff --git a/examples/misc/gl_test/my_scene6.li b/examples/misc/gl_test/my_scene6.li
index e0be02a..969f47b 100644
--- a/examples/misc/gl_test/my_scene6.li
+++ b/examples/misc/gl_test/my_scene6.li
@@ -35,21 +35,21 @@ Section Public
- main <-
(
- CAPABILITIES.use_accum_buffer;
+ GL_CAPABILITIES.use_accum_buffer;
- start_test Self using CAPABILITIES;
+ start_test Self using GL_CAPABILITIES;
);
-
+
Section Public
//
// test display list & accumulation buffer
//
- + list:DISPLAY_LIST;
+ + list:GL_DISPLAY_LIST;
- + light:LIGHT;
- + m:MATERIAL;
+ + light:GL_LIGHT;
+ + m:GL_MATERIAL;
- initialize:BOOLEAN <-
(
@@ -57,17 +57,17 @@ Section Public
+ shine:REAL_32;
+ sphere:SPHERE;
- + sublist:DISPLAY_LIST;
+ + sublist:GL_DISPLAY_LIST;
// hierarchical display lists
- sublist := GL_DISPLAY_LIST.create {
+ sublist := renderer.display_list.create {
renderer.color_buffer.set_color3f (0.0, 1.0, 0.0);
sphere := SPHERE.create (VECTOR3(REAL_32).create (-0.5,0,-1),0.06,10,10);
sphere.render;
};
// create display list
- list := GL_DISPLAY_LIST.create {
+ list := renderer.display_list.create {
renderer.transform.new_matrix {
renderer.transform.translatef(-0.1,0.1,0.0);
diff --git a/examples/misc/gl_test/my_scene7.li b/examples/misc/gl_test/my_scene7.li
index f6d09d5..2d55cf4 100644
--- a/examples/misc/gl_test/my_scene7.li
+++ b/examples/misc/gl_test/my_scene7.li
@@ -35,7 +35,7 @@ Section Public
- main <-
(
- start_test Self using CAPABILITIES;
+ start_test Self using (GL_CAPABILITIES.default);
);
Section Public
@@ -46,18 +46,16 @@ Section Public
+ camera:CAMERA;
- + cube:VERTEX_BUFFER := GL_VERTEX_BUFFER;
- + tex:TEXTURE;
+ + cube:GL_VERTEX_BUFFER := GL_VERTEX_BUFFER;
+ + tex:GL_TEXTURE;
- + light:LIGHT;
- + material:MATERIAL;
+ + light:GL_LIGHT;
+ + material:GL_MATERIAL;
+ xrot:REAL_32;
+ yrot:REAL_32;
+ zrot:REAL_32;
- + fog:FOG;
-
- initialize:BOOLEAN <-
(
@@ -76,13 +74,11 @@ Section Public
emission := RGB.create (0.1, 0, 0);
material := renderer.material.create (ambient,diffuse,specular,emission,100);
- tex := renderer.texture2d.create_from (IMAGE.create "data/texture.bmp");
+ tex := renderer.texture.create_from (IMAGE.create "data/texture.bmp");
renderer.color_buffer.set_clear_value (0.5, 0.5, 0.5, 1.0); // fog color
- fog := renderer.fog.create (RGB.create (0.5, 0.5, 0.5), 1.0, 1.0, 5.0);
- renderer.set_fog fog;
- fog.enable;
+ renderer.fog.apply (RGB.create (0.5, 0.5, 0.5), 1.0, 1.0, 5.0);
renderer.blending.apply (renderer.blending.src_color,renderer.blending.one_minus_src_color);
diff --git a/examples/misc/gl_test/my_scene8.li b/examples/misc/gl_test/my_scene8.li
index d5c33f6..8d0da5f 100644
--- a/examples/misc/gl_test/my_scene8.li
+++ b/examples/misc/gl_test/my_scene8.li
@@ -35,9 +35,9 @@ Section Public
- main <-
(
- CAPABILITIES.use_stencil_buffer;
+ GL_CAPABILITIES.use_stencil_buffer;
- start_test Self using CAPABILITIES;
+ start_test Self using GL_CAPABILITIES;
);
Section Public
@@ -47,13 +47,13 @@ Section Public
//
+ model:MODEL;
- + texture:TEXTURE;
- + material:MATERIAL;
+ + texture:GL_TEXTURE;
+ + material:GL_MATERIAL;
- + floor:TEXTURE;
+ + floor:GL_TEXTURE;
- + floor_plane:PLANE;
- + light:LIGHT;
+ + floor_plane:GL_PLANE;
+ + light:GL_LIGHT;
+ camera:CAMERA;
@@ -68,8 +68,8 @@ Section Public
camera.view.normalize;
// load textures
- texture := renderer.texture2d.create_from (IMAGE.create "data/skin.tga");
- floor := renderer.texture2d.create_from (IMAGE.create "data/floor.tga");
+ texture := renderer.texture.create_from (IMAGE.create "data/skin.tga");
+ floor := renderer.texture.create_from (IMAGE.create "data/floor.tga");
// load model
model := MD2_MODEL.create "data/model.md2" with texture;
@@ -89,7 +89,8 @@ Section Public
material := renderer.material.create (ambient,diffuse,specular,RGB.create(0,0,0),50);
model.set_material material;
- floor_plane := renderer.plane.create_plane (0,0,-1,0);
+ floor_plane := renderer.plane.create (0,0,-1,0);
+ floor_plane.load_clipping_plane;
// clear stencil to false
renderer.stencil_buffer.set_clear_value 0.0;
@@ -176,8 +177,6 @@ Section Public
renderer.blending.disable;
model.render;
-
- renderer.vb.draw;
);
- draw_floor <-
diff --git a/examples/misc/gl_test/my_scene9.li b/examples/misc/gl_test/my_scene9.li
index ea97a6b..1385311 100644
--- a/examples/misc/gl_test/my_scene9.li
+++ b/examples/misc/gl_test/my_scene9.li
@@ -27,8 +27,8 @@ Section Header
Section Inherit
- - parent_framework:FRAMEWORK := FRAMEWORK;
-
+ - parent_canvas:GL_CANVAS := GL_CANVAS;
+
+ parent_scene:Expanded SCENE;
- parent_mouse_listener:EVENT_LISTENER := EVENT_LISTENER;
@@ -41,7 +41,7 @@ Section Public
OPENGL.make (800,600) title "GL Demo test";
// set up framework
- FRAMEWORK.make OPENGL;
+ make OPENGL;
attach_scene Self;
add_key_listener MY_EVENT_LISTENER;
@@ -67,7 +67,7 @@ Section Public
+ cylinder:CYLINDER;
+ cone:CONE;
+ pos,rot:VECTOR3(REAL_32);
- + list:DISPLAY_LIST;
+ + list:GL_DISPLAY_LIST;
camera := CAMERA.create;
diff --git a/examples/misc/gl_test/test_any.li b/examples/misc/gl_test/test_any.li
index 6f1a392..0ef6ee2 100644
--- a/examples/misc/gl_test/test_any.li
+++ b/examples/misc/gl_test/test_any.li
@@ -23,15 +23,13 @@ Section Header
+ name := TEST_ANY;
- - author := "Damien Bouvarel(dams.bouvarel at wanadoo.fr)";
-
Section Inherit
- - parent_framework:FRAMEWORK := FRAMEWORK;
+ - parent_canvas:GL_CANVAS := GL_CANVAS;
Section Public
- - start_test scene:SCENE using c:CAPABILITIES <-
+ - start_test scene:SCENE using c:GL_CAPABILITIES <-
(
OPENGL.set_capabilities c;
@@ -39,7 +37,7 @@ Section Public
OPENGL.make (800,600) title "GL demo test";
// set up framework
- FRAMEWORK.make OPENGL;
+ GL_CANVAS.make OPENGL;
attach_scene scene;
add_key_listener MY_EVENT_LISTENER;
--
applications.git
More information about the Lisaac-commits
mailing list