Archived

This topic is now archived and is closed to further replies.

i would like CreateDevice(...) not to initialize a fullscreen window for me..., how?

This topic is 5671 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hiya, is that possible? i would really like to initialize everything first before going into fullscreen mode, any way around this? one way i can think of is, create a device in windowed mode, then later on after initializing everything, reset this device, and create it again this time, fullscreen mode, though i''ve never tried this, but maybe there''s more nicer way to do this? many thanks,

Share this post


Link to post
Share on other sites
What do you mean by "initialize everything"?

If you mean starting in windowed mode, then loading textures and vertex & index information, and then changing to fullscreen mode, then yes, you can. But, when you change modes, everything is lost from the video card, and you have to get it back on (either by reloading it yourself, or putting it in D3DPOOL_MANAGED, which keeps a copy of the item in system memory).
EDIT:: So there isn't very much point (IMHO) because you've got to reload things. It would take a lot more time than just starting in fullscreen mode.

Why do you want to start windowed?

John B

[edited by - JohnBSmall on June 5, 2002 5:30:28 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by JohnBSmall
Why do you want to start windowed?


For debugging, probably. None of my apps are fullscreen-enabled yet.

mickey: there is Reset method in IDirect3DDevice8. It allows you to change present parameters without requiring to recreate the device.

However, as JohnBSmall pointed out, there isn''t much point in doing init in windowed mode and running fullscreen. Debug your code while you''re windowed, use the debug runtime to help you, and execute your code in fullscreen once the bugs are out.

Share this post


Link to post
Share on other sites
i just checked IDirect3DDevice8::Reset(...), it wouldn''t do,
it cleans up everything!

yes for debugging purpose, like in quake, wherin there''s console that pops-up, and initialize everything, am doing something like that right now, but how will i see it if after Creating the device, my app will go fullscreen...,

Share this post


Link to post
Share on other sites
hiya, well i do not like it to do it that way, i would like it to say til i''m my app is ready to go fullscreen, i would really like to control when my app will go fullscreen not with the CreateDevice thing, maybe there''s a setting or something that wouldn''t make CreateDevice enter fullscreen mode?

many thanks,

Share this post


Link to post
Share on other sites
I''m not really sure what you''re saying, but CreateDevice can initialize both fullscreen and windowed devices depending on Windowed field of D3DPRESENT_PARAMETERS, the same is true for Reset.

Share this post


Link to post
Share on other sites
hiya, here''s my code,

d3dpp.Windowed = false;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = d3ddm.Format;
d3dpp.BackBufferHeight = m_dwScreenHeight;
d3dpp.BackBufferWidth = m_dwScreenWidth;
d3dpp.BackBufferCount = 1;
d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;

m_lpd3d->CreateDevice(...)

well, is there a way to stop if from activating the screen in fullscreen mode? and when i''m ready to go fullscreen, i will then activate whatever command that is, i can''t go and reset the device because it''s will also reset some of the d3d datas that i initialized.,

or any other way around this? i would really like a dialog box(or something similar that pops-up) before entering fullscreen mode, thanks!

Share this post


Link to post
Share on other sites
hi, yes i know that, am just wondering if i am able to stop direct3d from going to fullscreen mode, but eventually, after initializing everything, my app will go fullscreen mode,

thanks,

Share this post


Link to post
Share on other sites
There are only two ways to change modes once the device is created:
1) Destroy the device, and start again - this way you lose all your textures, vertex buffers, index buffers, state blocks, state settings, everything.

2) Call Reset - this way you lose all your state blocks, state settings, and any textures, vertex buffers or index buffers except those which were put in D3DPOOL_MANAGED or D3DPOOL_SYSTEMMEM.

It''s your choice.

John B

Share this post


Link to post
Share on other sites
hey, thanks for all the advice especially bout the managed_pool thing!! probably there''s no such way to stop CreateDevice(...) in going fullscreen,

i''ll just probably call it with presentparams.windowed = true, this way the game window will still be hidden till i call create device again to init in fullscreen,

Share this post


Link to post
Share on other sites
Set Windowed parameter to TRUE and get a windowed device suitable for debugging.
Set it to FALSE and get a fullscreen device suitable for end user.
Implement a dialog or some other settings mechanism to allow the end-user to choose between windowed and fullscreen mode. All of these are done via CreateDevice.
Implement a toggle in your program to switch between windowed and fullscreen modes back and forth (via Reset).
But don''t initialize windowed mode and then immediately switch to fullscreen. Why would you want to do this anyway?

Share this post


Link to post
Share on other sites