📄 xintro.ps
字号:
634 5296(Display)N903(*dpy;)X634 5392(XVisualInfo)N1055(*vi;)X634 5488(Colormap)N974(cmap;)X634 5584(XSetWindowAttributes)N1410(swa;)X634 5680(Window)N930(win;)X634 5776(GLXContext)N1072(cx;)X266 6144(Page)N442(1)X3577(July)X3730(22,)X3850(1997)X2 p%%Page: 2 210 s 0 xH 0 xS 1 f10 f0 96(h)N24(hhh)X4176(h)X4200(hhh)X9 s1 f266 480(G)N268(GL)X322(LX)X368(XI)X422(IN)X448(NT)X502(TR)X548(RO)X598(O)X656(\()X658(\()X694(\))X696(\))X1885(U)X1887(UN)X1941(NI)X1995(IX)X2021(X)X2093(S)X2095(Sy)X2137(ys)X2175(st)X2205(te)X2227(em)X2261(m)X2337(V)X2339(V)X3556(G)X3558(GL)X3612(LX)X3658(XI)X3712(IN)X3738(NT)X3792(TR)X3838(RO)X3888(O)X3946(\()X3948(\()X3984(\))X3986(\))X10 s634 864(XEvent)N899(event;)X634 960(int)N738(swap_\257ag)X1083(=)X1148(FALSE;)X634 1248(/*)N716(get)X834(a)X890(connection)X1262(*/)X634 1344(dpy)N774(=)X839(XOpenDisplay\(0\);)X634 1536(/*)N716(get)X834(an)X930(appropriate)X1316(visual)X1527(*/)X634 1632(vi)N716(=)X781(glXChooseVisual\(dpy,)X1537 0.1806(DefaultScreen\(dpy\),)AX2211(attributeListSgl\);)X634 1728(if)N703(\(vi)X812(==)X922(NULL\))X1183({)X694 1824(vi)N776(=)X841(glXChooseVisual\(dpy,)X1597 0.1806(DefaultScreen\(dpy\),)AX2271(attributeListDbl\);)X694 1920(swap_\257ag)N1039(=)X1104(TRUE;)X634 2016(})N634 2208(/*)N716(create)X929(a)X985(GLX)X1170(context)X1426(*/)X634 2304(cx)N730(=)X795(glXCreateContext\(dpy,)X1565(vi,)X1667(0,)X1747(GL_TRUE\);)X634 2496(/*)N716(create)X929(a)X985(color)X1170(map)X1328(*/)X634 2592(cmap)N836(=)X909(XCreateColormap\(dpy,)X1692(RootWindow\(dpy,)X2318(vi->screen\),)X3665(vi->visual,)X554 2688(AllocNone\);)N634 2880(/*)N716(create)X929(a)X985(window)X1263(*/)X634 2976(swa.colormap)N1102(=)X1167(cmap;)X634 3072(swa.border_pixel)N1209(=)X1274(0;)X634 3168(swa.event_mask)N1182(=)X1247(StructureNotifyMask;)X634 3264(win)N774(=)X839(XCreateWindow\(dpy,)X1570(RootWindow\(dpy,)X2188(vi->screen\),)X2595(0,)X2675(0,)X2755(100,)X2915(100,)X1034 3360(0,)N1114(vi->depth,)X1466(InputOutput,)X1897(vi->visual,)X1034 3456(CWBorderPixel)N9 f1550(|)X1 f(CWColormap)S9 f2015(|)X1 f(CWEventMask,)S2565(&swa\);)X634 3552(XMapWindow\(dpy,)N1302(win\);)X634 3648(XIfEvent\(dpy,)N1120(&event,)X1396(WaitForNotify,)X1912(\(char*\)win\);)X634 3840(/*)N716(connect)X986(the)X1104(context)X1360(to)X1442(the)X1560(window)X1838(*/)X634 3936(glXMakeCurrent\(dpy,)N1369(win,)X1529(cx\);)X634 4128(/*)N716(clear)X893(the)X1011(buffer)X1228(*/)X634 4224(glClearColor\(1,1,0,1\);)N634 4320(glClear\(GL_COLOR_BUFFER_BIT\);)N634 4416(glFlush\(\);)N634 4512(if)N703(\(swap_\257ag\))X1102(glXSwapBuffers\(dpy,win\);)X634 4704(/*)N716(wait)X874(a)X930(while)X1128(*/)X634 4800(sleep\(10\);)N975(})X9 s266 4934(N)N268(NO)X322(OT)X376(TE)X422(ES)X468(S)X10 s554 5030(A)N632(color)X817(map)X975(must)X1150(be)X1246(created)X1499(and)X1635(passed)X1869(to)X3 f1951(XCreateWindow)X1 f2530(.)X2590(See)X2726(the)X2844(preceding)X3181(example)X3473(code.)X554 5164(A)N641(GLX)X835(context)X1100(must)X1284(be)X1389(created)X1651(and)X1796(attached)X2093(to)X2184(an)X2289(X)X2376(drawable)X2700(before)X2935(OpenGL)X3246(commands)X3623(can)X3765(be)X3871(exe-)X554 5260(cuted.)N788(OpenGL)X1089(commands)X1456(issued)X1676(while)X1874(no)X1974(context/drawable)X2547(pair)X2692(is)X2765(current)X3013(result)X3211(in)X3293(unde\256ned)X3629(behavior.)X554 5394(Exposure)N878(events)X1104(indicate)X1379(that)X2 f1520(all)X1 f1625(buffers)X1874(associated)X2225(with)X2388(the)X2507(speci\256ed)X2813(window)X3092(may)X3251(be)X3348(damaged)X3659(and)X3797(should)X554 5490(be)N653(repainted.)X1015(Although)X1340(certain)X1582(buffers)X1833(of)X1923(some)X2115(visuals)X2359(on)X2461(some)X2652(systems)X2927(may)X3087(never)X3288(require)X3538(repainting)X3885(\(the)X554 5586(depth)N756(buffer,)X997(for)X1116(example\),)X1460(it)X1529(is)X1607(incorrect)X1918(to)X2005(write)X2195(a)X2256(program)X2553(assuming)X2880(that)X3025(these)X3215(buffers)X3468(will)X3617(not)X3744(be)X3845(dam-)X554 5682(aged.)N266 6144(July)N419(22,)X539(1997)X3794(Page)X3970(2)X3 p%%Page: 3 310 s 0 xH 0 xS 1 f10 f0 96(h)N24(hhh)X4176(h)X4200(hhh)X9 s1 f266 480(G)N268(GL)X322(LX)X368(XI)X422(IN)X448(NT)X502(TR)X548(RO)X598(O)X656(\()X658(\()X694(\))X696(\))X1885(U)X1887(UN)X1941(NI)X1995(IX)X2021(X)X2093(S)X2095(Sy)X2137(ys)X2175(st)X2205(te)X2227(em)X2261(m)X2337(V)X2339(V)X3556(G)X3558(GL)X3612(LX)X3658(XI)X3712(IN)X3738(NT)X3792(TR)X3838(RO)X3888(O)X3946(\()X3948(\()X3984(\))X3986(\))X10 s554 864(GLX)N770(commands)X1168(manipulate)X1575(XVisualInfo)X2027(structures)X2390(rather)X2629(than)X2818(pointers)X3127(to)X3240(visuals)X3513(or)X3631(visual)X3874(IDs.)X554 960(XVisualInfo)N987(structures)X1330(contain)X2 f1597(visual)X1 f1788(,)X2 f1839(visualID)X1 f2115(,)X2 f2166(screen)X1 f2376(,)X2427(and)X2 f2574(depth)X1 f2783(elements,)X3119(as)X3217(well)X3386(as)X3484(other)X3680(X-speci\256c)X554 1056(information.)N9 s266 1190(U)N268(US)X322(SI)X364(IN)X390(NG)X444(G)X528(G)X530(GL)X584(LX)X630(X)X714(E)X716(EX)X762(XT)X816(TE)X862(EN)X908(NS)X962(SI)X1004(IO)X1030(ON)X1084(NS)X1138(S)X10 s554 1286(All)N683(supported)X1026(GLX)X1218(extensions)X1583(will)X1734(have)X1913(a)X1976(corresponding)X2462(de\256nition)X2795(in)X2884(glx.h)X3073(and)X3217(a)X3281(token)X3487(in)X3577(the)X3703(extension)X554 1382(string)N768(returned)X1068(by)X3 f1179(glXQueryExtensionsString)X1 f2098(.)X2169(For)X2311(example,)X2634(if)X2714(the)X3 f2843(EXT_visual_info)X1 f3450(extension)X3788(is)X3872(sup-)X554 1478(ported,)N807(then)X973(this)X1116(token)X1322(will)X1475(be)X1580(de\256ned)X1845(in)X1936(glx.h)X2127(and)X3 f2272(EXT_visual_info)X1 f2877(will)X3030(appear)X3274(in)X3365(the)X3492(extension)X3828(string)X554 1574(returned)N844(by)X3 f946(glXQueryExtensionsString)X1 f1865(.)X1907(The)X2054(de\256nitions)X2413(in)X2497(glx.h)X2681(can)X2815(be)X2913(used)X3082(at)X3162(compile)X3442(time)X3606(to)X3689(determine)X554 1670(if)N623(procedure)X965(calls)X1132(corresponding)X1611(to)X1693(an)X1789(extension)X2116(exist)X2287(in)X2369(the)X2487(library.)X554 1804(OpenGL)N855(itself)X1035(has)X1162(also)X1311(been)X1483(extended.)X1813(Refer)X2012(to)X3 f2094(glIntro)X1 f2354(for)X2468(more)X2653(information.)X9 s266 1938(G)N268(GL)X322(LX)X368(X)X452(1)X454(1.)X492(.1)X512(1)X580(a)X582(an)X616(nd)X654(d)X722(G)X724(GL)X778(LX)X824(X)X908(1)X910(1.)X948(.2)X968(2)X10 s554 2034(GLX)N739(1.2)X859(is)X932(now)X1090(supported.)X1446(It)X1515(is)X1588(backward)X1921(compatible)X2297(with)X2459(GLX)X2644(1.1)X2764(and)X2900(GLX)X3085(1.0.)X554 2168(GLX)N801(1.2)X983(corresponds)X1453(to)X1598(OpenGL)X1962(version)X2281(1.1)X2464(and)X2663(introduces)X3080(the)X3261(following)X3655(new)X3872(call:)X3 f554 2264(glGetCurrentDisplay)N1 f1279(.)X554 2398(GLX)N748(1.1)X877(corresponds)X1294(to)X1385(OpenGL)X1695(version)X1960(1.0)X2089(and)X2234(introduces)X2597(the)X2724(following)X3064(new)X3227(calls:)X3 f3445(glXQueryExten-)X554 2494(sionsString)N1 f935(,)X3 f975(glXQueryServerString)X1 f1754(,)X1794(and)X3 f1930(glXGetClientString)X1 f2597(.)X554 2628(Call)N3 f712(glQueryVersion)X1 f1284(to)X1371(determine)X1717(at)X1800(runtime)X2074(what)X2255(version)X2516(of)X2608(GLX)X2799(is)X2878(available.)X3 f3214(glQueryVersion)X1 f3787(returns)X554 2724(the)N678(version)X940(that)X1086(is)X1165(supported)X1507(on)X1613(the)X1737(connection.)X2135(Thus)X2321(if)X2396(1.2)X2522(is)X2601(returned,)X2914(both)X3081(the)X3204(client)X3407(and)X3548(server)X3770(support)X554 2820(GLX)N743(1.2.)X907(You)X1069(can)X1205(also)X1358(check)X1571(the)X1694(GLX)X1884(version)X2145(at)X2228(compile)X2511(time:)X2700(GLX_VERSION_1_1)X3437(will)X3586(be)X3687(de\256ned)X3948(in)X554 2916(glx.h)N743(if)X819(GLX)X1011(1.1)X1138(calls)X1312(are)X1438(supported)X1781(and)X1924(GLX_VERSION_1_2)X2663(will)X2814(be)X2917(de\256ned)X3180(if)X3256(GLX)X3448(1.2)X3574(calls)X3747(are)X3872(sup-)X554 3012(ported.)N9 s266 3146(S)N268(SE)X310(EE)X356(E)X432(A)X434(AL)X488(LS)X534(SO)X576(O)X3 f10 s554 3242(glIntro)N1 f(,)S3 f834(glFinish)X1 f1108(,)X3 f1148(glFlush)X1 f1400(,)X3 f1440(glXChooseVisual)X1 f2026(,)X3 f2066(glXCopyContext)X1 f2640(,)X3 f554 3338 0.2083(glXCreateContext)AN1 f1179(,)X3 f1219(glXCreateGLXPixmap)X1 f2007(,)X3 f2047(glXDestroyContext)X1 f2707(,)X3 f554 3434(glXGetClientString)N1 f1221(,)X3 f1261(glXGetCon\256g)X1 f1732(,)X3 f1772(glXIsDirect)X1 f2169(,)X3 f2209(glXMakeCurrent)X1 f2806(,)X3 f554 3530(glXQueryExtension)N1 f1229(,)X3 f1381(glXQueryExtensionsString)X1 f2300(,)X3 f2453(glXQueryServerString)X1 f3232(,)X3 f3385(glXQueryVersion)X1 f3990(,)X3 f554 3626(glXSwapBuffers)N1 f(,)S3 f1154(glXUseXFont)X1 f1617(,)X3 f1657(glXWaitGL)X1 f2061(,)X3 f2101(glXWaitX)X1 f2448(,)X3 f2488(XCreateColormap)X1 f3126(,)X3 f3166(XCreateWindow)X1 f3745(,)X3 f3785(XSync)X1 f266 6144(Page)N442(3)X3577(July)X3730(22,)X3850(1997)X10 f0 6428(h)N24(hhh)X4176(h)X4200(hhh)X3 p%%Trailerxtxs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -