Struct Buffer2D
Defined in File geometry2d.h
Inheritance Relationships
Derived Type
public CE::Rendering::OpenGL::VertexArray(Struct VertexArray)
Struct Documentation
-
struct Buffer2D
Retained immutable vertex upload, independent of material/image bindings.
Metadata access requires no native binding; draw operations require the live backend.
See also
Subclassed by CE::Rendering::OpenGL::VertexArray
Public Functions
-
virtual ~Buffer2D() = default
Release logical geometry ownership; native destruction or deferred retirement belongs to the backend.
-
virtual Layout2D vertex_layout() const noexcept = 0
Declaration:
[[nodiscard]]- Returns:
Immutable layout metadata used by CPU pipeline validation; no backend bind occurs.
-
virtual Topology topology() const noexcept = 0
Declaration:
[[nodiscard]]- Returns:
Primitive interpretation selected at upload; a draw does not override it.
-
virtual std::size_t vertex_count() const noexcept = 0
Declaration:
[[nodiscard]]- Returns:
Total uploaded vertices, measured in vertices rather than bytes or primitives.
-
virtual void bind() const = 0
Bind uploaded geometry on its backend owner/current context.
The caller retains geometry and its live domain; binding does not select a program, material or image.
-
virtual void draw(std::size_t first_vertex, std::size_t vertex_count) const = 0
Draw a contiguous range using this upload’s topology.
- Parameters:
first_vertex – Zero-based first vertex, not a byte offset.
vertex_count – Number of vertices; the range must fit and contain complete primitives. Requires the backend owner/current context and compatible draw state. Concrete backends perform native/domain validation and may throw; this interface does not publish a frame.
-
virtual ~Buffer2D() = default