Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    LineZOffset() + DrawPolygon() issues

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 408 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 22/06/2011 at 16:14, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      On Windows, my gradated polygons are properly drawn over the source polygon object using my generator object's Draw() method.

      On MacOSX, my gradated polygons are drawn but the source polygon object is black and occludes the drawing.  I can only see the gradated polygons by hiding the source polygon object in the View Editor.

      Same code. What gives?

      #ifdef    C4D_R11  
        bd->SetMatrix_Matrix(NULL, op->GetMg(), 32L);  
      #endif  
        
        bd->LineZOffset(32L);  
        // Draw Gradients  
        Vector            lcol;  
        LONG            gradType =    tbc->GetLong(TUNFURL_GRADIENT_COLORMODEL);  
        LONG            ccnt =        tbc->GetLong(TUNFURL_POLYGON_COUNT);  
        NeighborPoly*    lg =        gradients+ccnt;  
        if (tbc->GetBool(TUNFURL_GRADIENTS_SHOW))  
        {  
            // Full Levels up to Last Level  
            for (NeighborPoly* g = gradients; g != lg; ++g)  
            {  
                // Color Polygon  
                if (g->value > unfurled) continue;  
                poly =                    &polys[g->index];  
                pdv[0] =                verts[poly->a];  
                pdv[1] =                verts[poly->b];  
                pdv[2] =                verts[poly->c];  
                pdv[3] =                verts[poly->d];  
                lcol =                    GiveColorGradient(g->value, gradType);  
                pdv[4] =                lcol;  
                pdv[5] =                lcol;  
                pdv[6] =                lcol;  
                pdv[7] =                lcol;  
      #ifdef    C4D_R12  
                bd->DrawPolygon(&pdv[0],&pdv[4],TRUE);  
      #else  
                bd->Polygon3D(&pdv[0],&pdv[4],TRUE);  
      #endif  
            }  
        }  
        bd->LineZOffset(0L);
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/06/2011 at 20:32, xxxxxxxx wrote:

        To put a really fine point on it: DrawPoly() works.  You might want to fix this, Maxon....

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 05/07/2011 at 02:41, xxxxxxxx wrote:

          In which drawpass are you drawing the polygons?

          cheers,
          Matthias

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 05/07/2011 at 08:30, xxxxxxxx wrote:

            DRAWPASS_OBJECT of course.

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