[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Search] [Home]
Board
Settings Home
/3/ - 3DCG



Thread archived.
You cannot reply anymore.




Hi,
I am working with python bindings for OpenGL(pyglet) and want to know a bit about the screen normalization (-1 to 1).

Pyglet supports window size in pixels, so I would need to feed it coordinates in terms of pixel s. Suppose my screen size is 800 pixels wide, and I want to plot 2048 vertical lines. How do I scale it down to fit in the screen? Any input would be appreciated.
>>
>>646234
You can scale the model coordinates into view, or translate the model into world coordinates that fit the default projection for opengl, or adjust your perspective matrix to be able to include all the objects into view.





Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.