i recently stumbled upon OpenCL and read that i can bind vertex buffers so i can write into them via opencl kernels.
this all works and seriously is totally awesome but i cannot figure out one last thing that could improve performance quite a bit.
The data i need in my index and vertex buffers will be calculated in an opencl kernel. i know their sizes already and since openCL requires them to exist on GPU already, i need to create those vertexbuffers and use them in a geometry that i can render then. this however means that all those 0’s get send to GPU just so in the next frame i can run my kernel and write the actual data into them.
all i want to do is tell openGL to create some buffers of specific size without sending that amount of data. is this possible or would i need to fork the engine because some stuff is hidden?
in case i can tell openGL to create buffers without sending all that data, can i ensure the buffers are actually created when i want to use them in the kernel? i guess the drawcalls etc are non blocking, could i just call that buffer generation at the start of a frame in a blocking way and that would not result in waiting for all drawcalls?
Thanks in advance and many greetings from the shire,