Closed rogermc2 closed 6 years ago
I think you are right and this should be Set_Sub_Data
. Also, I think the generics in GL.Objects.Buffers
should removed and the methods should take a System.Address
instead as with textures and Image_Source
.
OK. I've changed the name in my current branch to Set_Sub_Data. I also removed the "in out" from "Data : in out Pointers.Element_Array" as this seems to be input data. Although my program is not yet complete, it does compile and run to completion so I assume these changes are OK. I had a go at removing the generic but ran into problems. I can put more effort into it if you like. If so, is it just the Get_Sub_Data generic that needs to be removed or are there others?
This is long fixed, right? I don't find Get_Sub_Data
anywhere in the code.
OK.
GL.Objects.Buffers.Get_Sub_Data implements glBufferSubData via API.Buffer_Sub_Data.
According to my reading, glBufferSubData "Replaces a subset of a buffer object's data store with new data" suggesting that Get_Sub_Data should be Set_Sub_Data or Load_Sub_Data. When I attempted to use Get_Sub_Data, compilation failed complaining that the target, GL_ARRAY_BUFFER, needs to be a variable. I managed to get my program to compile by deleting "in out" from "Target : in out Buffer_Target". This compares with the declaration for Load_To_Buffer. The line of code that I am trying to implement is:
As I still haven't been able to get my program to work, I'm not sure whether or not this is a problem.