Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Solar system Help

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    5

    Solar system Help

    Hello everybody,
    I want to ask help for a project I make.
    I have made a complete solar system with key action for zoom in zoom out, moving along x,y,z axes on plus or minus and going up/down/right/left.
    I am now in a bit of a dilemma.
    I want to add a text window ( i have made my project in visual studio 2010 in win32 console application) where to put a text like a description of each planet to apear when i hit the left mouse button.
    E.g. When i click with the left mouse button the venus planet I want a description to apear in my text window.
    However I don't know how to put make a text window and how to add mouse action (for the mouse action I have tried but it doesn't work)
    Please help me!
    Thanks in advance.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2012
    Posts
    164
    If you really have a console application, you have two windows:
    1) for the graphics, and 2) the console window.

    Why not output your planet description into the console window?

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    5
    yes i have two windows i have tried to p;ut the name of the selected planet there but... i have not manage to correctly select the planet because i have a switch case and the default switch is:"you have nothing selected" when i click the left mouse button my planets dissapear and i nead to resize the window to see again the planets... besides that it would be beter to have the description of the planet on the graphic window... i have also tried to learn how to put font in order to make the name of the planets move along with the planets but i have not succeded.... if you could guide me ... i would be very thankfull

  4. #4
    Junior Member Regular Contributor
    Join Date
    Apr 2012
    Posts
    164
    Sounds like your problem has more to do with picking than windows or text.
    Get the picking working first. Find a picking tutorial on the web or in an OpenGL
    text. If done correctly picking returns a name (character string). First try to
    simply print that name to your console window to make sure you've set up
    picking correctly. THEN you can worry about displaying the character string in
    the graphics window.

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    5
    I have tried to make the picking function again... no matter where have i clicked it always says that i have selected the sun... could you help me with my picking function? please.

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    800
    For us to be of any help, you need to show us your code.
    Regards,
    Mobeen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •