Skip to main content
gamedev.net
🔒 Locked

Spheres...

Started by CProgrammer Apr 20, 2003 at 5:17 AM 0 replies 150+ views
Original Post
CProgrammer
CProgrammer
I need to create a vertexbuffer holding textured vertices for a sphere of any radius. Could someone give me example code that saves the vertices of a sphere with radius r into vertexbuffer vb. of type struct VERTEX { FLOAT x, y, z; FLOAT nx, ny, nz; D3DCOLOR color; FLOAT tx, ty; }; -Thanks -CPorgrammer
edotorpedo
edotorpedo

http://www.codecolony.de/opengl.htm#VertexArrays

This tutorial is about creating sphere-vertices and storing them in a vertex array.
Exactly what you want IMO, hope it helps,

Edo
Edo

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.