📄 fglubuild1dmipmaps.ps
字号:
3 f2889(GL_RGBA)X1 f3275(,)X3 f3332(GL_LUMINANCE)X1 f3990(,)X1087 3838(and)N3 f1223(GL_LUMINANCE_ALPHA)X1 f2201(.)X2 f554 3972(type)N1 f1087(Speci\256es)X1405(the)X1532(data)X1695(type)X1862(for)X2 f1985(data)X1 f2127(.)X2196(Must)X2389(be)X2494(one)X2639(of)X3 f2735(GL_UNSIGNED_BYTE)X1 f3569(,)X3 f3618(GL_BYTE)X1 f3990(,)X3 f1087 4068(GL_BITMAP)N1 f1562(,)X3 f1675(GL_UNSIGNED_SHORT)X1 f2571(,)X3 f2684(GL_SHORT)X1 f3118(,)X3 f3231(GL_UNSIGNED_INT)X1 f3990(,)X3 f1087 4164(GL_INT)N1 f1384(,)X1424(or)X3 f1511(GL_FLOAT)X1 f1941(.)X2 f554 4298(data)N1 f1087(Speci\256es)X1396(a)X1452(pointer)X1699(to)X1781(the)X1899(image)X2115(data)X2269(in)X2351(memory.)X9 s266 4432(D)N268(DE)X322(ES)X368(SC)X410(CR)X460(RI)X510(IP)X536(PT)X578(TI)X624(IO)X650(ON)X704(N)X3 f10 s554 4528(fgluBuild1DMipmaps)N1 f1324(builds)X1549(a)X1615(series)X1828(of)X1925(pre\256ltered)X2286(1-D)X2442(texture)X2696(maps)X2896(of)X2994(decreasing)X3369(resolutions)X3751(called)X3974(a)X554 4624(mipmap.)N856(This)X1018(is)X1091(used)X1258(for)X1372(the)X1490(antialiasing)X1879(of)X1966(texture)X2209(mapped)X2483(primitives.)X554 4758(A)N632(return)X844(value)X1038(of)X1125(0)X1185(indicates)X1490(success,)X1771(otherwise)X2103(a)X2159(GLU)X2344(error)X2521(code)X2693(is)X2766(returned)X3054(\(see)X3 f3204(fgluErrorString)X1 f3751(\).)X554 4892(Initially,)N856(the)X2 f983(width)X1 f1189(of)X2 f1285(data)X1 f1456(is)X1538(checked)X1831(to)X1922(see)X2054(if)X2132(it)X2205(is)X2287(a)X2352(power)X2582(of)X2678(two.)X2847(If)X2930(not,)X3081(a)X3146(copy)X3331(of)X2 f3427(data)X1 f3599(\(not)X2 f3758(data)X1 f3900(\))X3957(is)X554 4988(scaled)N779(up)X883(or)X974(down)X1176(to)X1262(the)X1384(nearest)X1636(power)X1861(of)X1952(two.)X2116(This)X2282(copy)X2462(will)X2610(be)X2710(used)X2881(for)X2998(subsequent)X3377(mipmapping)X3804(opera-)X554 5084(tions)N731(described)X1061(below.)X1299(\(If)X2 f1402(width)X1 f1601(is)X1676(exactly)X1930(between)X2220(powers)X2474(of)X2563(2,)X2645(then)X2805(the)X2926(copy)X3105(of)X2 f3195(data)X1 f3360(will)X3507(scale)X3691(upwards.\))X554 5180(For)N685(example,)X997(if)X2 f1066(width)X1 f1263(is)X1336(57)X1436(then)X1594(a)X1650(copy)X1826(of)X2 f1913(data)X1 f2075(will)X2219(scale)X2400(up)X2500(to)X2582(64)X2682(before)X2908(mipmapping)X3332(takes)X3517(place.)X554 5314(Then,)N759(proxy)X966(textures)X1240(\(see)X3 f1390(glTexImage1D)X1 f1893(\))X1940(are)X2059(used)X2226(to)X2309(determine)X2651(if)X2721(the)X2840(implementation)X3363(can)X3496(\256t)X3583(the)X3702(requested)X554 5410(texture.)N817(If)X891(not,)X2 f1033(width)X1 f1230(is)X1303(continually)X1683(halved)X1917(until)X2083(it)X2147(\256ts.)X554 5544(Next,)N750(a)X806(series)X1009(of)X1097(mipmap)X1380(levels)X1588(is)X1662(built)X1829(by)X1930(decimating)X2307(a)X2364(copy)X2541(of)X2 f2629(data)X1 f2792(in)X2875(half)X3021(until)X3188(size)X3334(1)X3395(is)X3469(reached.)X3761(At)X3862(each)X554 5640(level,)N760(each)X938(texel)X1124(in)X1215(the)X1342(halved)X1585(mipmap)X1876(level)X2061(is)X2143(an)X2248(average)X2528(of)X2624(the)X2751(corresponding)X3239(two)X3388(texels)X3604(in)X3695(the)X3822(larger)X554 5736(mipmap)N836(level.)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(LU)X410(UB)X464(BU)X514(UI)X568(IL)X594(LD)X640(D1)X694(1D)X732(DM)X786(MI)X852(IP)X878(PM)X920(MA)X986(AP)X1040(PS)X1082(S)X1128(\()X1130(\()X1166(\))X1168(\))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)X3084(F)X3086(FG)X3128(GL)X3182(LU)X3228(UB)X3282(BU)X3332(UI)X3386(IL)X3412(LD)X3458(D1)X3512(1D)X3550(DM)X3604(MI)X3670(IP)X3696(PM)X3738(MA)X3804(AP)X3858(PS)X3900(S)X3946(\()X3948(\()X3984(\))X3986(\))X3 f10 s554 864(glTexImage1D)N1 f1079(is)X1154(called)X1368(to)X1452(load)X1612(each)X1782(of)X1871(these)X2059(mipmap)X2344(levels.)X2594(Level)X2800(0)X2863(is)X2939(a)X2998(copy)X3177(of)X2 f3267(data)X1 f3409(.)X3452(The)X3600(highest)X3854(level)X554 960(is)N630(log2\(width\).)X1071(For)X1205(example,)X1520(if)X1592(width)X1797(is)X1873(64)X1976(and)X2115(the)X2236(implementation)X2761(can)X2896(store)X3075(a)X3134(texture)X3380(of)X3470(this)X3607(size,)X3774(the)X3894(fol-)X554 1056(lowing)N804(mipmap)X1094(levels)X1309(are)X1436(built:)X1632(64x1,)X1840(32x1,)X2048(16x1,)X2256(8x1,)X2424(4x1,)X2593(2x1)X2742(and)X2887(1x1.)X3056(These)X3277(correspond)X3663(to)X3754(levels)X3970(0)X554 1152(through)N823(6,)X903(respectively.)X554 1286(See)N711(the)X3 f850(glTexImage1D)X1 f1395 0.4531(reference)AX1738(page)X1932(for)X2068(a)X2146(description)X2544(of)X2653(the)X2793(acceptable)X3175(values)X3422(for)X2 f3558(type)X1 f3692(.)X3754(See)X3912(the)X3 f554 1382(glDrawPixels)N1 f1028 0.4531(reference)AX1349(page)X1521(for)X1635(a)X1691(description)X2067(of)X2154(the)X2272(acceptable)X2632(values)X2857(for)X2 f2971(data)X1 f3113(.)X9 s266 1516(N)N268(NO)X322(OT)X376(TE)X422(ES)X468(S)X10 s554 1612(Note)N733(that)X876(there)X1060(is)X1137(no)X1241(direct)X1448(way)X1606(of)X1697(querying)X2006(the)X2128(maximum)X2476(level.)X2676(This)X2842(can)X2978(be)X3078(derived)X3343(indirectly)X3674(via)X3 f3796(glGet-)X554 1708 0.2109(TexLevelParameter)AN1 f1237(.)X1285(First,)X1479(query)X1690(for)X1812(the)X1938(width)X2148(actually)X2430(used)X2605(at)X2691(level)X2875(0.)X2962(\(The)X3141(width)X3350(may)X3515(not)X3644(be)X3747(equal)X3948(to)X2 f554 1804(width)N1 f752(since)X938(proxy)X1146(textures)X1421(might)X1628(have)X1801(scaled)X2023(it)X2088(to)X2171(\256t)X2258(the)X2378(implementation.\))X2969(Then)X3156(the)X3276(maximum)X3622(level)X3800(can)X3934(be)X554 1900(derived)N815(from)X991(the)X1109(formula)X1383(log2\(width\).)X9 s266 2034(E)N268(ER)X314(RR)X364(RO)X414(OR)X468(RS)X518(S)X3 f10 s554 2130(GLU_INVALID_VALUE)N1 f1454(is)X1527(returned)X1815(if)X2 f1884(width)X1 f2081(is)X2154(<)X2219(1.)X3 f554 2264(GLU_INVALID_ENUM)N1 f1419(is)X1492(returned)X1780(if)X2 f1849(internalFormat)X1 f2342(,)X2 f2382(format)X1 f2615(or)X2 f2702(type)X1 f2856(are)X2975(not)X3097(legal.)X9 s266 2398(S)N268(SE)X310(EE)X356(E)X432(A)X434(AL)X488(LS)X534(SO)X576(O)X3 f10 s554 2494(glDrawPixels)N1 f1008(,)X3 f1048(glTexImage1D)X1 f1551(,)X3 f1591(glTexImage2D)X1 f2094(,)X3 f2134(fgluBuild2DMipmaps)X1 f2874(,)X3 f554 2590(fgluErrorString)N1 f1101(,)X3 f1141(fgluScaleImage)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 + -