• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

OpenGL on Dev C++

Status
Not open for further replies.

Screamernail

S

Screamernail

I've gotten the will to test out the already existing OpenGL library in the Dev C++ program. We took up an old stationary PC from the basement with a-lot of old stuff that I had removed. (Weren't very proud of my past work) I don't think I've downloaded any OpenGL stuff in the past so I assume that the library I got was from Dev C++.




When starting a new project and selecting the OpenGL template the Main.cpp file had Windows.h and gl.h included in it.

Any comment or advice?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Use VS ?
The community version is free and you are not going to go into the industry and be told "Yea, we are using Dev C++"

If (more like when) you are bugging with the GPU, be very, very, very careful. Leave error handling EVERYWHERE.

Otherwise... enjoy?

regards
-Ned
 

Screamernail

S

Screamernail

I can presume that Dev C++ isn't that loved. But what else is there for me? I don't wan't to sign into something and get more useless accounts that I barely use.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Dev C++ is not maintained in any way for many, many years.

The standard on Windows nowadays is Visual Studio [Community] 2017.

OpenGL itself is implemented in DLLs of the OS (generally locked to OpenGL 1.1/1.2), and DLLs you get from the graphics driver of your card.

What your development environment gives you are the OpenGL header files, so you could reference the functions and constants.
E.g. "gl.h", "glext.h", "GL3.h", and similar headers.

If you don't have experience with GL, I highly suggest you to first get a library that will handle OS things, like opening a window and setting up the GL context, etc. (SFML and SDL2 are the first that come to mind)

Then a step further, once you have your GL context, you need to actually set up all of GL's function pointers and such things.
This is due to the mention above of the OS implementation only supporting usually up to GL 1.2.
Because of that, any function in the API that is above 1.2 (1.1 for old Windows versions) needs to be dynamically queried from the driver implementation.
To make things a bit more confusing, GL also supports extensions, which may or may not exist on any given graphics card and driver, which you also need to dynamically query if you want access to.
There are libraries such as GLEW that minimize all of this process to a few easy function calls.

After all of that you can start playing with GL.
 
Last edited:
Status
Not open for further replies.
Top