FAST image updating

Everything else that doesn't fall into one of the other PB categories.
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

FAST image updating

Post by halo »

Please tell me if this is possible before I go and waste a lot of time.

I would like to open a PureBasic window from Blitz3D, and display a full-screen render on it. I would do this by creating a large image, drawing it on the window, and constantly passing pixel data from Blitz to the DLL. Is there any way to write to an image fast enough that this will be feasible? It doesn't have to be super-fast, but shouldn't be less than 20 fps.

I am doing this for a "texture browser" window in a model editor that displays real-time effects on materials.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

it is of course feasible but you should copy memory as a chunk and not per pixel, it's way too slow ... also test rendering in system memory as opposed to video memory. maybe you can change the render target in blitz3d ?
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Post by halo »

Okay, let's say I have a point in Blitz where I know the pixel data is stored. Where do I copy this in PB? (Assuming the pixel format is the same!!!)
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

Good question ? thats where it gets complex .. you might be better off doing some sort of screen capture from purebasic ... this may slow things down but at least will capture it in a format u can use easily.

But if you are adventureous I believe Fred has placed some PB internal structures in the PureBasic libraries descritor file (located in the Library SDK file) . You'll have to play around a bit, use peek and poke lots and memory commands. :lol: Tons of Fun !
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Post by halo »

Okay, I do that all the time in Blitz.
Post Reply