opengl: Fix simple warnings and cosmetics.
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
with
|
||||
openGL.Program.lit,
|
||||
openGL.Palette,
|
||||
openGL.Shader,
|
||||
openGL.Buffer.general,
|
||||
openGL.Attribute,
|
||||
openGL.Texture,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.Binding,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
@@ -18,8 +15,7 @@ with
|
||||
|
||||
package body openGL.Geometry.lit_colored_textured
|
||||
is
|
||||
use openGL.texture_Set,
|
||||
GL.lean,
|
||||
use GL.lean,
|
||||
GL.Pointers,
|
||||
Interfaces,
|
||||
System;
|
||||
@@ -64,7 +60,6 @@ is
|
||||
Attribute_4_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_4_Name'Access);
|
||||
Attribute_5_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_5_Name'Access);
|
||||
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
|
||||
---------
|
||||
@@ -81,8 +76,7 @@ is
|
||||
procedure define (the_Program : access Program;
|
||||
use_fragment_Shader : in String)
|
||||
is
|
||||
use openGL.Palette,
|
||||
Attribute.Forge,
|
||||
use Attribute.Forge,
|
||||
system.Storage_Elements;
|
||||
|
||||
Sample : Vertex;
|
||||
@@ -93,10 +87,7 @@ is
|
||||
Attribute_4 : openGL.Attribute.view;
|
||||
Attribute_5 : openGL.Attribute.view;
|
||||
|
||||
white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
|
||||
begin
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
the_Program.Program := new openGL.Program.lit.item;
|
||||
|
||||
the_Program.vertex_Shader.define (Shader.Vertex, "assets/opengl/shader/lit_colored_textured.vert");
|
||||
@@ -288,6 +279,7 @@ is
|
||||
end Vertices_are;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
procedure Indices_are (Self : in out Item; Now : in Indices;
|
||||
for_Facia : in Positive)
|
||||
@@ -297,93 +289,4 @@ is
|
||||
end Indices_are;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Texturing
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in texture_Set.fade_Level)
|
||||
-- is
|
||||
-- begin
|
||||
-- Self.Textures.Textures (Which).Fade := Now;
|
||||
-- end Fade_is;
|
||||
--
|
||||
--
|
||||
-- function Fade (Self : in Item; Which : texture_Set.texture_ID) return texture_Set.fade_Level
|
||||
-- is
|
||||
-- begin
|
||||
-- return Self.Textures.Textures (Which).Fade;
|
||||
-- end Fade;
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Which : texture_ID; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.Textures,
|
||||
-- Which => Which,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- function Texture (Self : in Item; Which : texture_ID) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.Textures,
|
||||
-- which => Which);
|
||||
-- end Texture;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.Textures,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.Textures,
|
||||
-- which => 1);
|
||||
-- end Texture;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item)
|
||||
-- is
|
||||
-- begin
|
||||
-- enable (Self.Textures, Self.Program);
|
||||
-- end enable_Textures;
|
||||
--
|
||||
|
||||
|
||||
-- overriding
|
||||
-- procedure enable_Texture (Self : in out Item)
|
||||
-- is
|
||||
-- use GL,
|
||||
-- GL.Binding,
|
||||
-- openGL.Texture;
|
||||
-- begin
|
||||
-- Tasks.check;
|
||||
--
|
||||
-- glActiveTexture (gl.GL_TEXTURE0);
|
||||
-- Errors.log;
|
||||
--
|
||||
-- if Self.Texture = openGL.Texture.null_Object
|
||||
-- then enable (white_Texture);
|
||||
-- else enable (Self.Texture);
|
||||
-- end if;
|
||||
-- end enable_Texture;
|
||||
|
||||
|
||||
end openGL.Geometry.lit_colored_textured;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
with
|
||||
openGL.texture_Set;
|
||||
|
||||
-- private
|
||||
with
|
||||
openGL.Geometry.texturing;
|
||||
|
||||
@@ -47,25 +43,6 @@ is
|
||||
procedure Indices_are (Self : in out Item; Now : in Indices;
|
||||
for_Facia : in Positive);
|
||||
|
||||
--- Texturing.
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Now : in texture_Set.fade_Level;
|
||||
-- Which : in texture_Set.texture_ID := 1);
|
||||
-- function Fade (Self : in Item; Which : in texture_Set.texture_ID := 1) return texture_Set.fade_Level;
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object;
|
||||
-- Which : in texture_Set.texture_ID);
|
||||
-- function Texture (Self : in Item; Which : in texture_Set.texture_ID := 1) return openGL.Texture.Object;
|
||||
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object);
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object;
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
@@ -75,13 +52,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with
|
||||
-- record
|
||||
-- Textures : texture_Set.Item;
|
||||
-- end record;
|
||||
|
||||
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.lit_colored_textured;
|
||||
|
||||
@@ -2,12 +2,9 @@ with
|
||||
openGL.Shader,
|
||||
openGL.Attribute,
|
||||
openGL.Buffer.general,
|
||||
openGL.Texture,
|
||||
openGL.Palette,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.Binding,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
@@ -51,7 +48,6 @@ is
|
||||
Attribute_6_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_6_Name'Access);
|
||||
Attribute_7_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_7_Name'Access);
|
||||
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
|
||||
----------
|
||||
@@ -93,8 +89,7 @@ is
|
||||
|
||||
procedure define_Program
|
||||
is
|
||||
use Palette,
|
||||
Attribute.Forge,
|
||||
use Attribute.Forge,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
System.storage_Elements;
|
||||
@@ -109,8 +104,6 @@ is
|
||||
Attribute_6 : openGL.Attribute.view;
|
||||
Attribute_7 : openGL.Attribute.view;
|
||||
|
||||
white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
|
||||
begin
|
||||
Tasks.check;
|
||||
|
||||
@@ -123,8 +116,6 @@ is
|
||||
|
||||
-- Define the shaders and program.
|
||||
--
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
|
||||
vertex_Shader .define (Shader.Vertex, "assets/opengl/shader/lit_colored_textured_skinned.vert");
|
||||
fragment_Shader.define (Shader.Fragment, (asset_Names' (1 => to_Asset ("assets/opengl/shader/version.header"),
|
||||
2 => to_Asset ("assets/opengl/shader/lighting-frag.snippet"),
|
||||
@@ -242,6 +233,7 @@ is
|
||||
end define_Program;
|
||||
|
||||
|
||||
|
||||
--------------
|
||||
-- Attributes
|
||||
--
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
with
|
||||
openGL.Program.lit.colored_textured_skinned,
|
||||
openGL.texture_Set;
|
||||
openGL.Program.lit.colored_textured_skinned;
|
||||
|
||||
|
||||
private
|
||||
@@ -8,7 +7,6 @@ with
|
||||
openGL.Geometry.texturing;
|
||||
|
||||
|
||||
|
||||
package openGL.Geometry.lit_colored_textured_skinned
|
||||
--
|
||||
-- Supports 'per-vertex' site, color, texture, lighting and skinning.
|
||||
@@ -67,9 +65,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with null record;
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.lit_colored_textured_skinned;
|
||||
|
||||
@@ -1,30 +1,22 @@
|
||||
with
|
||||
openGL.Geometry.texturing,
|
||||
openGL.Buffer.general,
|
||||
openGL.Model,
|
||||
openGL.Shader,
|
||||
openGL.Program.lit,
|
||||
openGL.Attribute,
|
||||
openGL.Texture,
|
||||
openGL.Palette,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
ada.Strings.fixed,
|
||||
Interfaces.C.Strings,
|
||||
System.storage_Elements;
|
||||
|
||||
-- with ada.Text_IO; use ada.Text_IO;
|
||||
|
||||
|
||||
package body openGL.Geometry.lit_textured
|
||||
is
|
||||
use GL.lean,
|
||||
GL.Pointers,
|
||||
openGL.texture_Set,
|
||||
Interfaces;
|
||||
|
||||
-----------
|
||||
@@ -34,8 +26,7 @@ is
|
||||
vertex_Shader : aliased Shader.item;
|
||||
fragment_Shader : aliased Shader.item;
|
||||
|
||||
the_Program : openGL.Program.lit.view;
|
||||
white_Texture : openGL.Texture.Object;
|
||||
the_Program : openGL.Program.lit.view;
|
||||
|
||||
Name_1 : constant String := "Site";
|
||||
Name_2 : constant String := "Normal";
|
||||
@@ -52,8 +43,6 @@ is
|
||||
Attribute_3_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_3_Name'Access);
|
||||
Attribute_4_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_4_Name'Access);
|
||||
|
||||
-- texture_Uniforms : texturing.Uniforms;
|
||||
|
||||
|
||||
|
||||
---------
|
||||
@@ -62,8 +51,7 @@ is
|
||||
|
||||
procedure create_Program
|
||||
is
|
||||
use Palette,
|
||||
Attribute.Forge,
|
||||
use Attribute.Forge,
|
||||
System.storage_Elements;
|
||||
|
||||
use type system.Address;
|
||||
@@ -75,11 +63,7 @@ is
|
||||
Attribute_3 : Attribute.view;
|
||||
Attribute_4 : 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/lit_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"),
|
||||
@@ -150,27 +134,6 @@ is
|
||||
name => +Attribute_4_Name_ptr);
|
||||
Errors.log;
|
||||
|
||||
|
||||
--- Set up the texturing uniforms.
|
||||
--
|
||||
|
||||
-- for Id in texture_Id'Range
|
||||
-- loop
|
||||
-- declare
|
||||
-- use ada.Strings,
|
||||
-- ada.Strings.fixed;
|
||||
--
|
||||
-- i : constant Positive := Positive (Id);
|
||||
-- texture_uniform_Name : constant String := "Textures[" & trim (Natural'Image (i - 1), Left) & "]";
|
||||
-- fade_uniform_Name : constant String := "Fade[" & trim (Natural'Image (i - 1), Left) & "]";
|
||||
-- begin
|
||||
-- texture_Uniforms.Textures (Id).texture_Uniform := the_Program.uniform_Variable (named => texture_uniform_Name);
|
||||
-- texture_Uniforms.Textures (Id). fade_Uniform := the_Program.uniform_Variable (named => fade_uniform_Name);
|
||||
-- end;
|
||||
-- end loop;
|
||||
--
|
||||
-- texture_Uniforms.Count := the_Program.uniform_Variable ("texture_Count");
|
||||
|
||||
textured_Geometry.create_Uniforms (for_Program => the_Program.all'Access);
|
||||
end create_Program;
|
||||
|
||||
@@ -291,75 +254,4 @@ is
|
||||
end Indices_are;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Texturing
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Which : texture_ID; Now : in texture_Set.fade_Level)
|
||||
-- is
|
||||
-- begin
|
||||
-- Self.texture_Set.Textures (which).Fade := Now;
|
||||
-- end Fade_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- function Fade (Self : in Item; Which : texture_Set.texture_ID) return texture_Set.fade_Level
|
||||
-- is
|
||||
-- begin
|
||||
-- return Self.texture_Set.Textures (which).Fade;
|
||||
-- end Fade;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Which : texture_ID; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.texture_Set,
|
||||
-- Which => Which,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- function Texture (Self : in Item; Which : texture_ID) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.texture_Set,
|
||||
-- Which => Which);
|
||||
-- end Texture;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.texture_Set,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return texture_Set.Texture (in_Set => Self.texture_Set,
|
||||
-- Which => 1);
|
||||
-- end Texture;
|
||||
|
||||
|
||||
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item)
|
||||
-- is
|
||||
-- begin
|
||||
-- texturing.enable (for_Model => Self.Model.all'Access,
|
||||
-- Uniforms => texture_Uniforms,
|
||||
-- texture_Set => Self.texture_Set);
|
||||
-- end enable_Textures;
|
||||
|
||||
|
||||
end openGL.Geometry.lit_textured;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
with
|
||||
openGL.texture_Set;
|
||||
|
||||
private
|
||||
with
|
||||
openGL.Geometry.texturing;
|
||||
@@ -46,24 +43,6 @@ is
|
||||
for_Facia : in Positive);
|
||||
|
||||
|
||||
--- Texturing.
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in texture_Set.fade_Level);
|
||||
-- function Fade (Self : in Item; Which : texture_Set.texture_ID) return texture_Set.fade_Level;
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in openGL.Texture.Object);
|
||||
-- function Texture (Self : in Item; Which : texture_Set.texture_ID) return openGL.Texture.Object;
|
||||
--
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object);
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object;
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
package textured_Geometry is new texturing.Mixin;
|
||||
@@ -75,7 +54,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.lit_textured;
|
||||
|
||||
@@ -2,12 +2,9 @@ with
|
||||
openGL.Shader,
|
||||
openGL.Attribute,
|
||||
openGL.Buffer.general,
|
||||
openGL.Texture,
|
||||
openGL.Palette,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.Binding,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
@@ -49,7 +46,6 @@ is
|
||||
Attribute_5_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_5_Name'Access);
|
||||
Attribute_6_Name_ptr : aliased constant C.strings.chars_ptr := C.strings.to_chars_ptr (Attribute_6_Name'Access);
|
||||
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
|
||||
----------
|
||||
@@ -83,8 +79,7 @@ is
|
||||
|
||||
procedure define_Program
|
||||
is
|
||||
use Palette,
|
||||
Attribute.Forge,
|
||||
use Attribute.Forge,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
System.storage_Elements;
|
||||
@@ -98,8 +93,6 @@ is
|
||||
Attribute_5 : openGL.Attribute.view;
|
||||
Attribute_6 : openGL.Attribute.view;
|
||||
|
||||
white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
|
||||
begin
|
||||
Tasks.check;
|
||||
|
||||
@@ -112,8 +105,6 @@ is
|
||||
|
||||
-- Define the shaders and program.
|
||||
--
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
|
||||
vertex_Shader .define (Shader.Vertex, "assets/opengl/shader/lit_textured_skinned.vert");
|
||||
-- fragment_Shader.define (Shader.Fragment, "assets/opengl/shader/lit_textured_skinned.frag");
|
||||
fragment_Shader.define (Shader.Fragment, (asset_Names' (1 => to_Asset ("assets/opengl/shader/version.header"),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
with
|
||||
openGL.Program.lit.textured_skinned,
|
||||
openGL.texture_Set;
|
||||
openGL.Program.lit.textured_skinned;
|
||||
|
||||
private
|
||||
with
|
||||
@@ -65,9 +64,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with null record;
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.lit_textured_skinned;
|
||||
|
||||
@@ -2,9 +2,7 @@ with
|
||||
openGL.Buffer.general,
|
||||
openGL.Shader,
|
||||
openGL.Program,
|
||||
openGL.Palette,
|
||||
openGL.Attribute,
|
||||
openGL.Texture,
|
||||
openGL.Tasks,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
@@ -19,8 +17,6 @@ is
|
||||
use GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
openGL.texture_Set,
|
||||
|
||||
Interfaces,
|
||||
System;
|
||||
|
||||
@@ -33,7 +29,6 @@ is
|
||||
fragment_Shader : aliased Shader.item;
|
||||
|
||||
the_Program : openGL.Program.view;
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
Name_1 : constant String := "Site";
|
||||
Name_2 : constant String := "Coords";
|
||||
@@ -61,8 +56,7 @@ is
|
||||
if the_Program = null
|
||||
then -- Define the shaders and program.
|
||||
declare
|
||||
use Palette,
|
||||
Attribute.Forge,
|
||||
use Attribute.Forge,
|
||||
system.Storage_Elements;
|
||||
|
||||
Sample : Vertex;
|
||||
@@ -70,11 +64,7 @@ is
|
||||
Attribute_1 : Attribute.view;
|
||||
Attribute_2 : Attribute.view;
|
||||
|
||||
white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
|
||||
begin
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
|
||||
vertex_Shader .define (Shader.vertex, "assets/opengl/shader/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"),
|
||||
@@ -170,91 +160,4 @@ is
|
||||
end Indices_are;
|
||||
|
||||
|
||||
|
||||
--- Texturing
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in texture_Set.fade_Level)
|
||||
-- is
|
||||
-- begin
|
||||
-- Self.Textures.Textures (Which).Fade := Now;
|
||||
-- end Fade_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- function Fade (Self : in Item; Which : texture_Set.texture_ID) return texture_Set.fade_Level
|
||||
-- is
|
||||
-- begin
|
||||
-- return Self.Textures.Textures (Which).Fade;
|
||||
-- end Fade;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Which : texture_ID; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.Textures,
|
||||
-- Which => Which,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- function Texture (Self : in Item; Which : texture_ID) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.Textures,
|
||||
-- Which => Which);
|
||||
-- end Texture;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object)
|
||||
-- is
|
||||
-- begin
|
||||
-- Texture_is (in_Set => Self.Textures,
|
||||
-- Now => Now);
|
||||
-- end Texture_is;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object
|
||||
-- is
|
||||
-- begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.Textures,
|
||||
-- which => 1);
|
||||
-- end Texture;
|
||||
--
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item)
|
||||
-- is
|
||||
-- begin
|
||||
-- enable (Self.Textures, Self.Program);
|
||||
-- end enable_Textures;
|
||||
|
||||
|
||||
|
||||
-- overriding
|
||||
-- procedure enable_Texture (Self : in out Item)
|
||||
-- is
|
||||
-- use GL,
|
||||
-- GL.Binding,
|
||||
-- openGL.Texture;
|
||||
-- begin
|
||||
-- Tasks.check;
|
||||
--
|
||||
-- glActiveTexture (gl.GL_TEXTURE0);
|
||||
-- Errors.log;
|
||||
--
|
||||
-- if Self.Texture = openGL.Texture.null_Object
|
||||
-- then white_Texture.enable;
|
||||
-- else Self.Texture .enable;
|
||||
-- end if;
|
||||
-- end enable_Texture;
|
||||
|
||||
|
||||
end openGL.Geometry.textured;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
with
|
||||
openGL.texture_Set;
|
||||
|
||||
|
||||
private
|
||||
with
|
||||
openGL.Geometry.texturing;
|
||||
@@ -45,24 +41,6 @@ is
|
||||
for_Facia : in Positive);
|
||||
|
||||
|
||||
--- Texturing.
|
||||
--
|
||||
|
||||
-- procedure Fade_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in texture_Set.fade_Level);
|
||||
-- function Fade (Self : in Item; Which : texture_Set.texture_ID) return texture_Set.fade_Level;
|
||||
--
|
||||
--
|
||||
-- procedure Texture_is (Self : in out Item; Which : texture_Set.texture_ID; Now : in openGL.Texture.Object);
|
||||
-- function Texture (Self : in Item; Which : texture_Set.texture_ID) return openGL.Texture.Object;
|
||||
--
|
||||
-- overriding
|
||||
-- procedure Texture_is (Self : in out Item; Now : in openGL.Texture.Object);
|
||||
--
|
||||
-- overriding
|
||||
-- function Texture (Self : in Item) return openGL.Texture.Object;
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
package textured_Geometry is new texturing.Mixin;
|
||||
@@ -74,13 +52,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with
|
||||
-- record
|
||||
-- Textures : texture_Set.Item;
|
||||
-- end record;
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.textured;
|
||||
|
||||
@@ -4,8 +4,6 @@ with
|
||||
GL.Binding,
|
||||
ada.Strings.fixed;
|
||||
|
||||
with ada.Text_IO;
|
||||
|
||||
|
||||
package body openGL.Geometry.texturing
|
||||
is
|
||||
@@ -14,7 +12,7 @@ is
|
||||
|
||||
type texture_Units is array (texture_Set.texture_Id) of GLenum;
|
||||
|
||||
all_texture_Units : constant texture_Units := (GL_TEXTURE0,
|
||||
all_texture_Units : constant texture_Units := [GL_TEXTURE0,
|
||||
GL_TEXTURE1,
|
||||
GL_TEXTURE2,
|
||||
GL_TEXTURE3,
|
||||
@@ -29,7 +27,7 @@ is
|
||||
GL_TEXTURE12,
|
||||
GL_TEXTURE13,
|
||||
GL_TEXTURE14,
|
||||
GL_TEXTURE15);
|
||||
GL_TEXTURE15];
|
||||
-- GL_TEXTURE16,
|
||||
-- GL_TEXTURE17,
|
||||
-- GL_TEXTURE18,
|
||||
|
||||
Reference in New Issue
Block a user