21
Programming / Re: Dive: Why does not this work
« Last post by Lars on April 22, 2024, 11:23:35 am »Look at the OS/2 toolkit, in the "beehive" sample code (in that code you can ignore everything that centers around sprite creation. You can also ignore everything that centers around full screen DIVE unless you really want to do that, that includes loading GAMESVR [deprecated since Warp 4] or PMMERGE Dive Fullscreen Init procedure).Yes, I do use the Dive functions, but WM_VRNDISABLED AND WM_VRNENABLED are not much use for me, since Classicube gives me the rectangles it wants to paint to, anyway. Moreover, SDL2 works without using the window messages, so it seems optional.
I think you will need to support the WM_VRNDISABLED and WM_VRNENABLED window messages and use DiveAllocImageBuffer,DiveBlitImage,DivFreeImageBuffer. Note that the sample does the blitting from a secondary thread.
Look at the help for the "DiveSetupBlitter" function. You need to support WM_VRNDISABLED and WM_VRNENABLED in order to notify the Dive Blitter via "DiveSetupBlitter" that changes to the visible regions will start or end to occur.
On a reception of WM_VRNDISABLED you need to disable the blitter, on a reception of WM_VRNENABLED you will need to set up again the blitter with the proper values.