Hehehehe it still doesn't work

This commit is contained in:
2022-05-27 00:05:18 +02:00
parent 0e19ef3610
commit 9cf523fb6c
5 changed files with 55 additions and 17 deletions

View File

@@ -152,4 +152,10 @@ unsigned int createTexture(char* path){
return texture;
}
void buffercpy(int VBO, void* ptr, int size){
glBindBuffer(GL_ARRAY_BUFFER, VBO);
void* buffer = glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
memcpy(buffer, ptr, size);
glUnmapBuffer(GL_ARRAY_BUFFER);
}