Drawing squares with openGL geometry shader
-
On 30/07/2018 at 12:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
Hello, i'm writing a C++ objectdata plugin that needs to draw it's own representation of some particles in the viewport.I've referenced the gl_test_object.cpp example file and have gotten it working with just 1px dots, but i'd love to be able to write a geometry shader for openGL that takes those input vertices and draws a box of a given size for each one.
I see in the c4d_gl.h file that there seems to be support for a geometry program, but since c4d's implementation of openGL isn't well documented I can't figure out how to implement one.
Any help would be much appreciated.
-
On 31/07/2018 at 02:20, xxxxxxxx wrote:
Hi,
Definitions in c4d_gl.h are internal, not documented and not meant to be used by third party developers.
Object plugins should perform drawing operations from Draw() using the passed BaseDraw and its drawing functions.
-
On 31/07/2018 at 09:04, xxxxxxxx wrote:
Thanks Yannick,
Do you have any tips on how to optimize Draw() using the BaseDraw functions to work it's fastest for drawing thousands of particles?
-
On 01/08/2018 at 09:35, xxxxxxxx wrote:
Hi,
Originally posted by xxxxxxxx
Do you have any tips on how to optimize Draw() using the BaseDraw functions to work it's fastest for drawing thousands of particles?
Information and advises for Draw() and BaseDraw can be found in the following C++ docs manuals:
Draw Manual
BaseView / BaseDraw Manual