📄 glut.ps
字号:
3098(boxes)X3314(for)X3437(interactive)X3805(televi-)X554 5064(sion,)N727(and)X863(PCs.)X554 5256(Unfortunately,)N1049(the)X1172(lack)X1331(of)X1423(a)X1484(window)X1767(system)X2014(interface)X2321(for)X2441(OpenGL)X2748(is)X2827(a)X2889(gap)X3031(in)X3119(OpenGL's)X3484(utility.)X3720(Learning)X554 5352(native)N778(window)X1064(system)X1314(APIs)X1502(such)X1677(as)X1772(the)X1898(X)X1984(Window)X2288(System's)X2608(Xlib)X2777(or)X2871(Motif)X3080(can)X3219(be)X3322(daunting.)X3649(Even)X3841(those)X554 5448(familiar)N829(with)X992(native)X1209(window)X1488(system)X1732(APIs)X1914(need)X2088(to)X2172(understand)X2546(the)X2666(interface)X2970(that)X3112(binds)X3307(OpenGL)X3610(to)X3694(the)X3814(native)X554 5544(window)N847(system.)X1124(And)X1297(when)X1506(an)X1617(OpenGL)X1933(program)X2240(is)X2328(written)X2590(using)X2798(the)X2930(native)X3160(window)X3452(system)X3708(interface,)X554 5640(despite)N803(the)X923(portability)X1278(of)X1367(the)X1487(program's)X1839(OpenGL)X2142(rendering)X2472(code,)X2666(the)X2786(program)X3080(itself)X3262(will)X3408(be)X3507(window)X3788(system)X554 5736(dependent.)N266 6144(Page)N442(1)X3577(July)X3730(23,)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)X306(lu)X328(ut)X366(t)X392(\()X394(\()X424(3)X426(3G)X464(GL)X518(LU)X564(UT)X618(T)X668(\))X670(\))X1942(G)X1944(GL)X1998(LU)X2044(UT)X2098(T)X2174(\()X2176(\()X2206(3)X2208(3.)X2246(.5)X2266(5)X2308(\))X2310(\))X3582(g)X3584(gl)X3622(lu)X3644(ut)X3682(t)X3708(\()X3710(\()X3740(3)X3742(3G)X3780(GL)X3834(LU)X3880(UT)X3934(T)X3984(\))X3986(\))X10 s554 864(Testing)N819(and)X960(documenting)X1403(OpenGL's)X1767(functionality)X2201(lead)X2360(to)X2447(the)X2571(development)X3011(of)X3104(the)X3228(tk)X3316(and)X3458(aux)X3600(toolkits.)X3885(The)X554 960(aux)N703(toolkit)X944(is)X1030(used)X1210(in)X1305(the)X1436(examples)X1772(found)X1992(in)X2087(the)X2218(OpenGL)X2532(Programming)X3005(Guide.)X3253(Unfortunately,)X3755(aux)X3903(has)X554 1056(numerous)N891(limitations)X1253(and)X1390(its)X1486(utility)X1697(is)X1772(largely)X2017(limited)X2265(to)X2349(toy)X2473(programs.)X2818(The)X2965(tk)X3049(library)X3285(has)X3414(more)X3601(functionality)X554 1152(than)N715(aux)X854(but)X979(was)X1127(developed)X1480(in)X1565(an)X1664(ad)X1762(hoc)X1900(fashion)X2158(and)X2296(still)X2437(lacks)X2624(much)X2824(important)X3157(functionality)X3588(that)X3730(IRIS)X3903(GL)X554 1248(programmers)N1002(expect,)X1252(like)X1392(pop-up)X1639(menus)X1868(and)X2004(overlays.)X554 1440(GLUT)N795(is)X875(designed)X1187(to)X1276(\256ll)X1391(the)X1516(need)X1695(for)X1816(a)X1879(window)X2164(system)X2413(independent)X2833(programming)X3297(interface)X3607(for)X3729(OpenGL)X554 1536(programs.)N910(The)X1068(interface)X1383(is)X1469(designed)X1786(to)X1880(be)X1988(simple)X2233(yet)X2363(still)X2514(meet)X2702(the)X2832(needs)X3047(of)X3146(useful)X3374(OpenGL)X3687(programs.)X554 1632(Features)N853(from)X1036(the)X1161(IRIS)X1339(GL,)X1493(aux,)X1656(and)X1799(tk)X1888(interfaces)X2229(are)X2356(included)X2660(to)X2750(make)X2952(it)X3024(easy)X3195(for)X3317(programmers)X3773(used)X3948(to)X554 1728(these)N739(interfaces)X1072(to)X1154(develop)X1428(programs)X1751(for)X1865(GLUT.)X9 s266 1862(P)N268(PH)X310(HI)X364(IL)X390(LO)X436(OS)X490(SP)X532(PH)X574(HY)X628(Y)X10 s554 1958(GLUT)N797(simpli\256es)X1136(the)X1263(implementation)X1794(of)X1890(programs)X2222(using)X2424(OpenGL)X2734(rendering.)X3091(The)X3246(GLUT)X3490(application)X3876(pro-)X554 2054(gramming)N908(interface)X1215(\(API\))X1423(requires)X1707(very)X1875(few)X2021(routines)X2304(to)X2391(display)X2647(a)X2707(graphics)X3003(scene)X3206(rendered)X3512(using)X3709(OpenGL.)X554 2150(The)N699(GLUT)X933(API)X1083(\(like)X1251(the)X1370(OpenGL)X1672(API\))X1849(is)X1923(stateful.)X2200(Most)X2385(initial)X2592(GLUT)X2827(state)X2995(is)X3069(de\256ned)X3326(and)X3463(the)X3582(initial)X3789(state)X3957(is)X554 2246(reasonable)N918(for)X1032(simple)X1265(programs.)X554 2438(The)N700(GLUT)X935(routines)X1214(also)X1364(take)X1519(relatively)X1843(few)X1985(parameters.)X2379(No)X2498(pointers)X2777(are)X2897(returned.)X3206(The)X3352(only)X3516(pointers)X3796(passed)X554 2534(into)N707(GLUT)X950(are)X1078(pointers)X1365(to)X1456(character)X1781(strings)X2023(\(all)X2159(strings)X2401(passed)X2644(to)X2735(GLUT)X2978(are)X3106(copied,)X3368(not)X3498 0.4000(referenced\))AX3894(and)X554 2630(opaque)N806(font)X955(handles.)X554 2822(The)N704(GLUT)X943(API)X1098(is)X1177(\(as)X1297(much)X1501(as)X1594(reasonable\))X1991(window)X2275(system)X2523(independent.)X2961(For)X3098(this)X3239(reason,)X3495(GLUT)X3735(does)X3908(not)X554 2918(return)N774(any)X918(native)X1142(window)X1428(system)X1678(handles,)X1971(pointers,)X2277(or)X2372(other)X2564(data)X2725(structures.)X3084(More)X3285(subtle)X3503(window)X3788(system)X554 3014(dependencies)N1013(such)X1186(as)X1279(reliance)X1560(on)X1667(window)X1952(system)X2201(dependent)X2558(fonts)X2745(are)X2871(avoided)X3152(by)X3259(GLUT;)X3522(instead,)X3796(GLUT)X554 3110(supplies)N836(its)X931(own)X1089(\(limited\))X1389(set)X1498(of)X1585(fonts.)X554 3302(For)N687(programming)X1145(ease,)X1326(GLUT)X1562(provides)X1860(a)X1918(simple)X2153(menu)X2353(sub-API.)X2662(While)X2880(the)X3000(menuing)X3302(support)X3564(is)X3640(designed)X3948(to)X554 3398(be)N656(implemented)X1100(as)X1193(pop-up)X1446(menus,)X1701(GLUT)X1941(gives)X2136(window)X2420(system)X2668(leeway)X2922(to)X3010(support)X3275(the)X3398(menu)X3601(functionality)X554 3494(in)N636(another)X897(manner)X1158(\(pull-down)X1534(menus)X1763(for)X1877(example\).)X554 3686(Two)N724(of)X814(the)X935(most)X1113(important)X1447(pieces)X1671(of)X1762(GLUT)X2000(state)X2171(are)X2294(the)X2416(current)X2668(window)X2950(and)X3090(current)X3342(menu.)X3564(Most)X3752(window)X554 3782(and)N708(menu)X924(routines)X1220(affect)X1442(the)X1578(current)X1843(window)X2138(or)X2242(menu)X2457(respectively.)X2902(Most)X3103(callbacks)X3439(implicitly)X3786(set)X3912(the)X554 3878(current)N817(window)X1110(and)X1261(menu)X1474(to)X1571(the)X1705(appropriate)X2107(window)X2401(or)X2504(menu)X2718(responsible)X3119(for)X3249(the)X3383(callback.)X3707(GLUT)X3957(is)X554 3974(designed)N861(so)X954(that)X1096(a)X1154(program)X1448(with)X1612(only)X1776(a)X1834(single)X2047(window)X2327(and/or)X2554(menu)X2754(will)X2900(not)X3024(need)X3198(to)X3282(keep)X3456(track)X3638(of)X3726(any)X3863(win-)X554 4070(dow)N712(or)X799(menu)X997(identi\256ers.)X1377(This)X1539(greatly)X1782(simpli\256es)X2112(very)X2275(simple)X2508(GLUT)X2742(programs.)X554 4262(GLUT)N802(is)X889(designed)X1208(for)X1336(simple)X1583(to)X1679(moderately)X2074(complex)X2384(programs)X2721(focused)X3005(on)X3119(OpenGL)X3434(rendering.)X3796(GLUT)X554 4358(implements)N959(its)X1066(own)X1236(event)X1442(loop.)X1636(For)X1779(this)X1926(reason,)X2188(mixing)X2446(GLUT)X2692(with)X2866(other)X3063(APIs)X3255(that)X3407(demand)X3693(their)X3872(own)X554 4454(event)N748(handling)X1048(structure)X1349(may)X1507(be)X1603(dif\256cult.)X1896(The)X2041(advantage)X2387(of)X2474(a)X2530(builtin)X2758(event)X2952(dispatch)X3239(loop)X3401(is)X3474(simplicity.)X554 4646(GLUT)N788(contains)X1075(routines)X1353(for)X1467(rendering)X1795(fonts)X1975(and)X2111(geometric)X2453(objects,)X2721(however)X3019(GLUT)X3254(makes)X3480(no)X3581(claims)X3811(on)X3912(the)X554 4742(OpenGL)N871(display)X1138(list)X1271(name)X1481(space.)X1715(For)X1861(this)X2011(reason,)X2276(none)X2467(of)X2569(the)X2702(GLUT)X2951(rendering)X3294(routines)X3587(use)X3729(OpenGL)X554 4838(display)N811(lists.)X985(It)X1060(is)X1139(up)X1245(to)X1333(the)X1457(GLUT)X1697(programmer)X2120(to)X2208(compile)X2492(the)X2616(output)X2846(from)X3028(GLUT)X3268(rendering)X3602(routines)X3886(into)X554 4934(display)N805(lists)X953(if)X1022(this)X1157(is)X1230(desired.)X554 5126(GLUT)N788(routines)X1066(are)X1185(logically)X1485(organized)X1822(into)X1966(several)X2214(sub-APIs)X2532(according)X2869(to)X2951(their)X3118(functionality.)X3567(The)X3712(sub-APIs)X554 5222(are:)N554 5356(Initialization.)N842 5452(Command)N1195(line)X1335(processing,)X1718(window)X1996(system)X2238(initialization,)X2682(and)X2818(initial)X3024(window)X3302(creation)X3581(state)X3748(are)X3867(con-)X842 5548(trolled)N1071(by)X1171(these)X1356(routines.)X554 5682(Beginning)N907(Event)X1114(Processing.)X842 5778(This)N1006(routine)X1255(enters)X1469(GLUT's)X1763(event)X1959(processing)X2324(loop.)X2508(This)X2673(routine)X2923(never)X3125(returns,)X3391(and)X
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -