opengl: Cosmetics.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
with
|
||||
openGL.Model,
|
||||
openGL.Errors,
|
||||
GL.lean,
|
||||
GL.Binding,
|
||||
ada.Strings.fixed;
|
||||
@@ -47,40 +48,6 @@ is
|
||||
|
||||
|
||||
|
||||
|
||||
-- procedure enable (for_Model : in openGL.Model.view;
|
||||
-- Uniforms : in texturing.Uniforms;
|
||||
-- texture_Set : in openGL.texture_Set.Item)
|
||||
-- is
|
||||
-- use GL.Binding,
|
||||
-- GL.lean;
|
||||
--
|
||||
-- use type GLint;
|
||||
--
|
||||
-- begin
|
||||
-- if for_Model.texture_Count > 0
|
||||
-- then
|
||||
-- for i in 1 .. openGL.texture_Set.texture_Id (for_Model.texture_Count)
|
||||
-- loop
|
||||
-- Uniforms.Textures (i).tiling_Uniform .Value_is (Vector_2' ((for_Model.Tiling (Which => i).S,
|
||||
-- for_Model.Tiling (Which => i).T)));
|
||||
-- Uniforms.Textures (i).fade_Uniform .Value_is (Real (for_Model.Fade (Which => i)));
|
||||
-- Uniforms.Textures (i).texture_applied_Uniform.Value_is (for_Model.texture_Applied (Which => i));
|
||||
--
|
||||
-- glUniform1i (Uniforms.Textures (i).texture_Uniform.gl_Variable,
|
||||
-- GLint (i) - 1);
|
||||
-- glActiveTexture (all_texture_Units (i));
|
||||
-- glBindTexture (GL_TEXTURE_2D,
|
||||
-- texture_Set.Textures (i).Object.Name);
|
||||
-- end loop;
|
||||
-- end if;
|
||||
--
|
||||
-- Uniforms.Count.Value_is (for_Model.texture_Count);
|
||||
-- end enable;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure enable (for_Model : in openGL.Model.view;
|
||||
Uniforms : in texturing.Uniforms)
|
||||
-- texture_Set : in openGL.texture_Set.Item)
|
||||
@@ -101,10 +68,10 @@ is
|
||||
Uniforms.Textures (i).texture_applied_Uniform.Value_is (for_Model.texture_Applied (Which => i));
|
||||
|
||||
glUniform1i (Uniforms.Textures (i).texture_Uniform.gl_Variable,
|
||||
GLint (i) - 1);
|
||||
glActiveTexture (all_texture_Units (i));
|
||||
GLint (i) - 1); Errors.log;
|
||||
glActiveTexture (all_texture_Units (i)); Errors.log;
|
||||
glBindTexture (GL_TEXTURE_2D,
|
||||
for_Model.texture_Object (i).Name);
|
||||
for_Model.texture_Object (i).Name); Errors.log;
|
||||
end loop;
|
||||
end if;
|
||||
|
||||
@@ -149,11 +116,9 @@ is
|
||||
|
||||
package body Mixin
|
||||
is
|
||||
use openGL.texture_Set;
|
||||
|
||||
|
||||
texture_Uniforms : texturing.Uniforms;
|
||||
|
||||
|
||||
procedure create_Uniforms (for_Program : in openGL.Program.view)
|
||||
is
|
||||
begin
|
||||
@@ -167,7 +132,6 @@ is
|
||||
Which : in texture_Set.texture_ID := 1)
|
||||
is
|
||||
begin
|
||||
-- Self.texture_Set.Textures (Which).Fade := Now;
|
||||
Self.Model.Fade_is (Which => Which,
|
||||
Now => Now);
|
||||
end Fade_is;
|
||||
@@ -178,7 +142,6 @@ is
|
||||
function Fade (Self : in Item; Which : in texture_Set.texture_ID := 1) return texture_Set.fade_Level
|
||||
is
|
||||
begin
|
||||
-- return Self.texture_Set.Textures (Which).Fade;
|
||||
return Self.Model.Fade (Which => Which);
|
||||
end Fade;
|
||||
|
||||
@@ -189,9 +152,6 @@ is
|
||||
Which : in texture_Set.texture_ID := 1)
|
||||
is
|
||||
begin
|
||||
-- Texture_is (in_Set => Self.texture_Set,
|
||||
-- Which => Which,
|
||||
-- Now => Now);
|
||||
Self.Model.texture_Object_is (Which => Which,
|
||||
Now => Now);
|
||||
end Texture_is;
|
||||
@@ -202,8 +162,6 @@ is
|
||||
function Texture (Self : in Item; Which : texture_Set.texture_ID := 1) return openGL.Texture.Object
|
||||
is
|
||||
begin
|
||||
-- return openGL.texture_Set.Texture (in_Set => Self.texture_Set,
|
||||
-- Which => Which);
|
||||
return Self.Model.texture_Object (Which);
|
||||
end Texture;
|
||||
|
||||
@@ -214,17 +172,15 @@ is
|
||||
Which : in texture_Set.texture_ID := 1)
|
||||
is
|
||||
begin
|
||||
-- Self.texture_Set.Textures (Which).Applied := Now;
|
||||
Self.Model.texture_Applied_is (Which, Now);
|
||||
end texture_Applied_is;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
function texture_Applied (Self : in Item; Which : in texture_Set.texture_ID := 1) return Boolean
|
||||
function texture_Applied (Self : in Item; Which : in texture_Set.texture_ID := 1) return Boolean
|
||||
is
|
||||
begin
|
||||
-- return Self.texture_Set.Textures (Which).Applied;
|
||||
return Self.Model.texture_Applied (Which);
|
||||
end texture_Applied;
|
||||
|
||||
@@ -235,7 +191,6 @@ is
|
||||
Which : in texture_Set.texture_ID := 1)
|
||||
is
|
||||
begin
|
||||
-- Self.texture_Set.Textures (Which).Tiling := Now;
|
||||
Self.Model.Tiling_is (Which => Which,
|
||||
Now => Now);
|
||||
end Tiling_is;
|
||||
@@ -246,23 +201,15 @@ is
|
||||
function Tiling (Self : in Item; Which : in texture_Set.texture_ID := 1) return texture_Set.Tiling
|
||||
is
|
||||
begin
|
||||
-- return Self.texture_Set.Textures (Which).Tiling;
|
||||
return Self.Model.Tiling (Which);
|
||||
end Tiling;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
texturing.enable (for_Model => Self.Model.all'Access,
|
||||
Uniforms => texture_Uniforms);
|
||||
end enable_Textures;
|
||||
@@ -271,5 +218,4 @@ is
|
||||
end Mixin;
|
||||
|
||||
|
||||
|
||||
end openGL.Geometry.texturing;
|
||||
|
||||
Reference in New Issue
Block a user