Need help with OpenGL rendering thread, C++ and win32 API

Started by
23 comments, last by 0beron 19 years, 3 months ago
would you be so kind and post a binary or, even better, the source code so we can test it on our systems? so far all of my recent attempts failed. maybe theres some other tidbit like service packs or whatever that we're missing.
Advertisement
clicky

The above link contains two exes, SimpleTest is a single thread version, just to check things work fine on your system [wink]
Multithread Test is the same program but rejiggled for multithreaded windowing.

I do plan on releasing the source etc soon, I'm just considering the interface to my windowing framework before making the first beta release, I'll post here when I do it, hopefully before new year [grin]
ok, i just thought, what the heck is it with that yield function... so i read it temporarily suspends the current thread in favor for some other thread, and guess what? it just worked! simply yield the render thread somewhere in its main loop and it works!
cheers!
*laffs* fair play, i'll leave the programs up incase anyone wants to run 'em and look at the spinning box [wink]
Cracked it! - I took the advice of Solias and in a pm from heen and recombined the rendering with the main window message loop, leaving the thread out on it's own. I intend to use it to do analysis on MIDI data, which then drives a visualisation. The data's asynchronous, and I want to call a 'beat' method at particular times, and that's what the thread will do.
I've got a program now that does exactly what it did before I added threads, but now it flashes another bunch of polygons on the screen every second thanks to a counter in the thread function. Thanks everyone for your help!

I've now got the problem of giving the thread it's own message loop so I can notify it of incoming MIDI messages. I've put up another post on this, but since it's not really openGL related I put it here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=291381

This topic is closed to new replies.

Advertisement