PDA

View Full Version : Beginner - Confuse with OpenGL, SFML, and its library



nightrobin
10-06-2012, 07:32 AM
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....

Aleksandar
10-06-2012, 09:45 AM
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 (http://www.opengl.org/wiki/Main_Page) and find some good book for the start

V-man
10-07-2012, 05:53 AM
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

Aleksandar
10-07-2012, 08:38 AM
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! :(