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!
延伸文章資訊
- 1Point size and line width · Issue #1277 · KhronosGroup/glTF
Line width support isn't likely to be fixed in WebGL or OpenGL; it's been deprecated from the des...
- 2Line Width - WebGL - Khronos Forums
Hi, I find a function called "lineWidth". However, I cannot set the line width using this functio...
- 3[webgl] line width E-I - CodePen
- 4WebGL 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...
- 5WebGLRenderingContext.lineWidth() - Web APIs | MDN