LineZOffset() + DrawPolygon() issues



  • 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);
    


  • 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....



  • 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



  • 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.


Log in to reply