Improve memory safety of VRamList
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m5s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m5s
Copying it around is slow and you wouldn't do it. But incase some idiot actually does so it doesn't break everything.
This commit is contained in:
@@ -21,12 +21,17 @@ private:
|
||||
void SetData(void* data, const long& length);
|
||||
void UpdateData(void* data, const long& offset, const long& length);
|
||||
public:
|
||||
VRamList() = default;
|
||||
VRamList(const GLuint* data, const long& length);
|
||||
VRamList(const GLfloat* data, const long& length);
|
||||
VRamList(Vector2* data, const long& length);
|
||||
VRamList(Vector3* data, const long& length);
|
||||
VRamList(Vector4* data, const long& length);
|
||||
|
||||
~VRamList();
|
||||
/** Copying around the VBO data to a new VBO like this is slow.
|
||||
* Pass to function by const reference or pointer always. */
|
||||
VRamList(const VRamList& rhs);
|
||||
|
||||
public:
|
||||
[[nodiscard]] GLuint GetHandle() const;
|
||||
/// Returns the number of elements in the list.
|
||||
|
Reference in New Issue
Block a user