Scroll to navigation

GLXCHOOSEVISUAL() GLXCHOOSEVISUAL()

̾??

glXChooseVisual - ???ꤵ?줿°???˥ޥå??????ӥ??奢?????֤?

????

XVisualInfo* glXChooseVisual( Display *dpy,

	int screen,
	int *attribList )

??????

X ?????Фؤ???³?????ꤹ?롣
?????꡼???ֹ??????ꤹ?롣
?????ͤǤ???°???ȡ??????ͤ?????°???Ȥ????ͤΥڥ??Υꥹ?Ȥ????ꤹ?롣 ?ꥹ?ȤκǸ???°???? None ?Ǥʤ????Фʤ??ʤ???

????

glXChooseVisual ?ϡ??Ǿ??ͤλ????˺Ǥ??褯Ŭ?礹???ӥ??奢????ɽ?? XVisualInfo ??¤?ΤؤΥݥ??󥿤??֤??? ?֤??????ӥ??奢?뤬???ġ??????ͤ????? GLX °???ϻ??ꤵ?줿?ͤ˥ޥå? ?????????ͤ????? GLX °???ϻ??ꤵ?줿?Ǿ??Ͱʾ????ͤȤʤ롣 ¾??°????????Ʊ???Ǥ????С?TrueColor ?ӥ??奢???? DirectColor ?ӥ??奢????????ͥ?褵?졢PseudoColor ?ӥ??奢???? StaticColor ?ӥ??奢????????ͥ?褵???롣 Ŭ?礹???ӥ??奢?뤬¸?ߤ??ʤ????? NULL ???֤????롣 ???δؿ????֤????ǡ??????????????ˤ? XFree ???Ѥ??뤳?ȡ?

?????ͤ????? GLX °???Υǥե??????ͤϡ?GLX_USE_GL ?ξ??????????? ???? False ?Ǥ??롣 GLX_USE_GL ?Υǥե??????ͤ? True ?Ǥ??롣 ?????ͤ????????Ƥ? GLX °???Υǥե??????ͤ? 0 ?Ǥ??롣 ?ǥե????Ȼ????ϡ?attribList ?ꥹ?Ȥ??ޤ??Ǥ???°???ˤ??äƾ??? ???????롣 ?????ͤ?????°???? attribList ?˴ޤޤ??Ƥ????ȡ??????ͤ? True ?Ǥ??????ΤȤ????롣 ??????°???ͤ????󷿤?°???ͤ?ľ???ˤϡ?????°?????б???????˾???ͤޤ? ?ϺǾ??ͤ??֤????롣 ???Υꥹ?Ȥ? None ?ǽ?ü???ʤ????Фʤ??ʤ???

?Ƽ? GLX ?ӥ??奢??°???ϰʲ??Τ褦?˲??ᤵ????:

̵?뤵???롣 GLX ???Ȥäƥ????????󥰲?ǽ?ʥӥ??奢??????????θ?????롣
???θ??ˤϡ????顼?????ǥå????Хåե??δ?˾???????򼨤????Ǥʤ??????? ?֤??ʤ????Фʤ??ʤ??? ?????ǥå????Хåե??ϡ????ʤ??Ȥ????ꤵ?줿?礭????Ķ???롢?Ǥ??????? ?????????????Ǥ??뤳?Ȥ?˾?ޤ????? GLX_RGBA ??ͭ???ʤ??С?????°????̵?뤵???롣
???θ??ˤϡ??Хåե????٥??λ??????Ԥ????????֤??ʤ????Фʤ??ʤ??? ???λ????ϸ?̩?˼??????롣 ?Хåե????٥? 0 ?ϡ??ǥ????ץ쥤?Υᥤ???ե졼???Хåե????б????롣 ?Хåե????٥? 1 ?Ϻǽ??Υ????С??쥤?ե졼???Хåե??Ǥ??ꡢ???٥? 2 ?? 2 ???ܤΥ????С??쥤?ե졼???Хåե??Ǥ??롣?????ʹߤ?Ʊ?ͤǤ??롣 ???ΥХåե????٥??ϥ????????쥤?ե졼???Хåե????б????롣
???λ??꤬?????ȡ?TrueColor ?ӥ??奢???? DirectColor ?ӥ??奢???????? ??θ?????롣 ???꤬?ʤ??????ˤϡ?PseudoColor ?ӥ??奢???? StaticColor ?ӥ??奢???? ??????θ?????롣
???λ??꤬?????ȡ????֥??Хåե??Υӥ??奢??????????θ?????롣 ???꤬?ʤ??????ˤϡ????󥰥??Хåե??Υӥ??奢??????????θ?????롣
???λ??꤬?????ȡ????ƥ쥪?Υӥ??奢??????????θ?????롣 ???꤬?ʤ??????ˤϡ????Υ??????פΥӥ??奢??????????θ?????롣
???θ??ˤϡ???˾?????????Хåե??ο??򼨤????Ǥʤ????????֤??ʤ????Ф? ???ʤ??? ?ӥ??奢?뤬?????????Хåե??ο??ϡ????ꤵ?줿????Ķ?????Ǥ??????????? ???ͤǤ??뤳?Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ????????λ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С?Red ?Хåե????礭???????Ѳ?ǽ?ʺǾ??ͤǤ??뤳?Ȥ? ˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ?????????Ķ?????Ǥ????????礭???ͤǤ? ?뤳?Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ????????λ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С?Green ?Хåե????礭???????Ѳ?ǽ?ʺǾ??ͤǤ??뤳?Ȥ? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ?????????Ķ?????Ǥ????????礭???ͤǤ? ?뤳?Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ????????λ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С?Blue ?Хåե????礭???????Ѳ?ǽ?ʺǾ??ͤǤ??뤳?Ȥ? ˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ?????????Ķ?????Ǥ????????礭???ͤǤ? ?뤳?Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ????????λ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??????ե??Хåե????礭???????Ѳ?ǽ?ʺǾ??ͤǤ??뤳 ?Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ?????????Ķ?????Ǥ????????礭???ͤǤ? ?뤳?Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ????????λ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??ӥ??奢???ϥǥץ??Хåե????????ʤ????Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ?????????Ķ?????Ǥ????????礭?? ?ǥץ??Хåե??????Ĥ??Ȥ?˾?ޤ?????
???θ??ˤϡ??ߤ??????ƥ󥷥??ӥåȥץ졼???ο??򼨤????Ǥʤ????????֤? ?ʤ????Фʤ??ʤ??? ???ƥ󥷥??Хåե??ϡ????ʤ??Ȥ????ꤵ?줿????????Ķ???뤬???Ǥ??????? ???ʤ????Ȥ?˾?ޤ????? ???ꤵ?줿?ͤ? 0 ?ʤ??С??ӥ??奢???ϥ??ƥ󥷥??Хåե????????ʤ????? ??˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ??ͤλ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??ӥ??奢???? Red ?????塼???졼???????Хåե??????? ?ʤ????Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ??ͤ?Ķ?????Ǥ????????礭?? Red ?????塼???졼???????Хåե??????Ĥ??Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ??ͤλ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??ӥ??奢???? Green ?????塼???졼???????Хåե??????? ?ʤ????Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ??ͤ?Ķ?????Ǥ????????礭?? Green ?????塼???졼???????Хåե??????Ĥ??Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ??ͤλ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??ӥ??奢???? Blue ?????塼???졼???????Хåե??????? ?ʤ????Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ??ͤ?Ķ?????Ǥ????????礭?? Blue ?????塼???졼???????Хåե??????Ĥ??Ȥ?˾?ޤ?????
???θ??ˤϡ????Ǥʤ??Ǿ??ͤλ??????֤??ʤ????Фʤ??ʤ??? ?????ͤ? 0 ?ʤ??С??ӥ??奢???ϥ????ե??????塼???졼???????Хåե??????? ?ʤ????Ȥ?˾?ޤ????? ?????ʳ??ξ????ˤϡ????ʤ??Ȥ??Ǿ??ͤ?Ķ?????Ǥ????????礭?? ?????ե??????塼???졼???????Хåե??????Ĥ??Ȥ?˾?ޤ?????

??

{GLX_RGBA, GLX_RED_SIZE, 4, GLX_GREEN_SIZE, 4, GLX_BLUE_SIZE, 4, None};

???????Ǥϡ??̾??Υե졼???Хåե?(?????С??쥤?Хåե??Ǥ? ?????????쥤?Хåե??Ǥ??ʤ?)?ˤ????륷?󥰥??Хåե??? RGB ?ӥ??奢?? ?????ꤷ?Ƥ??롣 ?֤??????ӥ??奢???? Red, Green, Blue ???줾???ˤĤ??ƺ??? 4 ?ӥåȤ? ???ݡ??Ȥ??Ƥ??ꡢ?????ե??ΥӥåȤ?¿ʬ?????ʤ????????? ???顼?????ǥå????⡼?ɡ????֥??Хåե????󥰥⡼?ɡ????ƥ쥪ɽ???ϥ? ?ݡ??Ȥ??ʤ??? 1 ?ĤΥǥץ??Хåե??????ƥ󥷥??Хåե????????塼???졼???????Хåե??? 1 ?İʾ??????????顼?Хåե??ϡ????Ĥ??⤷???ʤ????????ʤ????⤷???ʤ???

????

XVisualInfo ?? Xutil.h ?ˤ??????????????Ƥ??롣 ?????? visual, visualID, screen, depth ???Ǥ? ???Ĺ?¤?ΤǤ??롣

glXChooseVisual ?ϥ??饤??????¦?Υ桼?ƥ????ƥ??Ȥ??Ƽ????????? ???ꡢXGetVisualInfo ?? glXGetConfig ?????Ѥ??ʤ??? ???????? 2 ?Ĥδؿ??θƤӽФ????Ѥ????ȡ?glXChooseVisual ?ˤ??? ?Ƽ????????Ƥ??????ѤΥ??르?ꥺ???Ȥϰۤʤ????򥢥르?ꥺ???????????? ???Ȥ??Ǥ??롣

GLX ?μ????Ԥˤϡ?glXChooseVisual ?ǻȤäƤ??????򥢥르?ꥺ???? ?ѹ????ʤ????Ȥ??????????????Ƥ??뤬???ѹ????Τ϶ػߤ????Ƥ??ʤ??? ???????äơ???????ˡ?ϥ??饤??????¦?Υ饤?֥??꤬???꡼?????????٤??? ??????ǽ???????롣

GLXPixmap ?򥵥ݡ??Ȥ??Ƥ????ӥ??奢?????????ԥå??󥰤??뤿???? ?????쥯?ȥե??륿??¸?ߤ??ʤ??? GLXPixmap ?ϡ?X ?????Ф????ݡ??Ȥ??Ƥ????ԥå????ޥåפο????? 1 ?Ĥ? GLX_BUFFER_SIZE ?Ǥ????ӥ??奢?????Ф??ƥ??ݡ??Ȥ????Ƥ??롣

???顼

̤?????? GLX °???? attribList ?˸??????? NULL ???֤????롣

??Ϣ????

glXCreateContext, glXGetConfig