giawa / opengl4csharp

OpenGL 4 Bindings (partially based on OpenTK) for C#
Other
234 stars 61 forks source link

Make it possible to make a VBO without also allocating an array #45

Closed TheAIBot closed 4 years ago

TheAIBot commented 4 years ago

Made a VBO constructor that doesn't require an array of data to be avilable.

Before you had to do this: VBO<Vector3> vertices = new VBO<Vector3>(new Vector3[1000]);

Essentially create an array just to create a VBO. This Pr makes it possible to do this: VBO<Vector3> vertices = new VBO<Vector3>(1000);

Makes a VBO of the same size, but without allocating an array for it.

giawa commented 4 years ago

Worth noting this also adds the fix for Vector3 TakeMin and TakeMax (which was already fixed in master). Looks good to me!

TheAIBot commented 4 years ago

Apparently Github isn't able to filter out already committed commits in a PR. I guess i won't be reusing feature branches anymore.