简体   繁体   English

具有屏幕调整大小和相机大小的C#OpenTk缩放对象

[英]C# OpenTk scale object with on screen resize and camera size

Look at the those images minimized fullscreen The minimized window created with 2 texture is right, but in the fullscreen window i dont know how to fix, i dont know if i should scale the texture or zoom the camera but im noob with opentk, if someone can help me with some code. 查看那些最小化的 全屏图像用2个纹理创建的最小化窗口是正确的,但是在全屏窗口中,我不知道如何修复,我不知道我是否应该缩放纹理或缩放相机,但是我不喜欢使用opentk,如果有人可以帮助我一些代码。 I dont post any code becouse i dont really know how to fix it.. Thanks and sorry for my english! 我不发布任何代码,因为我真的不知道如何解决它。

You need to use the OnResize method and change the projection matrix 您需要使用OnResize方法并更改投影矩阵

In OpenGL, how can I adjust for the window being resized? 在OpenGL中,如何调整要调整大小的窗口?

If you are using immediate mode then this will help, other wise you will need to change the projection matrix in the shaders you are using. 如果使用即时模式,则将有所帮助,否则,您需要在使用的着色器中更改投影矩阵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM