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 / Direct3D9 "errors"

Author
Message
Lover of games
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 9th May 2008 07:18
i\'ve noticed that if you try to use BeginScene/EndScene is says that it already exists and it fails, the EXE runs but i\'m wondering why it says that the BeginScene and EndScene have failed.

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 9th May 2008 07:57 Edited at: 9th May 2008 08:23
Because those are called internally by GDK when the screen is rendered. You have no need of calling them, and it will conflict, since you can only call them in BeginScene/EndScene pairs. (i.e. You cannot nest calls to BeginScene)

Additionally, I assume that the synchronization mechanism controls when BeginScene is called using a separate thread of execution.

If you want to control the screen refresh rate, then use dbSyncRate, or use the VSYNC option in this overload of dbSetDisplayModeEx:
bool dbSetDisplayModeEx ( int iWidth, int iHeight, int iDepth, int iMode );

All other things being equal, I prefer the VSYNC option, which has no filcker at all. It renders the display when the monitor is OFF, in effect. (During the vertical retrace period.) You do not call dbSync with the VSYNC mode, either.
Lover of games
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 9th May 2008 10:34
what i'm trying to do is make a camera using DirectX, i want to over ride the camera of DBPro (not sure why, just want to) so i figured i'd make a function that used BeginScene/EndScene() to render the scene...or is that not nessesary?

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 9th May 2008 10:46 Edited at: 9th May 2008 10:48
I do not think it is even possible to do that, but I honestly don't know.

There is a concept in DirectX called multiple swap-chains, but I have always assumed that is how you get multiple cameras in the first place, since it creates multiple

Anyway, there is a function in DirectX that might be able to do this for you, CreateAdditionalSwapChain. It is in the interface, IDirect3DDevice9. You would be crating an additional render path for the same device in that case, so you would not only be able to call those functions...you'd have to.

This bit is from the DXSDK docs:


Multiple Views in Windowed Mode (Direct3D 9)
In addition to the swap chain that is owned and manipulated through the Direct3DDevice object, an application can use the IDirect3DDevice9::CreateAdditionalSwapChain method to create additional swap chains to present multiple views from the same device.

Typically, the application creates one swap chain per view, and it associates each swap chain with a particular view. The application renders images in the back buffers of each swap chain, and then uses the IDirect3DDevice9:: Present method to present them individually. Note that only one swap chain at a time can be full-screen on each adapter.
Lover of games
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 9th May 2008 10:50
how do DBpro cameras work? don't they use a begin scene/endscene? or doesn't a camera need that? i'm tring to figure out how DBPro camera work

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2024-11-20 09:16:08
Your offset time is: 2024-11-20 09:16:08