OS/2, eCS & ArcaOS - Technical > Programming
ClassiCube porting thread
Jochen Schäfer:
Well, using BGR3 or RGB3 as draw buffer doesn't change anything.
I still have only frame with the desktop background in it.
Lars:
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).
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.
Also note that you cannot do "direct mode" when you are using Panorama with "Shadow Buffer Enabled". Since that is the setting that about 95% of all remaining OS/2 users will use, you should honour that.
Jochen Schäfer:
--- Quote from: Lars on April 20, 2024, 12:39:55 pm ---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).
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.
--- End quote ---
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.
--- Quote from: Lars on April 20, 2024, 12:39:55 pm ---Also note that you cannot do "direct mode" when you are using Panorama with "Shadow Buffer Enabled". Since that is the setting that about 95% of all remaining OS/2 users will use, you should honour that.
--- End quote ---
How can I get the option?
Dave Yeo:
Code from Mozilla (widget\os2\nswindow.cpp #405), for querying whether the shadow buffer is enabled
--- Code: --- // Don't use DIVE if the Panorama video driver is in use
// unless its shadow buffer is turned off.
HMODULE hmod;
if (!DosQueryModuleHandle("PANOGREX", &hmod)) {
char str[8];
if (PrfQueryProfileString(HINI_USERPROFILE, "PANORAMA", "VBEShadowBuffer",
0, str, sizeof(str)) && !strcmp(str, "0")) {
sUseDive = TRUE;
printf("Video driver is Panorama - shadow-buffer is disabled\n");
}
else
printf("DIVE is disabled - Panorama's shadow-buffer is enabled\n");
return;
}
sUseDive = TRUE;
--- End code ---
Flashback:
--- Quote from: Jochen Schäfer on April 20, 2024, 02:52:58 pm ---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.
--- End quote ---
Really? Does it correctly handle the situation when the application window is partly obscured by another desktop window?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version