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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    DrawTexture

    SDK Help
    0
    2
    167
    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

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

      On 11/10/2004 at 09:25, xxxxxxxx wrote:

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

      ---------
      Could you give a definition of the parameters of the DrawTexture function?

      Regards,
      darf

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

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

        On 12/10/2004 at 08:23, xxxxxxxx wrote:

        It would seem that they are:
        bmp = texture bitmap
        padr4 = array of points in the polygon
        cadr = array of point colors (texture is multiplied by this)
        vnadr = array of point normals
        uvadr = array of UV coordinates into the bitmap
        pntcnt = number of points (3 or 4)
        interpolation = interpolate between pixels?
        alpha mode = how to use the alpha (DRAW_ALPHA_* )
        This code works for me:

            
            
              Filename fn = GeGetStartupPath() + Filename("resource/modules/xtensions/preview_scenes/xtenv1502.jpg");  
              AutoAlloc<BaseBitmap> bmp;  
              bmp->Init(fn);
            
            
            
            
              Vector padr4[] = { Vector(100,-100,0), Vector(100, 100, 0), Vector(-100, 100, 0), Vector(-100, -100, 0) };  
              Vector cadr[] = { Vector(.2), Vector(1,1,1), Vector(1,1,1), Vector(1,1,1) };  
              Vector vnadr[] = { Vector(0,0,1), Vector(0,0,1), Vector(0,0,1), Vector(0,0,1) };  
              Vector uvadr[] = { Vector(0.5,0,0), Vector(1, 1, 0), Vector(0, 1, 0), Vector(0, 0, 0) };  
              LONG pntcnt = sizeof(padr4)/sizeof(padr4[0]);  
              Bool interpolation = TRUE;  
              LONG alphamode = DRAW_ALPHA_NONE;
            
            
            
            
              bd->SetMatrix_Matrix(NULL, Matrix());  
              bd->DrawTexture(bmp, padr4, cadr, vnadr, uvadr, pntcnt, interpolation, alphamode);
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post