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

    Threading bitmaps

    Cinema 4D SDK
    c++
    2
    2
    385
    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,

      I've either had a brain fade, or I haven't done this before. I have a GeDialog with a bitmap, and I'm running a background thread to set pixel colours. I'm only setting a line of pixels white for testing. I'm also wanting to make this function multi-threaded in future, which is why I had the bitmap sitting in the dialog.

      I pass a reference of the bitmap to the thread. But, when I try call SetPixel(), it isn't doing anything. When I display the bitmap on one of the dialog's buttons, or in the picture viewer, the pixels are all black.

      Is setting bitmap pixels from another thread not doable? Or do I need to go back and study my code again?

      WP.

      wickedp.com

      1 Reply Last reply Reply Quote 0
      • P
        PluginStudent
        last edited by

        Not sure if it helps, but there is an example of using ParallelImage() to write into a Bitmap in the documentation.

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