glOrtho
文章推薦指數: 80 %
glOrtho describes a transformation that produces a parallel projection. The current matrix (see glMatrixMode) is multiplied by this matrix and the result ... NameglOrtho—multiplythecurrentmatrixwithanorthographicmatrixCSpecificationvoidglOrtho(GLdoubleleft, GLdoubleright, GLdoublebottom, GLdoubletop, GLdoublenearVal, GLdoublefarVal); Parametersleft,right Specifythecoordinatesfortheleftandrightverticalclippingplanes. bottom,top Specifythecoordinatesforthebottomandtophorizontalclippingplanes. nearVal,farVal Specifythedistancestothenearerandfartherdepthclippingplanes. Thesevaluesarenegativeiftheplaneistobebehindtheviewer. Description glOrthodescribesatransformationthatproducesaparallelprojection. Thecurrentmatrix(seeglMatrixMode)ismultipliedbythismatrix andtheresultreplacesthecurrentmatrix,asif glMultMatrixwerecalledwiththefollowingmatrix asitsargument: 2 right - left 0 0 t x 0 2 top - bottom 0 t y 0 0 -2 farVal - nearVal t z 0 0 0 1 where t x = - right + left right - left t y = - top + bottom top - bottom t z = - farVal + nearVal farVal - nearVal Typically,thematrixmodeisGL_PROJECTION,and left bottom - nearVal and right top - nearVal specifythepointsonthenearclippingplanethataremapped tothelowerleftandupperrightcornersofthewindow, respectively, assumingthattheeyeislocatedat(0,0,0). - farVal specifiesthelocationofthefarclippingplane. BothnearValandfarValcanbeeitherpositiveornegative. UseglPushMatrixandglPopMatrixtosaveandrestore thecurrentmatrixstack. Errors GL_INVALID_VALUEisgeneratedif left=right,or bottom=top,or near=far. GL_INVALID_OPERATIONisgeneratedifglOrtho isexecutedbetweentheexecutionof glBegin andthecorrespondingexecutionofglEnd. AssociatedGets glGetwithargumentGL_MATRIX_MODE glGetwithargumentGL_COLOR_MATRIX glGetwithargumentGL_MODELVIEW_MATRIX glGetwithargumentGL_PROJECTION_MATRIX glGetwithargumentGL_TEXTURE_MATRIX SeeAlso glFrustum, glMatrixMode, glMultMatrix, glPushMatrix, glViewport Copyright Copyright©1991-2006 SiliconGraphics,Inc.ThisdocumentislicensedundertheSGI FreeSoftwareBLicense.Fordetails,see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.
延伸文章資訊
- 1glortho - OSCHINA - 中文开源技术交流社区
OpenGL函数思考-glOrtho 函数原型: void glOrtho(GLdouble left,GLdouble right,GLdouble bottom ... 在OpenGL中有两...
- 2如何使glOrtho 平行六面體旋轉? (How can I ... - CoderBridge
問題描述如何使glOrtho 平行六面體旋轉? (How can I make the glOrtho parallelepiped rotating?) I have my world ren...
- 3glOrtho 函式(Gl.h) - Win32 apps | Microsoft Learn
glOrtho函式描述產生平行投影的透視矩陣。 (左、下、近) 和(右、上、近) 參數,分別指定對應至視窗左下角和右上角的近裁剪 ...
- 4How to use glOrtho() in OpenGL? - Stack Overflow
The glOrtho command produces an "Oblique" projection that you see in the bottom row. No matter ho...
- 5glViewPort() glOrtho()用法(學習) - 台部落
glOrtho是創建一個正交平行的視景體。 一般用於物體不會因爲離屏幕的遠近而產生大小的變換的情況。比如,常用的工程中的製圖等。需要 ...