[DX] Texture appears scaled in MonoGameControl, but not in MonoGame project
See original GitHub issueSo I have a texture which I’m drawing in a MonoGameControl. The texture is 48x48 pixels, but when I open the form it is drawn in a 59x59 size, and is noticeably blurry. You can download and zoom these images for reference:
This happens with any texture I draw. I have a MonoGame (latest develop branch) project. I draw the same texture and it is drawn correctly.
What I’ve tried:
-Setting Editor.graphics
’s backbuffer width and height to the size of the control on the form
-Setting the zoom of Camera to 1.0f
-Form.AutoScaleMode =AutoScaleMode. None;
-Form.DoubleBuffered = false;
My Environment: C# 7.3 Visual Studio 2019 .NET Framework 4.8
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Texture is not displayed with MonoGame OK with Xna
I am using Visual Studio 2012 and I create a MonoGame project using a Microsoft x file. No texture appear (its all black)....
Read more >Monogame resolution problem (without scaling sprites)
So I'm working on a project and started working on a scaling system for different resolutions. I know if you change the monogame...
Read more >MonoGame.Forms!
Forms library by creating a simple control to render stuff! (it's assumed that you already have created a new Windows Forms project with...
Read more >MonoGame.Forms.DX 3.1.0
It will cause flickering and slow downs. If you experience scaling issues with your drawn content, then you might want to set the...
Read more >Texture rendering issue when scaling with a matrix
I am working on a game (in XNA/MonoGame) in which I have large world consisting of many individual tiles with different textures.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not comming from the library. This is the regular Windows DPI scaling system.
In this case adding a manifest file to the project is the right solution and you should go with that.
Good idea. I added the specific information in the “Tips&Tricks-section” of the readme.md file.
Thank you for your suggestion and i’m glad I could help you with your problem.
Have a nice day!
@sqrMin1 Sorry for the late reply.
Yes! Adding that manifest really fixed it. If I remove the manifest, a 100x100 texture will be drawn as a 125x125 texture (1.25 scale). In fact the whole window would be scaled, not just the texture.
Is there any way to fix that from within the library? If not, you should add it as a warning in the README.md for future users…
Thanks again.