java - Textured Sphere in LWJGL -


i want draw glu sphere,which works, dont know how can texture it. there no point gltexcoord2f go.

if you're using lwjgl, don't think there way easily. on windows documentation of glusphere() says:

if texturing turned on (with gluquadrictexture): texture coordinates generated t ranges 0.0 @ z = -radius 1.0 @ z = radius (t increases linearly along longitudinal lines); , s ranges 0.0 @ positive y-axis, 0.25 @ positive x-axis, 0.5 @ negative y-axis, 0.75 @ negative x-axis, , 1.0 @ positive y-axis.

but gluquadrictexture not included in lwjgl (or @ least haven't found it). try importing obj sphere uv coords, or make custom sphere class generate uvs.

for not using lwjgl, here's nice little tutorial found on texturing glusphere: http://acidleaf.com/texture-mapping-the-glusphere/


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -