Ok so this is my first time using a thread and I'm a little confused. I have a function that I want to run separate and it doesn't need to know about thing else but itself.
I'm trying to use it like this compiles but no luck.
Well, if TileMap uses shared data, and more than one thread is trying to use this data, there may be a race condition going on.
Although you say it doesn't draw... Are you sure the thread is starting? Check the return value of CreateThread(). If it returns 0, print GetLastError() to get the error code.
It probably isn't a bad idea to check the OGL documentation, either.
Well I'll see if I can find anything in the documentation. GetLastError() returned 0 for me. So I'll keep hunting.
EDIT : I just changed the draw function to even just draw a shape to see if that'd draw. But still no luck does nothing.
EDIT 2 : I just threw a printf in there to see if it would come up in the console for debugging. It prints once during creation and never happens again. That help narrow it down?
Awesome - thanks for that mate. I actually read it in the documentation late last night, but they way they worded it was a little fuzzy. Thanks for clarifying it for me.