[Bug] Full-screen mode with dual screen
2 posters
Page 1 of 1
[Bug] Full-screen mode with dual screen
When I go in full screen on duel monitor system, it does like if my behind windows are moved appart (difficult to explains).
I had the same problem with slimDX.
Here is what I do to go in fullscreen with my engine - with the "resizing code also" (don't have this problem in my engine) :
isFullScreen Property
WindowSizeChanged();
I had the same problem with slimDX.
Here is what I do to go in fullscreen with my engine - with the "resizing code also" (don't have this problem in my engine) :
isFullScreen Property
- Code:
public bool isFullScreen
{
get
{
return !_swapChain.Description.IsWindowed;
}
set
{
if (value != !_swapChain.Description.IsWindowed)
{
_swapChain.SetFullScreenState(value, null);
WindowSizeChanged();
}
}
}
WindowSizeChanged();
- Code:
private void WindowSizeChanged()
{
_renderTarget.Dispose();
//Reisze backBuffer
_swapChain.ResizeBuffers(1, _renderForm.ClientSize.Width, _renderForm.ClientSize.Height, _swapChain.Description.ModeDescription.Format, _swapChain.Description.Flags);
//Resize renderTarget based on the new backbuffer size
using (var backBuffer = Resource.FromSwapChain<Texture2D>(_swapChain, 0))
{
_renderTarget = new RenderTargetView(_graphicsDevice, backBuffer);
}
//Resize the view port
_viewPort = new Viewport(0, 0, _renderForm.ClientSize.Width, _renderForm.ClientSize.Height);
//Resize the stencilbuffer
CreateDepthStencil();
_graphicsDevice.OutputMerger.SetTargets(_depthStencil, _renderTarget);
_graphicsDevice.Rasterizer.SetViewports(_viewPort);
if (ViewPort_Updated != null) ViewPort_Updated(_viewPort); //<== Raise an event in the camera class to update the viewport
}
S33m3- Posts : 54
Join date : 2011-03-23
Re: [Bug] Full-screen mode with dual screen
Can you post a picture or screen capture of the bug?
Blademaster- Posts : 4
Join date : 2011-04-27
Age : 28
Location : On the moon
Similar topics
» Start Screen + Controls
» Automatic windowed mode instead of fullscreen mode
» Dual threads? Or Parallel threads?
» Automatic windowed mode instead of fullscreen mode
» Dual threads? Or Parallel threads?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Fri Jul 01, 2016 7:25 am by croxxx
» Source?
Thu Jul 12, 2012 9:55 am by raistlinthewiz
» Version Available (Take 2)
Sat Jun 09, 2012 3:23 am by kamild1996
» Terrain Rendering Bug
Thu May 17, 2012 8:07 am by sackboy789
» Mystery Block!
Thu Mar 29, 2012 4:42 am by Corvin73
» Your procedural tree/plant seeding technique?
Sat Mar 24, 2012 3:10 am by Slaihne
» Voxeliq project
Wed Mar 07, 2012 4:25 am by raistlinthewiz
» What is a Tech-Test?
Wed Jan 18, 2012 12:32 pm by joeydmars
» Images
Fri Jan 06, 2012 6:02 am by croxxx