opengl.geometry.texturing: Use 'Mixin' generic.

This commit is contained in:
Rod Kay
2023-05-31 11:39:01 +10:00
parent ec4a9b357a
commit ce41c9afef
15 changed files with 381 additions and 292 deletions

View File

@@ -261,35 +261,35 @@ is
overriding
procedure enable_Textures (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
if not white_Texture.is_Defined
then
declare
use Palette;
white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
begin
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
end;
end if;
white_Texture.enable;
else
Self.Texture.enable;
end if;
end enable_Textures;
-- overriding
-- procedure enable_Textures (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
-- if not white_Texture.is_Defined
-- then
-- declare
-- use Palette;
-- white_Image : constant openGL.Image := [1 .. 2 => [1 .. 2 => +White]];
-- begin
-- white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
-- end;
-- end if;
--
-- white_Texture.enable;
-- else
-- Self.Texture.enable;
-- end if;
-- end enable_Textures;
end openGL.Geometry.lit_textured_skinned;