class
Eagle::GPU::VertexLayout
- Eagle::GPU::VertexLayout
- Reference
- Object
Overview
Describes the attributes in an interleaved vertex buffer, for custom geometry.
layout = GPU::VertexLayout.new.float("a_position", 3).float("a_uv", 2).color("a_color")
Defined in:
eagle/gpu/device.crInstance Method Summary
-
#attribs : Array(Eagle::GPU::VertexAttrib)
The attributes in order.
-
#color(name : String) : self
Adds a packed RGBA color attribute, normalized to 0..1 in the shader.
-
#float(name : String, components : Int32) : self
Adds a float attribute with components values.
-
#float_count : Int32
Floats per vertex.
-
#stride : Int32
Bytes per vertex.
Instance Method Detail
def color(name : String) : self
#
Adds a packed RGBA color attribute, normalized to 0..1 in the shader. Returns self.
def float(name : String, components : Int32) : self
#
Adds a float attribute with components values. Returns self.