开发者

drawing GL object proportional to screen

How to draw, say, a rectangle on the screen with it being proportional to the current device? e.g. a rectangle, centered on the viewport, one pixel smaller than the screen on each border.

I can live with Orthogonal, but would like perspective (basically everything at Z=something should be proport开发者_高级运维ional to the screen, and the upper parts of the elements being distorted by perspective)

I can calculate everything on my own if i know the relation... but i don't have a starting point.

I could experiment and get to a relation myself... i even resorted to that while coding for the Wii, but that's a really bad decision on Android and all the screen ratios/sizes out there...


seems that at z=1 you can fit in the screen all -1,-1-1,1 quads.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜