如何使用opengl创建柱面效果

时间:2022-06-30 05:58:06

I would like to know how to create 'cylinder effect', like the top site feature in safari 4, here is a picture

我想知道如何创建'圆柱效果',如safari 4中的*网站功能,这是一张图片

http://www.macworld.com/article/139022/2009/02/safari4firstlook.html

Can you tell me what should i learn , how to get started?

你能告诉我我应该学什么,怎么开始?

2 个解决方案

#1


I would start by working through the OpenGL tutorials on NeHe's website. You might also want to invest in the Red Book. Topics you'll be interested in: Geometry and texture mapping. I think NeHe even has an example of texture mapping on a cylinder.

我将首先介绍NeHe网站上的OpenGL教程。您可能还想投资红皮书。您将感兴趣的主题:几何和纹理映射。我认为NeHe甚至在圆柱体上有一个纹理映射的例子。

Depending on what you hope to accomplish, you might be able to use the Visualization Toolkit to draw a texture on a cylinder in 100 lines of code or less. There's a bit of a learning curve to VTK (and OpenGL for that matter), but the vtkTextureMapToCylinder class and the TCL example of how to use it are good places to get started.

根据您希望完成的任务,您可以使用Visualization Toolkit在100行代码或更少的代码中绘制圆柱体上的纹理。对于VTK(以及OpenGL)来说有一点学习曲线,但是vtkTextureMapToCylinder类和如何使用它的TCL示例是开始使用的好地方。

#2


Please download iCarousel. It has many types of cylindrical effects in it.Use whichever is useful for you.

请下载iCarousel。它有许多类型的圆柱效果。使用对你有用的。

#1


I would start by working through the OpenGL tutorials on NeHe's website. You might also want to invest in the Red Book. Topics you'll be interested in: Geometry and texture mapping. I think NeHe even has an example of texture mapping on a cylinder.

我将首先介绍NeHe网站上的OpenGL教程。您可能还想投资红皮书。您将感兴趣的主题:几何和纹理映射。我认为NeHe甚至在圆柱体上有一个纹理映射的例子。

Depending on what you hope to accomplish, you might be able to use the Visualization Toolkit to draw a texture on a cylinder in 100 lines of code or less. There's a bit of a learning curve to VTK (and OpenGL for that matter), but the vtkTextureMapToCylinder class and the TCL example of how to use it are good places to get started.

根据您希望完成的任务,您可以使用Visualization Toolkit在100行代码或更少的代码中绘制圆柱体上的纹理。对于VTK(以及OpenGL)来说有一点学习曲线,但是vtkTextureMapToCylinder类和如何使用它的TCL示例是开始使用的好地方。

#2


Please download iCarousel. It has many types of cylindrical effects in it.Use whichever is useful for you.

请下载iCarousel。它有许多类型的圆柱效果。使用对你有用的。