PDA

View Full Version : Create Vertex Array With No Input



toneburst
10-06-2009, 02:11 PM
Is it possible to have an OpenCL Kernel create a array of vertices from scratch (ie with no input)?

a\x
http://machinesdontcare.wordpress.com

dbs2
10-12-2009, 05:40 AM
Sure. You can create any data you want in an OpenCL kernel. Of course if your kernel has absolutely no input it would have to create the same data every time, but you might use OpenCL to generate a set of vertices based on a description. (E.g., pass in character pose data and a character map and have OpenCL generate the vertices of the posed character.) In general you can use OpenCL anywhere in your OpenGL rendering pipeline if CL/GL interaction is supported to do all sorts of cool stuff.