批踢踢實業坊
›
看板
C_and_CPP
關於我們
聯絡資訊
返回看板
作者
licheer (HOPE)
看板
C_and_CPP
標題
[問題] OpenGL如何畫彎曲的圓柱
時間
Mon Apr 16 01:15:57 2012
gluCylinder(quadratic,1.0f,1.0f,10.0f,10,10); 給半徑還有高度,就能畫圓柱 如果要把這段圓柱彎曲 例如,彎曲30度,要怎麼畫呢? 請高手們指導,謝謝 --
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.26.166.98
推
Bencrie
:你一定要 gluCylinder 畫 model 的話就寫 vertex shader
04/16 08:37
→
licheer
:只想到圓柱,不限定要用gluCylinder畫
04/16 09:07
→
PkmX
:最簡單的方式就是把彎好的頂點的位置、法向量等資訊算好後
04/16 11:38
→
PkmX
:然後用display list/vertex array/vbo直接送給opengl啊XD
04/16 11:38