PDA

View Full Version : how to write character on sphere



somnath
03-11-2011, 09:37 PM
hello sir
i m trying to write character (eg "C") on sphere using glutBitmapCharacter ... its writing perfectly...

i want to write character so that ..if we rotate the sphere (using keyboard) the character should appear on top ie it should visible to viewer inspite of it's rotation

plz give me solution

thamks

somnath
03-13-2011, 10:17 AM
i m not getting good way ..is there any one to help me thanks

Mukund
03-14-2011, 04:12 AM
How about texture mapping the sphere with characters? If that is what you are looking for. Elaborate more as to what exactly you are looking for.

somnath
03-14-2011, 04:36 AM
sir i don't want to use texture mapping....i just want to write a simple character on sphere.

MaxH
03-14-2011, 01:35 PM
Draw the sphere first, then the characters. If the characters are not showing on the backside of the sphere, it's because depth testing is being done. All you have to do is disable it. It's one line of code. In the images below, F17 and F18 are on the backside of the earth. The only difference in the code that generated these images is whether or not depth testing is enabled.

http://www.mfwweb.com/OpenGL/Depth_Test_On.jpg http://www.mfwweb.com/OpenGL/Depth_Test_Off.jpg

somnath
03-31-2011, 10:52 PM
thanks for ur reply sir..

but i need to write character such that it must be on it's center only..inspite of rotation of sphere

thanks

MaxH
04-01-2011, 11:08 AM
i need to write character such that it must be on it's center only..inspite of rotation of sphere I have no idea what you mean by this. Could you include a diagram of what you want?