📄 fglstencilop.ps
字号:
3519(achieve)X3787(special)X554 3262(effects,)N809(such)X976(as)X1063(decals,)X1304(outlining,)X1632(and)X1768(constructive)X2180(solid)X2355(geometry)X2678(rendering.)X554 3396(The)N699(stencil)X928(test)X1059(conditionally)X1501(eliminates)X1850(a)X1906(pixel)X2086(based)X2289(on)X2389(the)X2508(outcome)X2805(of)X2893(a)X2950(comparison)X3345(between)X3634(the)X3753(value)X3948(in)X554 3492(the)N675(stencil)X907(buffer)X1127(and)X1266(a)X1325 0.4531(reference)AX1649(value.)X1866(To)X1978(enable)X2211(and)X2350(disable)X2600(the)X2721(test,)X2875(call)X3 f3014(fglEnable)X1 f3365(and)X3 f3504(fglDisable)X1 f3868(with)X554 3588(argument)N3 f877 -0.2500(GL_STENCIL_TEST)AX1 f1625(;)X1667(to)X1749(control)X1996(it,)X2080(call)X3 f2216(fglStencilFunc)X1 f2709(.)X3 f554 3722(fglStencilOp)N1 f1004(takes)X1194(three)X1380(arguments)X1739(that)X1884(indicate)X2163(what)X2344(happens)X2632(to)X2719(the)X2842(stored)X3063(stencil)X3297(value)X3496(while)X3699(stenciling)X554 3818(is)N628(enabled.)X939(If)X1014(the)X1133(stencil)X1363(test)X1495(fails,)X1674(no)X1775(change)X2024(is)X2098(made)X2293(to)X2376(the)X2495(pixel's)X2734(color)X2919(or)X3006(depth)X3204(buffers,)X3472(and)X2 f3608(fail)X1 f3734(speci\256es)X554 3914(what)N730(happens)X1013(to)X1095(the)X1213(stencil)X1442(buffer)X1659(contents.)X1986(The)X2131(following)X2462(six)X2575(actions)X2822(are)X2941(possible.)X3 f554 4048(GL_KEEP)N1 f1194(Keeps)X1415(the)X1533(current)X1781(value.)X3 f554 4182(GL_ZERO)N1 f1194(Sets)X1347(the)X1465(stencil)X1694(buffer)X1911(value)X2105(to)X2187(0.)X3 f554 4316(GL_REPLACE)N1 f1194(Sets)X1347(the)X1465(stencil)X1694(buffer)X1911(value)X2105(to)X2 f2187(ref)X1 f2276(,)X2316(as)X2403(speci\256ed)X2708(by)X3 f2808(fglStencilFunc)X1 f3301(.)X3 f554 4450(GL_INCR)N1 f1194(Increments)X1586(the)X1719(current)X1982(stencil)X2226(buffer)X2459(value.)X2709(Clamps)X2989(to)X3087(the)X3221(maximum)X3581(representable)X1194 4546(unsigned)N1503(value.)X3 f554 4680(GL_DECR)N1 f1194(Decrements)X1598(the)X1716(current)X1964(stencil)X2193(buffer)X2410(value.)X2644(Clamps)X2908(to)X2990(0.)X3 f554 4814(GL_INVERT)N1 f1194(Bitwise)X1458(inverts)X1696(the)X1814(current)X2062(stencil)X2291(buffer)X2508(value.)X554 4948(Stencil)N808(buffer)X1037(values)X1274(are)X1405(treated)X1656(as)X1756(unsigned)X2078(integers.)X2405(When)X2630(incremented)X3060(and)X3209(decremented,)X3673(values)X3911(are)X554 5044(clamped)N846(to)X928(0)X988(and)X1124($2)X1224(sup)X1355(n)X1415(-)X1462(1$,)X1582(where)X1799($n$)X1939(is)X2012(the)X2130(value)X2324(returned)X2612(by)X2712(querying)X3 f3017 -0.2321(GL_STENCIL_BITS)AX1 f3743(.)X554 5178(The)N701(other)X888(two)X1030(arguments)X1386(to)X3 f1470(fglStencilOp)X1 f1918(specify)X2172(stencil)X2403(buffer)X2622(actions)X2871(that)X3014(depend)X3269(on)X3372(whether)X3654(subsequent)X554 5274(depth)N752(buffer)X969(tests)X1131(succeed)X1406(\()X2 f1433(zpass)X1 f1606(\))X1653(or)X1740(fail)X1867(\()X2 f1894(zfail)X1 f2031(\))X2078(\(see)X3 f554 5370(fglDepthFunc)N1 f1025(\).)X1115(The)X1264(actions)X1515(are)X1638(speci\256ed)X1947(using)X2144(the)X2266(same)X2455(six)X2572(symbolic)X2889(constants)X3211(as)X2 f3302(fail)X1 f3408(.)X3472(Note)X3652(that)X2 f3796(zfail)X1 f3957(is)X554 5466(ignored)N828(when)X1031(there)X1221(is)X1303(no)X1412(depth)X1619(buffer,)X1865(or)X1961(when)X2164(the)X2291(depth)X2498(buffer)X2724(is)X2806(not)X2936(enabled.)X3254(In)X3349(these)X3542(cases,)X2 f3760(fail)X1 f3894(and)X2 f554 5562(zpass)N1 f747(specify)X999(stencil)X1228(action)X1444(when)X1638(the)X1756(stencil)X1985(test)X2116(fails)X2274(and)X2410(passes,)X2655(respectively.)X9 s266 5696(N)N268(NO)X322(OT)X376(TE)X422(ES)X468(S)X10 s554 5792(Initially)N830(the)X951(stencil)X1184(test)X1319(is)X1396(disabled.)X1727(If)X1805(there)X1990(is)X2067(no)X2171(stencil)X2404(buffer,)X2645(no)X2749(stencil)X2982(modi\256cation)X3410(can)X3546(occur)X3749(and)X3889(it)X3957(is)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(F)N268(FG)X310(GL)X364(LS)X410(ST)X452(TE)X498(EN)X544(NC)X598(CI)X648(IL)X674(LO)X720(OP)X774(P)X820(\()X822(\()X858(\))X860(\))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)X3392(F)X3394(FG)X3436(GL)X3490(LS)X3536(ST)X3578(TE)X3624(EN)X3670(NC)X3724(CI)X3774(IL)X3800(LO)X3846(OP)X3900(P)X3946(\()X3948(\()X3984(\))X3986(\))X10 s554 864(as)N641(if)X710(the)X828(stencil)X1057(tests)X1219(always)X1462(pass,)X1640(regardless)X1986(of)X2073(any)X2209(call)X2345(to)X3 f2427(fglStencilOp)X1 f2853(.)X9 s266 998(E)N268(ER)X314(RR)X364(RO)X414(OR)X468(RS)X518(S)X3 f10 s554 1094(GL_INVALID_ENUM)N1 f1365(is)X1442(generated)X1779(if)X2 f1852(fail)X1 f1958(,)X2 f2002(zfail)X1 f2139(,)X2183(or)X2 f2274(zpass)X1 f2471(is)X2548(any)X2689(value)X2888(other)X3078(than)X3241(the)X3364(six)X3482(de\256ned)X3743(constant)X554 1190(values.)N3 f554 1324(GL_INVALID_OPERATION)N1 f1600(is)X1673(generated)X2006(if)X3 f2075(fglStencilOp)X1 f2521(is)X2594(executed)X2900(between)X3188(the)X3306(execution)X3638(of)X3 f3726(fglBegin)X1 f554 1420(and)N690(the)X808(corresponding)X1287(execution)X1619(of)X3 f1706(fglEnd)X1 f1936(.)X9 s266 1554(A)N268(AS)X322(SS)X364(SO)X406(OC)X460(CI)X510(IA)X536(AT)X590(TE)X636(ED)X682(D)X766(G)X768(GE)X822(ET)X868(TS)X914(S)X3 f10 s554 1650(fglGet)N1 f788(with)X950(argument)X3 f1273(GL_STENCIL_FAIL)X554 1746(fglGet)N1 f788(with)X950(argument)X3 f1273 -0.1500(GL_STENCIL_PASS_DEPTH_PASS)AX554 1842(fglGet)N1 f788(with)X950(argument)X3 f1273 -0.1300(GL_STENCIL_PASS_DEPTH_FAIL)AX554 1938(fglGet)N1 f788(with)X950(argument)X3 f1273 -0.2321(GL_STENCIL_BITS)AX554 2034(fglIsEnabled)N1 f1008(with)X1170(argument)X3 f1493 -0.2500(GL_STENCIL_TEST)AX1 f9 s266 2168(S)N268(SE)X310(EE)X356(E)X432(A)X434(AL)X488(LS)X534(SO)X576(O)X3 f10 s554 2264(fglAlphaFunc)N1 f1024(,)X3 f1064(fglBlendFunc)X1 f1525(,)X3 f1565(fglDepthFunc)X1 f2036(,)X3 f2076(fglEnable)X1 f2404(,)X3 f2444(fglLogicOp)X1 f2830(,)X3 f2870(fglStencilFunc)X1 f266 6144(July)N419(22,)X539(1997)X3794(Page)X3970(2)X10 f0 6428(h)N24(hhh)X4176(h)X4200(hhh)X2 p%%Trailerxtxs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -