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

Viewport in LoadContent is not set #387

Closed
EnemyArea opened this issue May 15, 2014 · 2 comments
Closed

Viewport in LoadContent is not set #387

EnemyArea opened this issue May 15, 2014 · 2 comments

Comments

@EnemyArea
Copy link

@EnemyArea 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.

@ArtiomCiumac
Copy link
Contributor

@ArtiomCiumac 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.

@xoofx
Copy link
Member

@xoofx 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.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants