How to Debug OpenGL Programs? (Non-zero exit code status, uh oh) | Game Engine Concepts #2

preview_player
Показать описание

What do you do when you get a non-zero exit code from an OpenGL program? This is not an easy question to answer because this bug means that a variety of problems could have happened anywhere inside your code base. And once your code base is of a significant size (even a few thousand lines of code), tracking this problem down becomes very difficult. In this episode I show you how to use IntelliJ's builtin debugger to easily track down exactly where your program is crashing, and then diagnosing the cause of the problem. I go through two problems that I have run into very frequently throughout my development with OpenGL, and then I explain how to solve each problem using the debugger and some intuition.

0:00 Intro
0:46 Bug Example 1
11:00 Bug Example 2
17:46 Thanks for 500 Subs!

---------------------------------------------------------------------

Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)

My Recommended Game Engine Books:

My Recommended Beginning Game Programming Books:

My Recommended Java Books:

Рекомендации по теме
Комментарии
Автор

Im here at my wits end. Mr. Gabe please help! Ive been all over the internets and have found virtually NOTHING on a program???? i guess called Steam Debugger. My issue is every time i hit F6 this window pops up in my steam big picture mode. F6 is a hotkey i use on OBS however. How the F*** do I disable this Steam Debugger!? Or can i at least change the hotkey to something else? I 'm not about to move my OBS settings as i use those alot and have become accustomed to which key does what.

iCantPickaNamej
Автор

Another method is to debug with colors. If you changed, for example, the floats in your shader to ints, and you also changed the type everywhere in your CPU code, however, you forgot to change the upload function from GLuploadi to GLuploadf, an int value of for example 0x1 will be changed to 1.0f. Interpreting 1.0f as int gives you 2 to the power of 24 per IEEE 754. I used this value in a switch statement in the shader and noticed it was falling through, even though I had defined 0x1 as a case statement. Since the GPU doesn't really talk much, I managed to determine the value by outputting different colors.

beaumanVienna
Автор

Can't you run the OpenGL Debugger on the JVM EXE?

unsafecast
welcome to shbcf.ru