Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / shader and dbSyncMask are driving me nuts.

Author
Message
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 1st Dec 2007 23:43
Is there some kind of special way to use sync mask?????

I read in one post that all you have to do is just dbSyncMask(cam_number).

so Is this how it works or not? Anyways, I have 5 cameras 0,1,2,3,4.

If there is somekinda code that you have to put in to identify each camera can someone please tell me what it is?

dbSyncMask(0x000001) //camera 0
dbSyncMask(0x000002) //camera 1
dbSyncMask(0x000003) //camera 2
dbSyncMask(0x000004) //camera 3
dbSyncMask(0x000005) //camera 4

or is it

dbSyncMask(1) //camera 0
dbSyncMask(2) //camera 1
dbSyncMask(3) //camera 2
dbSyncMask(4) //camera 3
dbSyncMask(5) //camera 4

or even //this works in dbp so what is the syntax for GDK?

dbSyncMask(2^0) //camera 0
dbSyncMask(2^1) //camera 1
dbSyncMask(2^2) //camera 2
dbSyncMask(2^3) //camera 3
dbSyncMask(2^4) //camera 4

If someone can just tell me if one of these ways work, or even better what to put in for each camera that would be great. If shaders are bugged then I wont use GDK cause it would be pointless for me to do so.

Anways what version of of DBP is GDK base on???????
That way I know what bugs/limitation to look out for.

Thank you.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 2nd Dec 2007 00:31
ok I included the math.h library

now I use this like I saw in a previous post

dbSyncMask((float)pow(2,0));

and I get compiler errors. If I remark this line out then it works.

Anyways. the errors are

1>------ Build started: Project: DbpVsGDK, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(197) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(204) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(212) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(227) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(245) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'
1>Build log was saved at "file://c:\Documents and Settings\David\My Documents\Visual Studio 2008\Projects\DbpVsGDK\DbpVsGDK\Debug\BuildLog.htm"
1>DbpVsGDK - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 2nd Dec 2007 00:35 Edited at: 2nd Dec 2007 00:46
Ok I figured it out. But the shader looks like crap and only runs at 11 fps. The Dbp program runs at over 100+ fps.

I understand that the frame rate is capped but jesus. lets get real here.

Anyways, the solution to the problem is this

#include "math.h"
or
#include <math.h>

then when you call the dbSyncMask(camera); command you use it like this


this will be cam 0
dbSyncMask(pow(2.0,0));

this will be cam 1
dbSyncMask(pow(2.0,1));

this will be cam 2
dbSyncMask(pow(2.0,2));

this will be cam 3
dbSyncMask(pow(2.0,3));


and so on and so forth.

The solution is actually pretty easy.

Login to post a reply

Server time is: 2024-11-19 18:30:46
Your offset time is: 2024-11-19 18:30:46