Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 23

Thread: Simple graphical project, satellite tracking / visualization

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    18

    Simple graphical project, satellite tracking / visualization

    Hello,

    I would like to create a simple satellite tracking / visualization software with OpenGL, that would result in something like this :


    ( I did not produce and don't own the image, I found it by image searching )
    It is basically a map of Earth on which points are projected, that represent satellite's position above that location on Earth. Of course these points move in time and create a line. I have the calculations part covered, I believe, but I don't know about graphical implementation.

    I have C++ experience and no OpenGL experience. I have a video card that supports OpenGL 3.2 , but someone recommended me to use legacy OpenGL for such a simple project. I am little doubtful, because I would like to learn core profile, that will be of use for me in future too. But legacy coding is supposed to be much easier. Can I have your opinions on it ? And maybe some online resources / books / tips that will help me get the basics I need to complete my project ?

    Thank you, it is much appreciated
    thor36

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,162
    Your project is extremely simple. If you want to learn modern OpenGL, then and only then you should use OpenGL 3+. But the development would last very long. Using legacy (fixed function) OpenGL would be faster and can be executed virtually on everything. But, if you want to achieve results in an hour, use some 2D API. You just need drawing a bitmap and few simple primitives like lines and circles.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    7
    > but someone recommended me to use legacy OpenGL for such a simple project

    Maybe someone recommended just what he/she just got used to. New OpenGL API is even simpler than the legacy immediate mode: you fill a buffer with vertices to draw, attach this buffer to the context and call the draw command.

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    18
    You see, that is why I am confused. You both gave me great answers ( thanks for that ! ), but different ones. And it is same when I do research on 'old' vs 'new' OpenGL on my own - I can't figure out the best option, and they both seem to be about equal with pros and cons. And I would like to use OpenGL because of its versatility and possible projects in the future. The part with " Using legacy (fixed function) OpenGL would be faster and can be executed virtually on everything " seems to be giving an edge.

    Maybe you can give me additional comments if I let you know that next stage of my project ( after completing this simple one ) would be a Solar system simulation, resulting in something like this :


    ( again I did not produce and don't own the image, I found it by image searching )
    Last edited by thor36; 04-19-2014 at 04:00 AM.

  5. #5
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,162
    This is also fairly easy. Fixed functionality is easier (up to certain extent) but shader based approach is more flexible. If you are ready to learn, start with GL 3+, but be prepare to spend a long long time before achieving some result. But the next step to something more complicated would be much easier. Drawing a triangle or a pretty complicated mesh is almost the same in moder OpenGL. On the other hand, you can achieve same simple results much faster with legacy OpenGL, but maybe you'll come to a point where it cannot be used any more (for example, per pixel lighting). Maybe it is best for you to find some examples in both legacy and moder OpenGL and compare the code. You'll need a lot more accompanying libraries (or implement by yourself) if you follow the moder path. Everything you showed in the downloaded pictures can be quite easily implemented using legacy OpenGL.

  6. #6
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,162
    Quote Originally Posted by nbdspcl View Post
    Maybe someone recommended just what he/she just got used to. New OpenGL API is even simpler than the legacy immediate mode: you fill a buffer with vertices to draw, attach this buffer to the context and call the draw command.
    And load new functions not exposed by windowing API, and make shaders for drawing, and make some shaders loading code, and make buffers for even the smallest primitives (or make them procedurally), and make and select VAO (even if you are not using it), and implement all maths for vector/matrix manipulation, and implement transformations, and ... Sounds simple, isn't it?

    But, at the point when one has all this and achieves some skills, there will be no limitations. Shader-based approach is extremely powerful.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    18
    Alexandar thank you for your comments. I think this settles it, for now I will go with legacy OpenGL, and leave the modern one when I will complete these projects and have the luxury of more time. Now that you know what kind of results I would like to achieve with legacy OpenGL, can you ( or anyone else too ) point me to some resources that you recommend ( books & tutorials ) ? I have already been looking for them and found some, but as a beginner I may not do a good selection, and I probably missed some good ones too. I will be using C++ and CodeBlocks. Also, GLUT / FreeGLUT is used in most tutorials, but people recommend GLFW. Thank you for your help.
    Last edited by thor36; 04-19-2014 at 06:09 AM.

  8. #8
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,162
    What books and tutorials have you found?
    For the beginning I would recommend OpenGL Programming Guide (pre-8th edition). There is also online version of some of the earliest editions. You need to read just first four chapters to get basic skills and a half of ninth chapter for texturing (you need it to draw a map). For the second phase (the solar system), you may need also fifth chapter (lighting).

  9. #9
    Junior Member Regular Contributor
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    189
    I would like to create a simple satellite tracking / visualization software with OpenGL, ... someone recommended me to use legacy OpenGL ....
    I use legacy GL to do my satellite sims (which are animated). A screen grab is attached. Use gluSphere with textures activated to eliminate that ugly seam you're running into. I load bmps and tga files using code I grabbed off the web. I also use Devil to load images. Legacy GL is capable enough to generate the graphics you are interested in. I haven't tried to mess around with Modern GL. It looks like the learning curve is steep. If you were going to be a full time graphics application developer, it would be the way to go. If you're primary interest is in some other area (such as engineering), and you are doing graphics on the side, I'd recommend Legacy GL. The NeHe Graphics Legacy tutorials are good. There are lots of them, but you only need to do the first 6 or so for your application.

    Click image for larger version. 

Name:	Sat_Sim.jpg 
Views:	267 
Size:	94.1 KB 
ID:	1268
    Last edited by Carmine; 04-21-2014 at 02:03 PM.

  10. #10
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    18
    Carmine, your project looks awesome. Close ( well, much better ) to what I expect to achieve some time. Is there a website with more information about your project available ? Also thank you for the extra tips in your post, much appreciated.
    Last edited by thor36; 04-21-2014 at 02:06 PM.

Posting Permissions

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