View Full Version : texturing a flat 2D doughnut
08-19-2008, 10:12 AM
I'd be grateful for any advice on this. How do I draw a 2D circle with a circular whole inside it, like a flat doughnut, and then bind a texture to it?????
08-19-2008, 02:48 PM
the simplest method is:
a- open your favorite 3d program (Maya, Blender, XSI, 3DStudio Max, ecc...)
b- model and map the object you want
c- export in a easy readable format (eg: .obj)
d- load the model and the texture coordinate inside your program, you can use the obj loader in the nVidia SDK. :)
Another solution should be to compute the vertex position of your geometry and create a displaylist with vertex and texture coordinate... maybe it's a useful exercise but with the first method you can create any geometry.
08-20-2008, 07:10 AM
Thank you very much :O). I need to use C++ and openGL for the time being without importing any 3D objects. So is there a better way than computing vertex positions for two circles (one inside the other) and binding the vertices to the texture coordinates? thanks again.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.