OpenGL display driver

This commit is contained in:
elasota
2020-09-26 16:45:52 -04:00
parent da3cdb3a17
commit 45aa5b4cba
26 changed files with 2922 additions and 33 deletions

View File

@@ -0,0 +1,27 @@
#include "GpFiber_SDL.h"
#include "HostSystemServices.h"
#include "HostThreadEvent.h"
#include "GpSystemServices_Win32.h"
GpFiber_SDL::GpFiber_SDL(SDL_Thread *thread, PortabilityLayer::HostThreadEvent *threadEvent)
: m_event(threadEvent)
, m_thread(thread)
{
}
GpFiber_SDL::~GpFiber_SDL()
{
m_event->Destroy();
}
void GpFiber_SDL::YieldTo(IGpFiber *toFiber)
{
static_cast<GpFiber_SDL*>(toFiber)->m_event->Signal();
m_event->Wait();
}
void GpFiber_SDL::Destroy()
{
delete this;
}