glOrtho

文章推薦指數: 80 %
投票人數:10人

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.



請為這篇文章評分?