Scroll to navigation

GLUBUILD1DMIPMAPS(3G) GLUBUILD1DMIPMAPS(3G)

̾??

gluBuild1DMipmaps - 1 ?????Υߥåץޥåפ?????

????

GLint gluBuild1DMipmaps( GLenum target,

	GLint internalFormat,
	GLsizei width,
	GLenum format,
	GLenum type,
	const void *data )

??????

?оݤΥƥ????????????ꤹ?롣 GL_TEXTURE_1D ?Ǥʤ????Фʤ??ʤ???
?ƥ??????㥤?᡼??????????Ǽ?ΰ????׵᤹?롣 SGI ?ˤ????ǿ??С????????? GLU ?μ????Ǥϡ?GLU ?????ƤӽФ????? OpenGL ?μ????ˤ????ͤ??Ϥ??????ͤ????????Υ????å??ϹԤ????ʤ??? OpenGL ?μ??????????դ??ʤ??ͤϡ?OpenGL ?Υ??顼?Ȥʤ롣 GLU ?Υ??٥????ͤΥ????å??򤷤ʤ????Ȥ??????ϡ?GLU ?μ????Υ??ӥ????? ?????????ʤ??Ƥ? OpenGL ?ε?ǽ??ĥ?Ȥ??ƥƥ????????ο????? ?????ե????ޥåȤ??ɲäǤ??뤳?ȤǤ??롣 ?Ť? GLU ?μ????Ϥ????ͤ??????å??????ͤ? 1, 2, 3, 4 ?ޤ??ϰʲ??˼??? ?????ܥ??????Ǥʤ??????˥??顼?Ȥʤ?: GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12, GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4, GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_RGB, GL_R3_G3_B2, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12, GL_RGBA16??
?ƥ??????㥤?᡼?????????ԥ?????ñ?̤ǻ??ꤹ?롣
?ԥ??????ǡ????Υե????ޥåȤ????ꤹ?롣 ?ե????ޥåȤϰʲ??Τ????줫?Ǥʤ????Фʤ??ʤ?: GL_COLOR_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, GL_LUMINANCE, GL_LUMINANCE_ALPHA??
data ?Υǡ??????????ꤹ?롣 ?ǡ??????ϰʲ??Τ????줫?Ǥʤ????Фʤ??ʤ?: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV??
?????????Υ??᡼???ǡ??????ؤ??ݥ??󥿤????ꤹ?롣

????

gluBuild1DMipmaps ?ϥߥåץޥåפȸƤФ??롢?ե??륿???????줿 1 ?????Υƥ????????ޥåפ??????٤򲼤??ʤ????¤٤????Τ????롣 ?ߥåץޥåפϥƥ????????ޥåԥ󥰽????򤷤??ץ??ߥƥ??֤? ???????????ꥢ???????˻Ȥ????롣

?֤??ͤ? 0 ?ʤ?????????ɽ???? ?????ʳ????֤??ͤ? GLU ?Υ??顼?????ɤǤ???(gluErrorString ?? ????)??

?ޤ????ǡ???(data)????(width)?? 2 ?Τ٤????Ǥ??뤫?ɤ????? ?????å??????롣 ?٤????Ǥʤ??????ϡ?data ?Υ??ԡ????????ޤ??Ͻ̾????졢 ?????Ǥ??ᤤ 2 ?Τ٤????ˤʤ??褦??Ĵ???????롣 (width ???դ??ĤΤ٤????ͤΤ??礦?????֤??ä??????ϡ? data ?Υ??ԡ??ϳ??礵???롣) ???Υ??ԡ??????ҤΥߥåץޥå??????ǻȤ????롣 ?㤨?? width ?? 57 ?ʤ??С?data ?Υ??ԡ??? ?ߥåץޥå׽??????????? 64 ?˳??礵???롣

???˥ץ??????ƥ???????(glTexImage1D ?򻲾?)???Ȥäơ? ?׵ᤵ?줿?ƥ????????? OpenGL ?μ????????ƤϤ??????뤫?ɤ?????Ĵ?٤????롣 ???ƤϤ??????ʤ????С????ƤϤ????????褦?ˤʤ??ޤǡ?width ??Ⱦʬ ?ˤ??????????????֤????롣

1×1 is reached. At each level, each texel in the ???ˡ?data ?Υ??ԡ???Ⱦʬ???礭???˴?ά???????????? ???????? 1×1 ?ˤʤ??ޤǷ????֤????Ȥˤ??ꡢ ?ߥåץޥåץ??٥????󤬺??????롣 ???줾???Υ??٥??Ǥϡ?Ⱦʬ?ˤʤä??ߥåץޥåץ??٥??˴ޤޤ??? ?ƥƥ??????ͤϡ??礭???ߥåץޥåץ??٥????Ǥ??????б??????դ??Ĥ? ?ƥ??????ͤ?ʿ???ͤȤʤ롣

glTexImage1D ?Ϥ??????Υߥåץޥåץ??٥??????̤˥????ɤ??뤿?? ?˻Ȥ????롣 ???٥? 0 ?? data ?Υ??ԡ??Ǥ??롣 log2( width ) . ???äȤ??礭?ʥ??٥??? log2( width ) ?Ǥ??롣 64×1 , 32×1 , 16×1 , 8×1 , 4×1 , 2×1 and 1×1 . These correspond to ?㤨?С?width ?? 64 ?Ǥ??ꡢOpenGL ?μ????????Υ??????Υƥ????????? ??Ǽ?Ǥ????????ˤϡ????Υߥåץޥåץ??٥뤬????????: 64×1 , 32×1 , 16×1 , 8×1 4×1 , 2×1 , 1×1 ?? ???????Ͻ??˥??٥? 0 ???? 6 ???б????롣

type ???????˻????Ǥ????ͤ??????ˤĤ??Ƥϡ?glTexImage1D ?? ???ܤ򻲾Ȥ??뤳?ȡ? data ???????˻????Ǥ????ͤ??????ˤĤ??Ƥϡ?glDrawPixels ?? ???ܤ򻲾Ȥ??뤳?ȡ?

????

???????٥???ľ???䤤???碌?????ʤϤʤ????????դ??뤳?ȡ? ???????٥??? glGetTexLevelParameter ???Ȥäƴ???Ū?˵????????롣 ?ǽ??˥??٥? 0 ?Ǽºݤ˻Ȥ????Ƥ????????????롣 (???????? width ?Ȱ㤦???Ȥ????롣?ץ??????ƥ????????? OpenGL ?μ????˹礦?褦?˳??硦?̾??????뤫?⤷???ʤ??????Ǥ??롣) log2( width ) . ?????Ⱥ??????٥??ϸ??? log2( width ) ?Ƿ׻??Ǥ??롣

?ե????ޥå? GL_BGR ?????? GL_BGRA?? ?? GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV ???Ȥ????Τ? GL ?ΥС??????? 1.2 ?ʹߤ????? GLU ?ΥС??????? 1.3 ?ʹ? ?????Ǥ??롣

???顼

width ?? 1 ̤???ʤ??? GLU_INVALID_VALUE ???֤????롣

format ?ޤ??? type ???????ʾ????ˤ? GLU_INVALID_ENUM ???֤????롣

type ?? GL_UNSIGNED_BYTE_3_3_2 ?ޤ??? GL_UNSIGNED_BYTE_2_3_3_REV ?Ǥ??ꡢ???? format ?? GL_RGB ?Ǥʤ??????ˤ? GLU_INVALID_OPERATION ???֤????롣

type ?? GL_UNSIGNED_SHORT_5_6_5 ?ޤ??? GL_UNSIGNED_SHORT_5_6_5_REV ?Ǥ??ꡢ???? format ?? GL_RGB ?Ǥʤ??????ˤ? GLU_INVALID_OPERATION ???֤????롣

type ?? GL_UNSIGNED_SHORT_4_4_4_4 ?ޤ??? GL_UNSIGNED_SHORT_4_4_4_4_REV ?Ǥ??ꡢ???? format ?? GL_RGBA ?? GL_BGRA ?Τ??????Ǥ??ʤ? ?????ˤ? GLU_INVALID_OPERATION ???֤????롣

type ?? GL_UNSIGNED_SHORT_5_5_5_1 ?ޤ??? GL_UNSIGNED_SHORT_1_5_5_5_REV ?Ǥ??ꡢ???? format ?? GL_RGBA ?? GL_BGRA ?Τ??????Ǥ??ʤ? ?????ˤ? GLU_INVALID_OPERATION ???֤????롣

type ?? GL_UNSIGNED_INT_8_8_8_8 ?ޤ??? GL_UNSIGNED_INT_8_8_8_8_REV ?Ǥ??ꡢ???? format ?? GL_RGBA ?? GL_BGRA ?Τ??????Ǥ??ʤ? ?????? GLU_INVALID_OPERATION ???֤????롣

type ?? GL_UNSIGNED_INT_10_10_10_2 ?ޤ??? GL_UNSIGNED_INT_2_10_10_10_REV ?Ǥ??ꡢ???? format ?? GL_RGBA ?? GL_BGRA ?Τ??????Ǥ??ʤ? ?????ˤ? GLU_INVALID_OPERATION ???֤????롣

??Ϣ????

glDrawPixels, glTexImage1D, glTexImage2D, glTexImage3D, gluBuild2DMipmaps, gluBuild3DMipmaps, gluErrorString, glGetTexImage, glGetTexLevelParameter, gluBuild1DMipmapLevels, gluBuild2DMipmapLevels, gluBuild3DMipmapLevels