aphadeon / OpenGame.exe

A custom Ruby-powered game engine that supports RPG Maker games.
24 stars 11 forks source link

Show text - text missing ($10 bounty) #6

Closed aphadeon closed 8 years ago

aphadeon commented 8 years ago

I have spent hours trying to figure out where the text from Show Text is gone to. It's not visible, but is rendering. Text works almost everywhere else, using the same functions - not sure why in this case it is invisible.

I have a bounty on this issue of $10. First person to submit a pull request that fixes it can collect the bounty. It's not much, but figured we might as well make this fun.

felixjones commented 8 years ago

This is because the font building method is being called inside a Ruby fiber thread, not the thread that the OpenGL context exists on (Main thread) when the font is part of a Message box.

Set a breakpoint on "internal void SyncBitmap()" in Bitmap.cs then open a Message box and you'll see the GL calls are on a different thread.

Moving this call onto the Main thread should fix this issue.

felixjones commented 8 years ago

Completed with pull request https://github.com/avarisc/OpenGame.exe/pull/24

text_working