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 4 of 4

Thread: Beginner - Confuse with OpenGL, SFML, and its library

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    1

    Beginner - Confuse with OpenGL, SFML, and its library

    Hi guys, I am a beginning to enter the world of game development.

    Lately, I researched that "OPENGL" is one of the tools to use in graphics,
    then I found out about "SFML" (I think that its a library or something that uses opengl).


    I am so confuse because all books/ sites said using "GLUT",
    but many people/fellow developers said that I must use a more updated one like "SFML"
    but sfml has few/none tutorials.


    What I am trying to say is "how to create own library or something like your own glut or sfml",
    and why does opengl has no source code? And how can I use the EXACT(not glut/sfml) opengl in my c++
    program?

    I am so confuse....

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    OpenGL is not a tool, but an API. You have to make your research deeper. Or at least ask Google.
    SFML is a portable multimedia API written in C++. Personally, I didn't know what it was, but it is easy to find the site and read.
    SFML is much broader solution than GLUT. GLUT stands for OpenGL Utility Toolkit. It was developed by Mark Kilgard long time ago to alleviate start with OpenGL and hide all platform specific features of handling windows, input etc. Nowadays, there are many open source alternatives for GLUT, like Freeglut or GLFW.

    and why does opengl has no source code?
    And what would you do with the OpenGL source code?
    OpenGL is implemented in drivers. There is a software implementation, with a source, known as Mesa 3D Graphics Library.

    It is possible to use OpenGL without any helper library/wrapper, but it is not easy for the beginner.
    My recommendation for you is to read Wiki and find some good book for the start

  3. #3
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264
    GLUT is old. Use freeGLUT instead. It's purpose is to be a wrapper over the system specific stuff like creating a window, GL context, message handler (keyboard, mouse, redraw, timer).
    SFML does the same job as freeGLUT plus more. It has network and audio support.
    For audio support with freeGLUT, you could use another library such as BASS, OpenAL, DirectSound and the many others that are out there.

    If you don't want to use freeGLUT or SFML, then you have to write the window creation code yourself. You need to find out what your OS is and what API you want to use. nehe.gamedev.net has tutorials although they are extremely old now. They teach OpenGL 1.1.

    There is no OpenGL source code
    http://www.opengl.org/wiki/FAQ#Is_OpenGL_Open_Source.3F

    Toolkits
    http://www.opengl.org/wiki/Related_toolkits_and_APIs
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  4. #4
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    We shouldn't bother to answer. Nightrobin has posted the same question on at least 3 different forums, and got very detailed answers.
    Maybe I was rude, but the questions like "I had physics in primary school. How can I make an airplane?" makes me angry. Sorry!

Posting Permissions

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