Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Drawing squares with openGL geometry shader

    SDK Help
    0
    4
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post