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

    GeUserArea::Draw() and textures

    Cinema 4D SDK
    c++ sdk
    2
    2
    216
    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.
    • WickedPW
      WickedP
      last edited by

      Hi folks,

      can anyone tell me if it's possible to draw a texture that already exists on the graphics card, without having to transfer it to the CPU-side, when in a GeUserArea()?

      Currently, I pull the texture, then transfer the data to a BaseBitmap, then do this in DrawMsg():

      void MyUserArea::DrawMsg(LONG x1,LONG y1,LONG x2,LONG y2,const BaseContainer &msg)
      	{
      		SetClippingRegion(x1,y1,x2,y2);
      		OffScreenOn();
      	
      		DrawSetPen(COLOR_BG);
      		DrawRectangle(x1,y1,x2,y2);
      
      		if(texture)
      		{
      			DrawBitmap(texture,Left,Top,Right,Bottom,0,0,texture->GetBw(),texture->GetBh(),BMP_NORMAL);
      		}
      	}
      

      but it's very slow once the texture gets above HD desktop size. Is there a hack I can use to just draw what I've already got in GPU memory? Is there something like a BaseDraw object I can tap into here from inside the DrawMsg() method?

      WP.

      wickedp.com

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hi,

        sorry, but with the classic API it's not possible.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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