Line Width - WebGL - Khronos Forums
文章推薦指數: 80 %
Hi, I find a function called "lineWidth". However, I cannot set the line width using this function. Since I think the drawn line is thin, ... LineWidth OtherStandards WebGL Phinehas January10,2011,2:47am #1 Hi, Ifindafunctioncalled"lineWidth".However,Icannotsetthelinewidthusingthisfunction.SinceIthinkthedrawnlineisthin,Iwanttomakeitthick.Isthereanymethodtomakethelinethick? SteveBaker January10,2011,11:44am #2 Youshouldcheckthegl.getforgettingthemaxlinewidth(Iforgetwhatthetokenisforthatrequest)-Ibetit’sreturningamaxwidthofonepixel-whichit’sallowedtodoaccordingtothespec.ThereasonbeingthatunderWindows,browsersoftenusethe“ANGLE”codewhichrunsWebGLontopofthenativeDirect3DlibraryratherthantheOpenGLimplementation.Direct3Ddoesn’tsupportanykindoflinewidthcontrol-hence,tobecompliant,italmostcertainlyreportsbackamaxlinewidthof1.0. Allofwhichisverywonderfulintheory-butinpractice,youstilldon’thavefatterlines. Intheend,you’veprettymuchgottadrawthemaspolygons-whichisapainintheasstogetright…andslowasallhellinJavaScript. Inanidealworld,theANGLEdriverwouldconvertlinestopolygonsforyou…buteventhatisvastlymoredifficultthanyoumightthinkbecauseyourvertexshadercodemightdosomethingtoscrewupthelinewidth. Basically,you’rescrewed!
延伸文章資訊
- 1用WebGL 畫線比我想像中地還難 - 半熟前端
Due to limitations of the OpenGL Core Profile with the WebGL renderer on most platforms linewidth...
- 2Line Width - WebGL - Khronos Forums
Hi, I find a function called "lineWidth". However, I cannot set the line width using this functio...
- 3WebGLRenderingContext.lineWidth() - Web APIs | MDN
- 4glLineWidth
glLineWidth — specify the width of rasterized lines ... (If the rounding results in the value 0, ...
- 5WebGL Line width seems not to work.
Hi, I'm learning the WebGL Sample. When I test the sample program, It looks that the Line width s...