Jump to content

  • Log In with Google      Sign In   
  • Create Account


What is OpenGl ? Should i start with it ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 Sugavanas   Members   -  Reputation: 171

Like
0Likes
Like

Posted 15 February 2013 - 06:44 AM

Hello guys i have a doubt, what is opengl and should I start of with it ? And also is it necessary for anyone to make their game from open gl or they can start their own ??

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6053

Like
2Likes
Like

Posted 15 February 2013 - 07:03 AM

Hello guys i have a doubt, what is opengl and should I start of with it ? And also is it necessary for anyone to make their game from open gl or they can start their own ??

 

OpenGL is a 3D rendering API that provides a reasonably uniform way for your application to talk to the GPU driver, on Mac and Linux it is the only option you have for hardware accelerated graphics. (Allthough there are higher level libraries that you can use instead but those all use OpenGL under the hood).

 

On Windows there is also Direct3D which does the same thing (and alot of people consider Direct3D to be cleaner and thus less painful to work with), Direct3D tends to also have better support on intels GPUs (So for semi-advanced -> advanced games on Windows it is often the better option of the two since it allows users with cheaper hardware to play aswell)

 

You don't have to use either of them unless you need hardware acceleration, The only way to get hardware acceleration without using OpenGL or Direct3D (directly or indirectly) (On the PC, consoles normally have their own APIs but you don't have to worry about those at this point) would be to write your own driver for each GPU you want your game/API to support (This is extremely difficult since the necessary documentation is kept secret by the manufacturers and the number of different GPUs out there is growing constantly).

 

There used to be a few other vendor specific 3D APIs on the PC (Glide for example was used by the Voodoo series) but they're all dead now, any new PC GPUs that gets released must support Direct3D and OpenGL in order to work with existing software and game developers don't want to use an API that only works with hardware from a single manufacturer (unless its a console where all units will use the same hardware anyway) so introducing a new low level 3D API will be incredibly difficult.

 

If you don't need hardware acceleration you can use whatever 2D API your OS provides. (Or a higher level library).


Edited by SimonForsman, 15 February 2013 - 09:47 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 Sugavanas   Members   -  Reputation: 171

Like
0Likes
Like

Posted 15 February 2013 - 07:11 AM

so you mean that every game made is made with opengl or direct3d ?



#4 Olof Hedman   Crossbones+   -  Reputation: 2742

Like
0Likes
Like

Posted 15 February 2013 - 07:30 AM

so you mean that every game made is made with opengl or direct3d ?

 

Every modern game that uses 3D, yes. (post 2000 or so)

With exception of some consoles that have their own APIs


Edited by Olof Hedman, 15 February 2013 - 07:32 AM.


#5 SuperVGA   Members   -  Reputation: 1118

Like
2Likes
Like

Posted 15 February 2013 - 07:35 AM

so you mean that every game made is made with opengl or direct3d ?

No. He said that games could be using

A: OpenGL

B: DirectX

C: Your own drivers and custom API

D: The drawing API provided by the OSes of choice.

 

Naturally you can also create 3D games using C and D. Take a look at Quake, for instance.

That's software rasterized polygons. Simple 2D raycasting can be used to create games like Wolfenstein 3D (and Doom, if you're clever)

You can access much in cross-platform drawing through the use of browsers. It's easily the most cross-platform way to create games, and doesn't necessarily depend on OpenGL (That's the browser that decides on rendering.)

 

So there's no rules as of what to use where.

Only it's probably more common to use existing API's for Hardware acceleration when developing 3D applications (As Olof said, most modern 3D games use them)

Naturally, higher level frameworks and libraries such as SDL allow even more abstraction than basic DirectX and OpenGL.


Edited by SuperVGA, 15 February 2013 - 07:39 AM.


#6 TheChubu   Crossbones+   -  Reputation: 4070

Like
0Likes
Like

Posted 15 February 2013 - 07:37 AM

Every game will probably need to communicate to the GPU in some way. Thats what Direct3D and OpenGL are there for (in PC at least). You choose one or the other to communicate to your GPU and tell it what to do.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#7 L. Spiro   Crossbones+   -  Reputation: 13268

Like
2Likes
Like

Posted 15 February 2013 - 07:38 AM

so you mean that every game made is made with opengl or direct3d ?

These days, yes. Glide is long-gone.

These days DirectX 11 is the de facto standard in 3D graphics. Newer OpenGL versions aim to mimic the functionality of DirectX 11 but still retain the flaws of the past where bind-to-edit made a small semblance of sense.
DirectX 11 is closer to how hardware actually works and gives you closer access to the root of the hardware.

Another problem with OpenGL is that its support varies quite widely between vendors. What works for you will not necessarily work for your friend when you ask him or her to test your game. Due to DirectX’s strict guidelines this is much less common in DirectX. I know of only one single mobile graphics card and driver version in which what works for you may not work with your friend. Otherwise, if your friend does not have that mobile Radeon graphics card and that specific driver installed for it, what works for you works for all.

In any case, all relevant consoles are using API’s that are either DirectX 11 or extremely similar, and this is where the industry is heading. It is basically your best bet for now as far as learning an API relevant to the future of game programming.


L. Spiro

Edited by L. Spiro, 16 February 2013 - 02:10 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#8 Lickatoad   Members   -  Reputation: 118

Like
0Likes
Like

Posted 16 February 2013 - 01:08 AM

If your just starting out programming start by learning C++ and maybe SDL...Then check out OpenGL once your more confident.

I'm just starting and going with Allegro as my API which I think also links into OpenGL

 

SDL or Allegro give user inputs, sound etc then u can use OpenGL to do the graphics if u want.



#9 MrDaaark   Members   -  Reputation: 3551

Like
4Likes
Like

Posted 16 February 2013 - 01:54 AM

What is OpenGL

OpenGL is a library of C code that talks directly to your graphics driver, which in turn sends commands to your GPU. Basically, it does little more than set rendering options, and than send commands to draw lists of vertices. Microsoft has a version of this for their platforms called Direct3D, and it has just about the same functionality.

Should I start with it?

Only if you are programming a graphics engine (as that's all it's good for). If you just want to make games, go use a toolkit like Unity3D, Panda3D, or something similar, and focus on your content, design, ideas, and actually making a working game.

There is really no reason to write your own graphics engine anymore.

For several reasons:

Graphics engines have gotten complex. It's very difficult and time consuming to implement all the required features, and make sure they work across all the different GPUs. Making a graphics engine will take on a life of it's own, that will detract from actually making a game.

There is nothing left to invent. A graphics engine just organizes the steps of setting up vertex buffers, render states, and draw calls. Everything interesting after that happens on the GPU. It's all standardized behavior. So regardless of what your code looks like, the end result is entirely up to your content(models, shaders, materials).

Given the same content input should get you a similar final image from any rendering engine regardless of if it uses Direct3D or OpenGL, and regardless of who wrote the engine.

So if you want to make games, go find a toolkit and make games.
If you want to be a graphics programmer, start mucking around with Direct3D or OpenGL.

#10 darkhaven3   Members   -  Reputation: 160

Like
0Likes
Like

Posted 16 February 2013 - 10:27 AM

There is really no reason to write your own graphics engine anymore.

For several reasons:

...

 

There is nothing left to invent. A graphics engine just organizes the steps of setting up vertex buffers, render states, and draw calls. Everything interesting after that happens on the GPU. It's all standardized behavior. So regardless of what your code looks like, the end result is entirely up to your content(models, shaders, materials).

 

Hardly true at all. If Doom, the Quakes, and then Rage have proved anything, it is that there is still a lot left to be done on even current-gen hardware. Rage running at 60FPS on the equivalent of a Radeon X1800 is nothing to laugh at, and neither is the notion of writing one's own graphics engine. As far as having "nothing left to invent", again, not true at all. A game made with Unreal Engine 3 will look different and run much slower (invariably) than a game made using, say, id Tech 4 or Unity.



#11 SuperVGA   Members   -  Reputation: 1118

Like
0Likes
Like

Posted 16 February 2013 - 11:48 AM


A game made with Unreal Engine 3 will run much slower (invariably) than a game made using, say, id Tech 4 or Unity.


How so?

#12 darkhaven3   Members   -  Reputation: 160

Like
0Likes
Like

Posted 16 February 2013 - 12:02 PM

id Tech 4 and Unity 3D are rather different technologies from UE2.5-3. Comparing between these three engines running identical hardware, Unreal Engine 3 is going to invariably be slower than id Tech 4... Not necessarily "worse".

 

Don't get me wrong, I personally hate the Unreal Engine and have hated it since 1997, but what I was really trying to say was "a game engine written X years ago is going to run faster than game engine Y written yesterday." Get what I mean?



#13 Josh Vega   Crossbones+   -  Reputation: 1176

Like
1Likes
Like

Posted 16 February 2013 - 05:12 PM

id Tech 4 and Unity 3D are rather different technologies from UE2.5-3. Comparing between these three engines running identical hardware, Unreal Engine 3 is going to invariably be slower than id Tech 4... Not necessarily "worse".

 

Don't get me wrong, I personally hate the Unreal Engine and have hated it since 1997, but what I was really trying to say was "a game engine written X years ago is going to run faster than game engine Y written yesterday." Get what I mean?

 

Not necessarily. An engine written with the proper optimizations could be designed to run faster than an older engine on the same hardware. Using technologies such as CUDA or OpenCL allows you to take some of the work off of the CPU and place it on the GPU. id Tech 4 games like DOOM 3 don't support GPGPU functionality while newer engines such as UE3/4 or CryENGINE 3 do.

 

And UE3 isn't slower because its newer, its slower because it requires better hardware than what is required for older (or lower-end) game engines. UE3/4 and CryENGINE 3 belong in a different class from id Tech 4 or Unity3D. both UE3/4 and CryENGINE 3 are designed to push the limits of modern computer hardware, while id Tech 4 and Unity3D are designed to run on current and older hardware.

 

Comparing UE3/4 with id Tech 4 is like comparing Battlefield 3 with Battlefield 1942 or Call of Duty: Black Ops 2 with Call of Duty 1. They are designed for different hardware generations. I'm sure if you pumped UE3 level 3D models into id Tech 4 it would run even slower than UE3 itself because it wasn't designed to handle 3D models of such high detail.

 

I've had the pleasure of working with all four engines (UE3, CryENGINE 3, Unity3D, and id Tech 4) at one time or another and can say this: "Each engine has its own strengths and weaknesses. Depending on where you want you game to be strong depends on the engine you should choose."


Some favourite quotes:
Spoiler

#14 MrDaaark   Members   -  Reputation: 3551

Like
1Likes
Like

Posted 17 February 2013 - 12:45 AM

Hardly true at all. bla bla bla

Every word of what I wrote is true. I'm not even sure what you are arguing with? Because I did't post anything about engines and their speeds. This is a thread about how someone new should proceed.

If someone wants to make a game, they should go grab an engine, learn to use it, and start putting in their content. There is no need to waste time learning to program D3D or OpenGL if your goal is to make a game. I'm sure his game idea isn't a rotating, normal mapped, teapot or Standford Bunny. Rendering behavior has become pretty standardized and there is no need to go fooling around with all those low level calls. Barring a graphical feature or two (which amount to useless niggling), your content will look like whatever the artist came up with.

Now for the rest of that crap you prattled on about.

A lot of old OpenGL games certain DON'T run better on newer hardware. Especially when they can't find all the outdated extension strings they are looking for, and switch to software fall backs, or worse rendering techniques.

For instance, my newer PC in 2007 with a newer geforce couldn't run Quake2 anywhere near as good as my old machine with a Riva TNT2 in it. One start-up the console would scroll past a huge list of missing extensions, one of which was an old multi-texturing one. So now the game was doing multiple passes over every frame, and I was struggling with it at 800x600.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS