WebFeb 25, 2003 · gluOrtho2D specifies the coordinates to be used with the viewport which defaults to the window size. Use glViewport to specify the window region in window coordinates to be drawn to. So, if you want create a 400 x 400 window and only want to draw to the rectangle (50, 50, 350, 350) within the window, then use glViewport (50, 50, … WebNov 25, 2016 · gluOrtho2D定义剪裁面,通过正交投影,把景物(模型)按照1:1的比例绘制到一个剪裁面上,相当于对世界坐标窗口的一个截取。glViewport定义视口,即视见窗口,是从世界坐标系窗口到屏幕坐标系 …
gluOrtho2D - OpenGL: Basic Coding - Khronos Forums
WebFeb 26, 2012 · To fix it, you need to make sure that you're linking in the glu library correctly. – Stuart Golodetz. Feb 26, 2012 at 15:47. You seem to be linking in gl with -lGL but not glu. Try adding -lGLU and see if that helps. – Stuart Golodetz. Feb 26, 2012 at 15:49. possible duplicate of undefined reference to `gluOrtho2D'. WebMar 28, 2008 · The gluOrtho2D function sets up a two-dimensional orthographic viewing region. This is equivalent to calling glOrtho with near = 1 and far = 1. Requirements ** Windows NT/2000:** Requires Windows NT 3.5 or later. ** Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95. ranked colleges in usa
gluOrtho2D函数说明 - 知乎 - 知乎专栏
WebSep 24, 2024 · gluOrtho2D函式會定義 2D 正視投影矩陣。 語法 void WINAPI gluOrtho2D( GLdouble left, GLdouble right, GLdouble top, GLdouble bottom ); 參數. 離開. 左垂直裁剪平面的座標。 對. 右垂直裁剪平面的座標。 top. 頂端水準裁剪平面的座標。 底部. 底部水準裁剪平面的座標。 傳回值 WebDec 18, 2009 · 0. glViewport describes the area of your window which will be drawn by OpenGL. glOrtho or gluOrtho2D define a unit system (OpenGL units) which fit into that (via glViewport defined) area. So your line will be drawn within the Viewport from -100,-100 to 100,100. Share. WebJan 24, 2014 · gluOrtho2D sets up a two-dimensional orthographic viewing region. This is equivalent to calling glOrtho with near = -1 and far = 1. @Andon Thanks, my brain reversed those z values on transcription -- … owl bedroom accessories