Jump to content
  • Advertisement
Sign in to follow this  
KrishKP

OpenGL programming

This topic is 1617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there...I am a beginner to graphics and game programming.I have a doubt.What do you mean by OpenGL programming?Is it the same as C++ graphics programming?

Share this post


Link to post
Share on other sites
Advertisement

In general....OpenGL programming is c++ "graphics programming". Why i say that?

Because to code something which has graphical elements you need external libaries which

support such feature like OpenGL.

So C++ itself cannot do any graphical stuff at all. First additional libaries which their

API's allow the programmer to use function or classes that allow graphical programming.

 

Again OpenGL is such a libary. SDL would be an other one as example.

Edited by exOfde

Share this post


Link to post
Share on other sites

So OpenGL is a library.Which has built in functions for our uses...Its what helps us to do graphics programming.What we call OpenGL code is actually C++ code right?

Share this post


Link to post
Share on other sites
  • I would not say built in functions, because the library itself provides functions we need for our purpose. In the library itself is nothing "built in"
    • but simply said yes you are right
  • OpenGL Code
    • if you use c++ as code language and use the OpenGL library then yes
Edited by exOfde

Share this post


Link to post
Share on other sites

OpenGL, like directx, are bits of code stored in a dll. It doesn't matter which language use them, as long as the language can load dlls, and you have the proper include files to access those functions from the dll, you'll be fine. For example, you could do OpenGL or dx in delphi or c# if you want to, it's just a bit more trouble to make it work at first, but when you're setuped, it's pretty much the same as c++.

 

Learning pure opengl is not easy at first, but fesable. You could start with glut since it handle the setup of a basic application for you, which mean you can concentrate on the code that really matter. Or try something like SDL.

Share this post


Link to post
Share on other sites

OpenGL, like directx, are bits of code stored in a dll. It doesn't matter which language use them, as long as the language can load dlls, and you have the proper include files to access those functions from the dll, you'll be fine. For example, you could do OpenGL or dx in delphi or c# if you want to, it's just a bit more trouble to make it work at first, but when you're setuped, it's pretty much the same as c++.

 

Learning pure opengl is not easy at first, but fesable. You could start with glut since it handle the setup of a basic application for you, which mean you can concentrate on the code that really matter. Or try something like SDL.

what is pure OpenGL?

Share this post


Link to post
Share on other sites
I would guess he meant writing OpenGL code without any helper libraries. That is usually not a good idea. There is a lot of boiler plate code to be written until you get a window you can draw in. SFML, GLFW or SDL both simplify that process massively and are relatively easy to use (and cross-platform). I would not recommend GLUT.

If you are working on Windows you will also want GLEW since you only get (completely useless) OpenGL 1.1 out of the box.

Share this post


Link to post
Share on other sites

Then each language will have different codes while working with OpenGL right?There is no OpenGL code..Only C++ or any other language code implementing OpenGL functions..right?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!