Handmade Hero»Forums»Code
Kyle Devir
32 posts
Greetings, plus an odd Handmade SDL2 problem
Greetings, fellow Handmade Hero hackers!

I've been looking at many of Casey's videos for a while, and recently decided to start working on the actual coding. Because I use Linux, I've been following the SDL2 tutorials, and, out of curiousity, recently decided to see how the recent code runs.

I've cloned the sdl repository, copied the cpp and data folders to the right places, patched the patch file, ran the scripts and this is the odd result I get:

[attachment=71]Screenshot_20160411_161928.png[/attachment]

Any idea what could be causing this? Thanks in advance! :)

Kyle
Connor
52 posts
It's been so long ;)
Greetings, plus an odd Handmade SDL2 problem
I doubt this is a problem with SDL2 because it appears you are missing the handmade hero assets. Make sure you have placed the assets in the right directory that the game looks in for them.

- Connor
Mārtiņš Možeiko
2562 posts / 2 projects
Greetings, plus an odd Handmade SDL2 problem
Edited by Mārtiņš Možeiko on
I don't think this is asset problem, because you can see P and C letters in the screenshot. And the sizes of characters looks correct.

It more looks like problem with multi threaded texture download. Casey is getting exactly same problem on the stream from time to time.
Connor
52 posts
It's been so long ;)
Greetings, plus an odd Handmade SDL2 problem
Well, it was worth a shot. I can't help you because I'm not on a Linux machine. Good luck anyways :P

- Connor
Kyle Devir
32 posts
Greetings, plus an odd Handmade SDL2 problem
mmozeiko
I don't think this is asset problem, because you can see P and C letters in the screenshot. And the sizes of characters looks correct.

It more looks like problem with multi threaded texture download. Casey is getting exactly same problem on the stream from time to time.


Thanks for the info, mmozeiko. Which streams has he experienced the problem on so far? Does he have an idea of what the problem could be?
Mārtiņš Možeiko
2562 posts / 2 projects
Greetings, plus an odd Handmade SDL2 problem
Edited by Mārtiņš Možeiko on
For example on day 260: https://youtu.be/wklr6ogongg?t=59 (00:59)
The problem is that multi-threaded shared OpenGL contexts simply doesn't work. Casey has said that it should be removed or changed (to PBO).
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Greetings, plus an odd Handmade SDL2 problem
Yeah, I'm pretty sure we have to ditch multi-context downloading. nVidia's materials gave us the bum steer on this one :(

- Casey
Kyle Devir
32 posts
Greetings, plus an odd Handmade SDL2 problem
Edited by Kyle Devir on
mmozeiko
The problem is that multi-threaded shared OpenGL contexts simply doesn't work.


cmuratori
Yeah, I'm pretty sure we have to ditch multi-context downloading. nVidia's materials gave us the bum steer on this one :(

- Casey


Any idea why it doesn't work properly? Is it a problem specifically on Nvidia cards? What about Intel or AMD?

How can the multi-context downloading be turned off? I've been playing around with the #if preprocessor blocks in sdl_render.cpp to no avail...