• 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
gokudev

opengl initialization flow

6 posts in this topic

I am building my first opengl app. I have been following the tutorials here http://www.rastertek.com/gl40tut03.html

I would like some explanation as to how the author know what calls to make next. Like what is the flow of initializing opengl?

 

looking at the InitializeExtensions method, he sets the devicecontext, then sets a pixel format and then creates a rendering context. So what decides what should be initialized before or after? is there a diagram where I can visualize as to what should be init first?

 

Thanks

0

Share this post


Link to post
Share on other sites

Where he got the information from was as he stated the documentation provided by the Khronos Group. You should be able to find it on opengl.org
As to what reason there is to an order. Some things rely on others to be built before hand. In other cases some of them can certainly be moved around and done at different times.
If you look at the function calls various items need to be passed to them. Example: you can't get the devicecontext with out the hwnd(handle to window) you can't get the renderContext without the device context. So the requirements for each of those in effect sets the order they are created.

In truth there are easier ways to create an opengl 4 program using SDL2.0 with opengl and glew is easier by far in my opinion having done both ways.

Using a simpler method would allow you more time to work on learning the API rather than dealing with the setup. Also using SDL2.0 will make it easier to go cross platforms if that is ever an interest.
 

0

Share this post


Link to post
Share on other sites

interesting, glew should be very useful! at first site, i was totally disgusted by putting all those typedefs and proc addresses in my project. I wished there was a simpler way so glew seems to be the way to go. What other benefits does one get from SDL2.0. It says it provides lowlevel access to the video buffer, audio output, mouse and keyboard. Isn't all that available in opengl? 

0

Share this post


Link to post
Share on other sites

everything to do with rendering is available in opengl - the benefit to SDL is that it also gives you input, sound, some file io, texture loading help, and other stuff.. opengl basically gives you access to functions that can manipulate the graphics card - you have to do everything else (or use other libraries to help - like loading images from file in to textures for example - I would definitely use some library to help with that)

 

if your going to be doing direct opengl calls then you should definitely be using GLEW or some such thing.. dont forget to initialize it before making any opengl calls

Edited by EarthBanana
0

Share this post


Link to post
Share on other sites

If you like low-level libraries, use SDL (it's C). If you like higher level libraries and object oriented stuff, use SFML (C++).

 

 

The only issue I can see that would override your preference above is smart phone/tablet support. SFML still shows iOS and Android support as "soon", so SDL is probably more mature and a safer bet if you're going to target smart phones and tablets.

Edited by richardurich
0

Share this post


Link to post
Share on other sites

My preference is SDL2.0 https://www.youtube.com/watch?v=UwpZOwT9nVc If you are using code::blocks this will tell you what you need to set it up with opengl3+ ->4+ and how to compile GLEW for it. Its easy enough my 12 year old son can do it.

If you are using Visual studio it is already compiled for it to start with. There majority of sites seem to cover visual studio. I chose code blocks because I can switch from Windows to Linux and my environment doesn't change. I've had no trouble compiling the programs from one OS to the other.

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