adityatan's picture

Object Scaling and Sizing in gl_Control1

Hi there:

Many thanks for the previous support that I had my project 90% completed. I'm now in a process of transferring my Console App to Windows App. And as you're all expecting it, I'm having tons of questions in this process :)

Let's say that the size of my gl_Control1 is restricted to 1000 x 1000. My object, however, has a size of 1200 x 1200. How do I scale this object down? Which command in OpenTK that does that?

Thank you.

Aditya Tan


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adityatan's picture

Also another question relating to this one: it seems that my "Zfar" in the "Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 2f, Width / (float)Height, 0.1f, 1000f);" does not work the same way as it is in my Console App. Which features of OpenTK in Windows App and Console App that might differ much that my view becomes strange?

Aditya

adityatan's picture

To clarify my second question: the "1000f" in "Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 2f, Width / (float)Height, 0.1f, 1000f);" does not show as 1000f.

Aditya

adityatan's picture

It now works. The resize is the key. Thanks!