Luna::VG::IShapeDrawList
Represents a draw list that contains shapes to be drawn.
interface Luna::VG::IShapeDrawList : public virtual Interface
Base type
Member functions
-
Resets the draw list. The call clears all shapes recorded, but retains their memory and resources, so they can be reused for new shapes.
-
virtual Vector< f32 > & get_shape_points()=0
Gets shape points that are recorded in internal shape buffer.
-
virtual void set_shape_buffer(RHI::IBuffer *shape_buffer)=0
Sets the shape buffer used for the following draw calls.
-
virtual RHI::IBuffer * get_shape_buffer()=0
Gets the current set shape buffer. See remarks of set_shape_buffer for details.
-
virtual void set_texture(RHI::ITexture *tex)=0
Sets the texture to be sampled when rendering the succeeding shapes.
-
virtual RHI::ITexture * get_texture()=0
Gets the currently set texture.
-
virtual void set_sampler(const RHI::SamplerDesc *desc)=0
Sets the sampler state to be used when sampling bound textures.
-
virtual RHI::SamplerDesc get_sampler()=0
Gets the sampler state currently set.
-
virtual void set_origin(const Float2 &origin)=0
Sets the origin point for the following draw calls.
-
Gets the origin point for the following draw calls.
-
virtual void set_rotation(f32 degrees)=0
Sets the rotation for the following draw calls.
-
Gets the rotation for the following draw calls.
-
virtual void draw_shape_raw(Span< const Vertex > vertices, Span< const u32 > indices)=0
Draws one shape by submitting vertices and indices directly.
-
Draws one shape. The shape is drawn by adding one draw rect (two triangles) to the list.
-
Builds render resources and draw calls that can be used for drawing glyphs.
-
virtual RHI::IBuffer * get_vertex_buffer()=0
Gets the compiled vertex buffer used for rendering glyphs in this draw list.
-
virtual u32 get_vertex_buffer_size()=0
Gets the number of vertices in the vertex buffer returned by get_vertex_buffer.
-
virtual RHI::IBuffer * get_index_buffer()=0
Gets the compiled index buffer used for rendering glyphs in this draw list.
-
virtual u32 get_index_buffer_size()=0
Gets the number of indices in the index buffer returned by get_index_buffer.
-
virtual void get_draw_calls(Vector< ShapeDrawCall > &out_draw_calls)=0
Gets an array of draw calls that should be invoked to draw glyphs in this draw list.