Skip to content
This repository has been archived by the owner. It is now read-only.

Viewport in LoadContent is not set #387

EnemyArea opened this Issue May 15, 2014 · 2 comments


None yet
3 participants
Copy link

EnemyArea commented May 15, 2014

If you check the GraphicsDevice.Viewport property in the LoadContent method from the SharpDX.Toolkit.Game class, width and height is 0. in xna and monogame it is not.


This comment has been minimized.

Copy link

ArtiomCiumac commented May 16, 2014

GraphicsDevice.Viewport is set before drawing and it is not available in LoadContent, There you can access GraphicsDevice.Presenter.Viewport if needed or just take the backbuffer size.

SharpDX.Toolkit is not meant to be exactly like XNA or MonoGame as they target different scenarios. Toolkit is built for quick prototyping and to try new stuff while maintaining access to lowest level of API, but XNA and MonoGame aim to provide full game frameworks.


This comment has been minimized.

Copy link

xoofx commented May 16, 2014

@ArtiomCiumac I think we can add a SetRenderTarget before LoadContent, there is no real restriction for it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.