Ok, I wrote a little program to display the cameras that are being synced by whatever value you pass it so you can check if your values are working or not...
Apparently the bitwise & was not the correct operator, it seems to work with :
DWORD msk = (1 << 2);
msk = msk + ( 1 << 3 );
will mask cameras 2 and 3 if you passed it to dbSyncMask...
Here is the program I wrote to display the mask values :
#include "DarkGDK.h"
char* ta;
char* tb;
// pass this func a DWORD mask value to display which camera it will sync - integers are for cursor position for the text
void whatCamera(DWORD mask)
{
dbSetCursor(0,0);
int c;
for(c = 0; c <= 31; c++)
{
DWORD value = (1 << c);
if((mask & value) > 0)
{
tb = new char[256];
dbInk(0xFF00FF00, 0);
strcpy(tb, "Camera ");
strcat(tb, dbStr(c));
strcat(tb, " is rendered");
dbPrint(tb);
delete []tb;
}
else
{
dbInk(0xFFFF0000, 0);
ta = new char[256];
strcpy(ta, "Camera ");
strcat(ta, dbStr(c));
strcat(ta, " is not rendered");
dbPrint(ta);
delete []ta;
}
}
}
// set "msk" to be initial only masking camera 4 and 3
DWORD msk = ( 1 << 4 ) | ( 1 << 3 );
void DarkGDK()
{
dbSyncOn();
dbSyncRate(60);
dbSetDisplayMode(800, 600, 32);
dbSetWindowPosition(0, 0);
dbBackdropOn();
// add camera 2 to the mask value of msk - it works :)
msk = msk + (1 << 2);
int nopress = 0;
int DispCamVal = 0;
while (LoopGDK())
{
// whatCamera(0x3fffffff);
//
switch(DispCamVal)
{
case 0:
// as for msk value... it is camera 2 3 and 4 rendered
whatCamera(msk);
dbText(300, 0, "Value was : ( 1 << 4 ) | ( 1 << 3 ) + (1 << 2)");
break;
case 1:
// this one will render all cameras except 30 and 31
whatCamera(0x3fffffff);
dbText(300, 0, "Value was : 0x3fffffff");
break;
case 2:
// this will render cam 8, 21, 4, 3, 2
whatCamera( (1 << 8) | (1 << 21) | msk);
dbText(300, 0, "Value was : (1 << 8) | (1 << 21) PLUS ");
dbText(300, 10, "( 1 << 4 ) | ( 1 << 3 ) + (1 << 2)");
break;
}
// press key 1 2 or 3 to change display....
if(dbKeyState(2) && nopress == 0) { DispCamVal = 0; nopress = 1; }
if(dbKeyState(3) && nopress == 0) { DispCamVal = 1; nopress = 1; }
if(dbKeyState(4) && nopress == 0) { DispCamVal = 2; nopress = 1; }
if(dbScanCode() == 0) nopress = 0;
dbSync();
}
return;
};
Just pass the function whatCamera the mask value that you would pass to dbSyncMask and it will displaty what will be rendered and what wont.
This example has 3 preset "tests" in it, press keys 1 2 or 3 to display the different mask values and what renders and what doesnt.
Please Note : This is based off some DBPro code that I came across when searching for "sync mask" in the forums. That user's name is : Math89
EDIT : Beat me to it diggsey lol... Thank you very much for the info, I appreciate the help very much
If it ain't broke.... DONT FIX IT !!!