all: Fix simple warnings and cosmetics.
This commit is contained in:
@@ -6,7 +6,6 @@ with
|
||||
openGL.Model.Box.textured,
|
||||
openGL.Model.Box.lit_colored_textured,
|
||||
|
||||
openGL.texture_Set,
|
||||
openGL.Palette,
|
||||
openGL.Demo;
|
||||
|
||||
|
||||
@@ -3,12 +3,9 @@ with
|
||||
openGL.Buffer.general,
|
||||
openGL.Program,
|
||||
openGL.Attribute,
|
||||
openGL.Texture,
|
||||
openGL.Palette,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.Binding,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
@@ -29,7 +26,6 @@ is
|
||||
vertex_Shader : aliased Shader.item;
|
||||
fragment_Shader : aliased Shader.item;
|
||||
the_Program : openGL.Program.view;
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
Name_1 : constant String := "Site";
|
||||
Name_2 : constant String := "Color";
|
||||
@@ -64,8 +60,7 @@ is
|
||||
if the_Program = null
|
||||
then -- Define the shaders and program.
|
||||
declare
|
||||
use Palette,
|
||||
Attribute.Forge;
|
||||
use Attribute.Forge;
|
||||
|
||||
Sample : Vertex;
|
||||
|
||||
@@ -73,10 +68,7 @@ is
|
||||
Attribute_2 : Attribute.view;
|
||||
Attribute_3 : Attribute.view;
|
||||
|
||||
white_Image : constant Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
begin
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
|
||||
vertex_Shader .define (Shader.Vertex, "assets/opengl/shader/colored_textured.vert");
|
||||
fragment_Shader.define (Shader.Fragment, (asset_Names' (1 => to_Asset ("assets/opengl/shader/version.header"),
|
||||
2 => to_Asset ("assets/opengl/shader/texturing-frag.snippet"),
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
with
|
||||
openGL.texture_Set;
|
||||
|
||||
|
||||
private
|
||||
with
|
||||
openGL.Geometry.texturing;
|
||||
@@ -54,13 +50,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with
|
||||
-- record
|
||||
-- null;
|
||||
-- end record;
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.colored_textured;
|
||||
|
||||
@@ -81,8 +81,8 @@ is
|
||||
vertex_Count : constant Index_t := Index_t (sides_Count * 2 + 2); -- 2 triangles per side plus 2 since we cannot share the first and last edge.
|
||||
indices_Count : constant long_Index_t := long_Index_t (sides_Count * 2 * 3); -- 2 triangles per side with 3 vertices per triangle.
|
||||
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := (1 .. vertex_Count => <>);
|
||||
the_Indices : aliased Indices := (1 .. indices_Count => <>);
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := [1 .. vertex_Count => <>];
|
||||
the_Indices : aliased Indices := [1 .. indices_Count => <>];
|
||||
|
||||
begin
|
||||
ny := 1.0;
|
||||
@@ -190,14 +190,14 @@ is
|
||||
indices_Count : constant long_Index_t := long_Index_t ( (hoop_count - 1) * sides_Count * 2 * 3 -- For each hoop, 2 triangles per side with 3 vertices per triangle
|
||||
+ sides_Count * 3); -- plus the extra indices for the pole triangles.
|
||||
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := (1 .. vertex_Count => <>);
|
||||
the_Indices : aliased Indices := (1 .. indices_Count => <>);
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := [1 .. vertex_Count => <>];
|
||||
the_Indices : aliased Indices := [1 .. indices_Count => <>];
|
||||
|
||||
the_arch_Edges : arch_Edges;
|
||||
i : Index_t := 1;
|
||||
|
||||
pole_Site : constant Site := (if is_Fore then (0.0, 0.0, L + Radius)
|
||||
else (0.0, 0.0, -L - Radius));
|
||||
pole_Site : constant Site := (if is_Fore then [0.0, 0.0, L + Radius]
|
||||
else [0.0, 0.0, -L - Radius]);
|
||||
|
||||
Degrees_90 : constant := Pi / 2.0;
|
||||
Degrees_360 : constant := Pi * 2.0;
|
||||
@@ -375,9 +375,9 @@ is
|
||||
cap_1_Geometry .Model_is (Self.all'unchecked_Access);
|
||||
cap_2_Geometry .Model_is (Self.all'unchecked_Access);
|
||||
|
||||
return (1 => the_shaft_Geometry.all'Access,
|
||||
return [1 => the_shaft_Geometry.all'Access,
|
||||
2 => cap_1_Geometry.all'Access,
|
||||
3 => cap_2_Geometry.all'Access);
|
||||
3 => cap_2_Geometry.all'Access];
|
||||
end to_GL_Geometries;
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ with
|
||||
openGL.IO,
|
||||
openGL.texture_Set,
|
||||
|
||||
ada.unchecked_Deallocation,
|
||||
ada.unchecked_Conversion;
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
package body openGL.Terrain
|
||||
|
||||
Reference in New Issue
Block a user