Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Drawing squares with openGL geometry shader

 Post Reply Post Reply
Author
Message
codysorgenfrey View Drop Down
Member
Member


Joined: 2014 Aug 25
Location: Washington
Online Status: Offline
Posts: 13
Post Options Post Options   Quote codysorgenfrey Quote  Post ReplyReply Direct Link To This Post Topic: Drawing squares with openGL geometry shader
    Posted: 2018 Jul 30 at 12:19pm

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. 
Back to Top
Yannick Puech View Drop Down
Forum Moderator
Forum Moderator


Joined: 2011 Apr 13
Location: Spain
Online Status: Offline
Posts: 1140
Post Options Post Options   Quote Yannick Puech Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Jul 31 at 2:20am
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.



MAXON
Developer Support
Back to Top
codysorgenfrey View Drop Down
Member
Member


Joined: 2014 Aug 25
Location: Washington
Online Status: Offline
Posts: 13
Post Options Post Options   Quote codysorgenfrey Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Jul 31 at 9:04am
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?
Back to Top
Yannick Puech View Drop Down
Forum Moderator
Forum Moderator


Joined: 2011 Apr 13
Location: Spain
Online Status: Offline
Posts: 1140
Post Options Post Options   Quote Yannick Puech Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Aug 01 at 9:35am
Hi,

Originally posted by codysorgenfrey

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



MAXON
Developer Support
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.