Loader(Batch &);
private:
void indices(const std::vector<unsigned> &);
+ void patch_size(unsigned);
};
private:
PrimitiveType prim_type;
DataType index_type;
std::vector<std::uint8_t> data;
- unsigned max_index;
+ unsigned max_index = 0;
+ unsigned patch_size = 3;
public:
Batch(PrimitiveType);
DataType get_index_type() const { return index_type; }
+ /** Sets the number of control points per patch. Only available if the
+ primitive type is PATCHES. */
+ void set_patch_size(unsigned);
+
+ unsigned get_patch_size() const { return patch_size; }
+
/** Appends a single index. The data type is automatically adjusted if the
index is too large for the current data type. */
Batch &append(unsigned);