New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewport in LoadContent is not set #387

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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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.

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