Viewport in LoadContent is not set #387

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

Comments

Projects
None yet
3 participants
@EnemyArea

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

This comment has been minimized.

Show comment Hide comment
@ArtiomCiumac

ArtiomCiumac May 16, 2014

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment Hide comment
@xoofx

xoofx May 16, 2014

Member

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

Member

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 join this conversation on GitHub. Already have an account? Sign in to comment