⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fglubuild2dmipmaps.ps

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 PS
📖 第 1 页 / 共 2 页
字号:
1562(,)X3 f1675(GL_UNSIGNED_SHORT)X1 f2571(,)X3 f2684(GL_SHORT)X1 f3118(,)X3 f3231(GL_UNSIGNED_INT)X1 f3990(,)X3 f1087 4260(GL_INT)N1 f1384(,)X1424(or)X3 f1511(GL_FLOAT)X1 f1941(.)X2 f554 4394(data)N1 f1087(Speci\256es)X1396(a)X1452(pointer)X1699(to)X1781(the)X1899(image)X2115(data)X2269(in)X2351(memory.)X9 s266 4528(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 4624(fgluBuild2DMipmaps)N1 f1324(builds)X1549(a)X1615(series)X1828(of)X1925(pre\256ltered)X2286(2-D)X2442(texture)X2696(maps)X2896(of)X2994(decreasing)X3369(resolutions)X3751(called)X3974(a)X554 4720(mipmap.)N856(This)X1018(is)X1091(used)X1258(for)X1372(the)X1490(antialiasing)X1879(of)X1966(texture)X2209(mapped)X2483(primitives.)X554 4854(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 4988(Initially,)N850(the)X2 f971(width)X1 f1171(and)X2 f1310(height)X1 f1534(of)X2 f1625(data)X1 f1791(are)X1914(checked)X2202(to)X2288(see)X2415(if)X2488(they)X2650(are)X2773(a)X2833(power)X3058(of)X3149(two.)X3313(If)X3391(not,)X3537(a)X3597(copy)X3777(of)X2 f3868(data)X1 f554 5084(\(not)N2 f709(data)X1 f851(\),)X924(is)X1003(scaled)X1230(up)X1336(or)X1429(down)X1633(to)X1721(the)X1845(nearest)X2099(power)X2326(of)X2419(two.)X2585(This)X2753(copy)X2935(will)X3085(be)X3187(used)X3359(for)X3478(subsequent)X3859(mip-)X554 5180(mapping)N858(operations)X1216(described)X1548(below.)X1789(\(If)X2 f1895(width)X1 f2097(or)X2 f2189(height)X1 f2414(is)X2492(exactly)X2749(between)X3042(powers)X3299(of)X3391(2,)X3476(then)X3639(the)X3762(copy)X3943(of)X2 f554 5276(data)N1 f720(will)X868(scale)X1053(upwards.\))X1416(For)X1551(example,)X1867(if)X2 f1940(width)X1 f2140(is)X2216(57)X2319(and)X2 f2458(height)X1 f2681(is)X2757(23)X2860(then)X3021(a)X3080(copy)X3259(of)X2 f3349(data)X1 f3514(will)X3661(scale)X3845(up)X3948(to)X554 5372(64)N654(and)X790(down)X988(to)X1070(16,)X1190(respectively,)X1618(before)X1844(mipmapping)X2268(takes)X2453(place.)X554 5506(Then,)N759(proxy)X966(textures)X1240(\(see)X3 f1390(glTexImage2D)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 5602(texture.)N822(If)X901(not,)X1048(both)X1215(dimensions)X1604(are)X1728(continually)X2113(halved)X2352(until)X2523(it)X2592(\256ts.)X2734(\(If)X2840(the)X2963(OpenGL)X3269(version)X3530(is)X3608(<=)X3723(1.0,)X3868(both)X554 5698(maximum)N914(texture)X1173(dimensions)X1573(are)X1708(clamped)X2016(to)X2114(the)X2248(value)X2458(returned)X2762(by)X3 f2879(glGetIntegerv)X1 f3393(with)X3572(the)X3707(argument)X3 f554 5794(GL_MAX_TEXTURE_SIZE)N1 f1548(.\))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(D2)X694(2D)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(D2)X3512(2D)X3550(DM)X3604(MI)X3670(IP)X3696(PM)X3738(MA)X3804(AP)X3858(PS)X3900(S)X3946(\()X3948(\()X3984(\))X3986(\))X10 s554 864(Next,)N755(a)X816(series)X1025(of)X1118(mipmap)X1406(levels)X1619(is)X1698(built)X1870(by)X1976(decimating)X2358(a)X2420(copy)X2602(of)X2 f2695(data)X1 f2863(in)X2951(half)X3102(along)X3306(both)X3474(dimensions)X3864(until)X554 960(size)N700(1x1)X841(is)X915(reached.)X1206(At)X1306(each)X1474(level,)X1670(each)X1838(texel)X2014(in)X2096(the)X2214(halved)X2448(mipmap)X2730(level)X2906(is)X2979(an)X3075(average)X3346(of)X3433(the)X3551(corresponding)X554 1056(four)N715(texels)X929(in)X1018(the)X1143(larger)X1358(mipmap)X1647(level.)X1850(\(In)X1971(the)X2097(case)X2264(of)X2359(rectangular)X2749(images,)X3024(the)X3150(decimation)X3534(will)X3686(ultimately)X554 1152(reach)N749(an)X845(N)X923(x)X983(1)X1043(or)X1130(1)X1190(x)X1250(N)X1328(con\256guration.)X1795(Here,)X1992(two)X2132(texels)X2339(are)X2458(averaged)X2769(instead.\))X3 f554 1286(glTexImage2D)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 1382(is)N631(log2\(max\(width,height\)\).)X1485(For)X1620(example,)X1936(if)X2009(width)X2214(is)X2290(64)X2393(and)X2532(height)X2755(is)X2831(16)X2934(and)X3073(the)X3194(implementation)X3719(can)X3854(store)X554 1478(a)N618(texture)X869(of)X964(this)X1107(size,)X1280(the)X1406(following)X1745(mipmap)X2035(levels)X2250(are)X2377(built:)X2573(64x16,)X2821(32x8,)X3029(16x4,)X3238(8x2,)X3407(4x1,)X3576(2x1)X3725(and)X3870(1x1.)X554 1574(These)N766(correspond)X1143(to)X1225(levels)X1432(0)X1492(through)X1761(6,)X1841(respectively.)X554 1708(See)N706(the)X3 f840(glTexImage1D)X1 f1379 0.4531(reference)AX1716(page)X1904(for)X2034(a)X2107(description)X2500(of)X2604(the)X2739(acceptable)X3116(values)X3358(for)X2 f3489(format)X1 f3702(.)X3759(See)X3912(the)X3 f554 1804(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(type)X1 f3105(.)X9 s266 1938(N)N268(NO)X322(OT)X376(TE)X422(ES)X468(S)X10 s554 2034(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 2130 0.2109(TexLevelParameter)AN1 f1237(.)X1279(First,)X1467(query)X1671(for)X1786(the)X1905(width)X2108(&)X2191(height)X2412(actually)X2687(used)X2855(at)X2934(level)X3111(0.)X3192(\(The)X3365(width)X3568(&)X3651(height)X3872(may)X554 2226(not)N682(be)X784(equal)X984(to)X2 f1072(width)X1 f1275(&)X2 f1363(height)X1 f1589(respectively)X2003(since)X2194(proxy)X2407(textures)X2687(might)X2900(have)X3079(scaled)X3307(them)X3494(to)X3583(\256t)X3676(the)X3801(imple-)X554 2322(mentation.\))N941(Then)X1126(the)X1244(maximum)X1588(level)X1764(can)X1896(be)X1992(derived)X2253(from)X2429(the)X2547(formula)X2821(log2\(max\(width,height\)\).)X9 s266 2456(E)N268(ER)X314(RR)X364(RO)X414(OR)X468(RS)X518(S)X3 f10 s554 2552(GLU_INVALID_VALUE)N1 f1454(is)X1527(returned)X1815(if)X2 f1884(width)X1 f2081(or)X2 f2168(height)X1 f2388(are)X2507(<)X2572(1.)X3 f554 2686(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 2820(S)N268(SE)X310(EE)X356(E)X432(A)X434(AL)X488(LS)X534(SO)X576(O)X3 f10 s554 2916(glDrawPixels)N1 f1008(,)X3 f1048(glTexImage1D)X1 f1551(,)X3 f1591(glTexImage2D)X1 f2094(,)X3 f2134(fgluBuild1DMipmaps)X1 f2874(,)X3 f554 3012(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 + -