opengl.variable.uniform: Add a 'sampler2D' uniform variable.
This commit is contained in:
@@ -265,6 +265,15 @@ is
|
|||||||
end uniform_Variable;
|
end uniform_Variable;
|
||||||
|
|
||||||
|
|
||||||
|
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.sampler2D
|
||||||
|
is
|
||||||
|
the_Variable : Variable.uniform.sampler2D;
|
||||||
|
begin
|
||||||
|
the_Variable.define (Self, Named);
|
||||||
|
return the_Variable;
|
||||||
|
end uniform_Variable;
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- Operations
|
-- Operations
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ is
|
|||||||
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.vec4;
|
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.vec4;
|
||||||
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.mat3;
|
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.mat3;
|
||||||
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.mat4;
|
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.mat4;
|
||||||
|
function uniform_Variable (Self : access Item'Class; Named : in String) return Variable.uniform.sampler2D;
|
||||||
|
|
||||||
function Attribute (Self : access Item'Class; Named : in String) return Attribute.view;
|
function Attribute (Self : access Item'Class; Named : in String) return Attribute.view;
|
||||||
function attribute_Location (Self : access Item'Class; Named : in String) return gl.GLuint;
|
function attribute_Location (Self : access Item'Class; Named : in String) return gl.GLuint;
|
||||||
|
|||||||
@@ -25,13 +25,15 @@ is
|
|||||||
-- Actuals
|
-- Actuals
|
||||||
--
|
--
|
||||||
|
|
||||||
type bool is new Variable.uniform.item with private;
|
type bool is new Variable.uniform.item with private;
|
||||||
type int is new Variable.uniform.item with private;
|
type int is new Variable.uniform.item with private;
|
||||||
type float is new Variable.uniform.item with private;
|
type float is new Variable.uniform.item with private;
|
||||||
type vec3 is new Variable.uniform.item with private;
|
type vec3 is new Variable.uniform.item with private;
|
||||||
type vec4 is new Variable.uniform.item with private;
|
type vec4 is new Variable.uniform.item with private;
|
||||||
type mat3 is new Variable.uniform.item with private;
|
type mat3 is new Variable.uniform.item with private;
|
||||||
type mat4 is new Variable.uniform.item with private;
|
type mat4 is new Variable.uniform.item with private;
|
||||||
|
type sampler2D is new Variable.uniform.item with private;
|
||||||
|
|
||||||
|
|
||||||
procedure Value_is (Self : in bool; Now : in Boolean);
|
procedure Value_is (Self : in bool; Now : in Boolean);
|
||||||
procedure Value_is (Self : in int; Now : in Integer);
|
procedure Value_is (Self : in int; Now : in Integer);
|
||||||
@@ -45,16 +47,22 @@ is
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is abstract new openGL.Variable.item with null record;
|
type Item is abstract new openGL.Variable.item with null record;
|
||||||
|
|
||||||
type bool is new Variable.uniform.item with null record;
|
type bool is new Variable.uniform.item with null record;
|
||||||
type int is new Variable.uniform.item with null record;
|
type int is new Variable.uniform.item with null record;
|
||||||
type float is new Variable.uniform.item with null record;
|
type float is new Variable.uniform.item with null record;
|
||||||
|
|
||||||
type vec3 is new Variable.uniform.item with null record;
|
type vec3 is new Variable.uniform.item with null record;
|
||||||
type vec4 is new Variable.uniform.item with null record;
|
type vec4 is new Variable.uniform.item with null record;
|
||||||
|
|
||||||
type mat3 is new Variable.uniform.item with null record;
|
type mat3 is new Variable.uniform.item with null record;
|
||||||
type mat4 is new Variable.uniform.item with null record;
|
type mat4 is new Variable.uniform.item with null record;
|
||||||
|
|
||||||
|
type sampler2D is new Variable.uniform.item with null record;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
null_Uniform : constant gl.GLint := gl.GLint'Last; -- TODO: Use 'GL.GL_MAX_UNIFORM_LOCATIONS', when GL bindings is updated.
|
||||||
|
|
||||||
end openGL.Variable.uniform;
|
end openGL.Variable.uniform;
|
||||||
|
|||||||
Reference in New Issue
Block a user