• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Alian Vesuf

C++ OpenGL - Deprecated or not !

15 posts in this topic

First of all i dont really understand all these updates and modern OpenGL. I was studying OpenGL in college and we used old deprecated stuff. After some time i come back to it and i see lot of changes. I've seen glfw glew but not used them and im really confused what is what and what to start learning.  Also, since i dont plan on using fancy shaders on my programs can i continue with plain old OpenGL ?

1

Share this post


Link to post
Share on other sites

I've seen glfw glew but not used them and im really confused what is what and what to start learning.

 

Thous are not OpenGL, per-se, they are there just to help you with some of the mundane tasks related to opengl. Most importantly - a crap-ton of boilerplate code to expose all the available/requested functions/enums for you.
 

Just read a bit about them and pick one you like - knowing that it is fairly easy to change your mind later on.

 

Also, there is a bit of truth in saying that the OGL3.3+ way (without backwards compatibility) is easier to work with than the old ways even when you do not need any of the new features - although the entry fee, if i may say so, is a bit higher. The mentioned http://www.arcsynthesis.org/gltut/ is great help there (at least read the "About this Book" part to know what you get yourself into).

0

Share this post


Link to post
Share on other sites

Although at least one very major person from one very major manufacturer disagrees with my opinon, I suggest not using deprecated functionality. The reason is that as a beginner, it is not immediately obvious for you which deprecated functionality is well-supported in hardware and what isn't. On the other hand, once you have climbed over the -- admittedly high --  entry barrier (like, having to type 100 lines of code to produce the first triangle), core functionality isn't any harder than using deprecated features.

 

Also despite vendors currently promising not to do this any time soon, one day the deprecated functionality will be removed. Nor can you rely that while maybe one or two vendors will keep supporting deprecated functionality, in fact all of them will.

 

Indeed, I would wish for manufacturers to drop deprecated functionality in favor of making core functionality better and faster, and making drivers smaller, less complicated, and bug-free.

 

 

For the record, here is what Mark Kilgard has to say about it:

 

OpenGL 3.1 introduced notion of “core” profile

 

Idea was remove stuff from core to make OpenGL “good-er”

  • Well-intentioned perhaps but...
  • Throws API backward
  • compatibility out the window

Lots of useful functionality got removed that is in fast hardware

  • Examples: Polygon mode, line width

Lots of easy-to-use, effective API got labeled deprecated

  • Immediate mode
  • Display lists

Best advice for real developers

  • Simply use the “compatibility” profile
  • Easiest course of action

Requesting the core profile requires special context creation gymnastics

  • Avoids the frustration of “they decided to remove what??”
  • Allows you to use existing OpenGL libraries and code easily

•No, your program won’t go faster for using the “core” profile

  • It may go slower because of extra “is this allowed to work?” checks

 

Nothing changes with OpenGL 4.3 NVIDIA still committed to compatibility without compromise

 

Source: GTC 2010 session, OpenGL Version 4.3 is here

2

Share this post


Link to post
Share on other sites

Imo todays opengl is 'overstuffed' for small 'indie' games, 

It is good for big comercial games (like for example "nail'd"

game i play recent whole week) with heavy heavy tons

of geometry and coloring - but much heavy for small fckn*  indie

games

-6

Share this post


Link to post
Share on other sites
My recommendation continues to be to learn Direct3D 11 first. The debugging tools for Direct3D are years ahead of those for OpenGL. The drivers are more stable and less buggy. The API more closely matches how actual hardware works. There's no deprecated features as each version of the API simply removes old stuff. All of this amounts to Direct3D 11 being a significantly better _learning_ platform, independent of your opinions of Microsoft/Windows and alternative OSes or technologies. The Direct3D API is cleaner and has far less odd historic baggage to trip you up.

The knowledge and understanding of graphics development you acquire with Direct3D ports fairly well over to OpenGL.

Starting with OpenGL has many problems. First there's all that deprecated API baggage, and it's all too easy to end up using some old API for something without realizing it (or realizing _why_ it's deprecated, since it still works and the problems are not immediately obvious). The documentation on OpenGL is almost universally out-dated and even newer documentation is often written by people falling into the same deprecated API trap. The drivers tend to be buggier and you (and all your users) have to be updated to the very latest version to avoid major bugs in new API features. The API does not directly or obviously map to hardware and so you don't tend to learn everything you should know as a graphics programmer (you need to know way more than just what function in the API does what). Drivers tend not to support the latest version of GL very quickly; AMD still doesn't support 4.4 and Intel is still stuck on 4.0 I believe, while both support Direct3D 11. There are bits of GL that D3D doesn't support (that tend not to be all that important), but there are major chunks of Direct3D that OpenGL takes years to catch up to and then even longer for the driver vendors to support (as in GL 4.4). The debugging tools for OpenGL are lacking in features compared to their D3D equivalents, often lack support for the latest versions of GL, and tend to be buggy themselves.

Start with Direct3D 11. Learn how to graphics. _Then_ worry about portability and the maze of OpenGL APIs/versions.
0

Share this post


Link to post
Share on other sites

At the hobby level, using either technology isn't all that many lines of code different so perhaps implement both ;)

 

I do find it a bit annoying that the semi-official DXUT has been demoted from the official Microsoft SDK. I used to teach students with that and like GLUT, I found it was a great way to skip the WinAPI / X11 cruft.

 

As for legacy OpenGL stuff.. who cares?, just dont use it (even on a platform that can). I find the biggest problem are all the obsolete tutorials laying around the internet. Perhaps the next OpenGL standard should be renamed KarstenGL_ to help find more directed / useful sites on the internet ;)

Edited by Karsten_
0

Share this post


Link to post
Share on other sites

Well thanks for all of the replies, for which i partially understood what u guys said. Some suggest switching to Direct3D, some talking about stuff i don't even have idea what it is, since im in learning steps. I like how glfw handles windows in itself but what when it comes to audio and networking ? Direct3D seems to be more complete and i dont know why OpenGL guys are not making such complete changes but rather just updating the core. I'm tired of all those changes and deprecated stuff, libraries and whatsoever. I'm thinking of switching to Direct3D and learn something complete that is worth giving my time. Also if they decide to remove deprecated stuff from the core what will happen to old games that were developed with old OpenGL. Really im tired of all this stuff which makes it more harder for beginners to understand what is what and what to start learning.

0

Share this post


Link to post
Share on other sites


Direct3D seems to be more complete and i dont know why OpenGL guys are not making such complete changes but rather just updating the core.

As mentioned in my post above, that is the choices the two teams have made.

 

Direct3D is focused around a bundle of features. If you create a Direct3D 6 interface it means you get everything from the 1998 era. Everything is designed around high performance graphics concepts at that time. If you create a Direct3D 9 interface it means you get everything from the 2002 era. Everything is designed around the high performance graphics concepts at that time. If you create a Direct3D 11.2 interface it means you get everything from last year's batch of high performance graphics concepts.

 

You might be thinking "Great, I'll just create an 11.2 interface and work with the modern stuff!"  But it isn't that simple. It means the simple immediate-style interfaces are unavailable to you, you must develop your code around high-volume polygonal systems. It means you cannot opt out of shaders, you are required to provide default compute shaders, pixel shaders, geometry shaders, and more even though you are just learning what those means. It means you cannot opt out of any part of the rather complex rendering pipeline.

 

When it comes to learning how to write graphics programs you might decide that you want to leap in head-first and hope you can swim. In that case, pick up the latest round of D3D that your system supports, provide all the mandatory shaders (As a beginner you are still responsible to know how to write shaders) then properly configure all the steps of rendering (you've studied all the stages, right?) then load your meshes and textures (you aren't allowed to draw primitives since it is focused on high performance rendering; even as a beginner you must use the same types of models the professionals use) then feed in all your animation arrays (which, as a beginning programmer, you may not be comfortable creating) and otherwise do all the required steps.

 

If you aren't comfortable taking on EVERYTHING that is required of the latest D3D edition, you can look back and take a simpler collection of interfaces. D3D9 is relatively popular because it still includes a lot of legacy material and doesn't require the programmer to provide everything along a fully-programmable pipeline. But you still need to provide quite a lot.

 

 

The OpenGL mentality is different.  The goal is not to provide a single unified interface. The goal is to provide an interface to all the functionality present on the card. You are permitted to use non-optimal functionality. If you are learning the basics of 3D mathematics you are not forced to provide a bunch of mandatory shaders. If you are learning the basics of 3D model management and manipulation, you are not forced to follow the high-performance methods of transferring them to the card and managing remote resources. You can pick and choose what features you want at any time.

 


Also if they decide to remove deprecated stuff from the core what will happen to old games that were developed with old OpenGL.
OpenGL code will continue to function as long as the cards and drivers are able to provide the features. Even if they are provided through slow software emulation, all that is required is that they are present.

 


Really im tired of all this stuff which makes it more harder for beginners to understand what is what and what to start learning.

Yes. You are not alone.

 

Twenty years ago when 3D graphics cards were just being introduced things were much easier.

 

Back then everyone was on a fairly level playing field.

 

Today you can start by looking at your comfort level, then deciding if you want to start learning a complete feature set (as provided by Direct3D) if you want to start learning one feature at a time (as provided by OpenGL). If you decide to learn a feature set, figure out what era of features you want to learn, and pick the corresponding set of features.

 

Used properly, both systems are fully capable of high-performance rendering required by modern games. Used improperly, both systems are fully capable of giving terrible performance. They are similarly powerful since they are basically just two alternate interfaces to the same underlying hardware.

1

Share this post


Link to post
Share on other sites
This notion about GL being easier because it can hide modern hardware features is a little off since Direct3D 11 can also be used in "easy mode" via Microsoft's official DirectX Tool Kit (https://directxtk.codeplex.com/). It supports a number of pre-configured effects and render states (so no messing with shaders or figuring out the magic combination to get alpha blending to work right), efficient immediate-mode-like primitive batching, texture loading, model rendering, sprite batching, sprite fonts, a math library, and some geometry/shape factories.
0

Share this post


Link to post
Share on other sites

This notion about GL being easier because it can hide modern hardware features is a little off since Direct3D 11 can also be used in "easy mode" via Microsoft's official DirectX Tool Kit ...

Full stop.

Don't compare unrelated things. OpenGL is only comparable to Direct3D - nothing else.

Also, I for one would appreciate if an extra effort would be made to evade "flammatory" corners of this topic. Might be just me though :/.
0

Share this post


Link to post
Share on other sites

There's one overwhelming reason to favor OpenGL over Direct3D: non-Windows platforms.

 

I would start with OpenGL ES 2 or 3. It's basically the modern subset of OpenGL. It opens the door to all kinds of mobile platforms, Raspberry Pi and such, and HTML5 WebGL (for whatever they're worth) in addition to desktop Linux, OSX, and Windows.

 

Disclosure: hardcore Linux user smile.png

Edited by tnovelli
1

Share this post


Link to post
Share on other sites

There's one overwhelming reason to favor OpenGL over Direct3D: non-Windows platforms.

 

Definitely! Unfortunately many people still don't know what a Linux is.

Until Direct3D works on non-Microsoft platforms, it is still like comparing Apples and Oranges. As it stands, one works... one doesn't. Simple as that lol.

 

That said, the large number of ported DirectX games on the Linux version of Steam proves that migrating an existing codebase from Direct3D to OpenGL (and vise versa) isn't really that hard. Though unfortunately the recent death of Cg has complicated matters.

 

Disclosure: Equally hardcore BSD user smile.png

Edited by Karsten_
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0