Writing a custom graphics involves the following steps: Limiting memory usage is important when dealing with extremely large datasets (tens or hundreds of millions of points). This kind of memory optimization is one of the use-cases of writing custom graphics. We'll use a single byte per vertex to store the vertex size (between 0 and 255 pixels), and we'll use no memory for the color since it will be determined directly by this value. Specifically, we'll require each point to have a different size (which is not supported in the existing point graphics), and a color depending directly on the size and computed directly on the GPU. The full source code for this example can be found in examples/custom_graphics.c.Īs a toy example, we'll create a graphics with square points of various size and color. Datoviz already includes the code necessary to compile GLSL shaders to SPIR-V on the fly (based on Khronos glslang). Python bindings for custom graphics will come in an upcoming version. Only the C API supports custom graphics at the moment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |