开发者

How to create solid extrusion of bitmap with OpenGL?

I have a bitmap imag开发者_开发知识库e (RGB, no alpha), like the image below (letter 'R'):

How to create solid extrusion of bitmap with OpenGL?

Which is the best way, with OpenGL & VC++, to create the extrusion of the bitmap? Parameter is a 3f vector. Either solid extrusion or surface only extrusion is ok.

Any idea?


Like said so often: OpenGL is "merely" a drawing API, rasterizing triangles to the screen. It doesn't deal with scenes. It doesn't deal with geometry.

Extrusion of a bitmap requires two specific tasks, neither of which OpenGL can do for you: Vectorizing the outline. Extruding the outline. The hard part is vectorizing, extrusion of a planar, closed path is simple.


I have one solution, but it utilises the texture 3D feature to make solid extrusion so it is truely slow:

"Duplicate the bitmap data (pixel data) by vector length to create 3D texture"

However, this is only perpendicular extrusion (perpendicular vector), and frankly, it's slow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜