[DEV] set pthread to have a basic version that work
This commit is contained in:
parent
a26eb9c92a
commit
31dff9e69d
118
gale/Thread.cpp
118
gale/Thread.cpp
@ -10,9 +10,25 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <gale/context/Context.h>
|
#include <gale/context/Context.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__TARGET_OS__Android)
|
||||||
|
static void* threadCallback(void* _userData) {
|
||||||
|
gale::Thread* threadHandle = static_cast<gale::Thread*>(_userData);
|
||||||
|
if (threadHandle != nullptr) {
|
||||||
|
threadHandle->threadCall();
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
gale::Thread::Thread() :
|
gale::Thread::Thread() :
|
||||||
m_state(state_stop),
|
m_state(state_stop),
|
||||||
m_thread(nullptr) {
|
#if !defined(__TARGET_OS__Android)
|
||||||
|
m_thread(nullptr),
|
||||||
|
#endif
|
||||||
|
m_context(nullptr) {
|
||||||
GALE_INFO("Create new Thread");
|
GALE_INFO("Create new Thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,12 +42,17 @@ void gale::Thread::start() {
|
|||||||
if (m_state == state_stop) {
|
if (m_state == state_stop) {
|
||||||
GALE_DEBUG("Allocate std11::thread [START]");
|
GALE_DEBUG("Allocate std11::thread [START]");
|
||||||
m_state = state_starting;
|
m_state = state_starting;
|
||||||
m_thread = new std11::thread(&gale::Thread::threadCall, this, &gale::getContext());
|
m_context = &gale::getContext();
|
||||||
if (m_thread == nullptr) {
|
#if defined(__TARGET_OS__Android)
|
||||||
GALE_ERROR("Can not create thread ...");
|
pthread_create(&m_thread, nullptr, &threadCallback, this);
|
||||||
return;
|
#else
|
||||||
}
|
m_thread = new std11::thread(&gale::Thread::threadCall, this);//, &gale::getContext());
|
||||||
m_thread->detach();
|
if (m_thread == nullptr) {
|
||||||
|
GALE_ERROR("Can not create thread ...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
//m_thread->detach();
|
||||||
GALE_DEBUG("Allocate std11::thread [Set priority]");
|
GALE_DEBUG("Allocate std11::thread [Set priority]");
|
||||||
// set priority
|
// set priority
|
||||||
|
|
||||||
@ -53,83 +74,30 @@ void gale::Thread::stop() {
|
|||||||
|| m_state == state_starting) {
|
|| m_state == state_starting) {
|
||||||
// requesting a stop ...
|
// requesting a stop ...
|
||||||
GALE_INFO("wait Thread stopping");
|
GALE_INFO("wait Thread stopping");
|
||||||
usleep(500000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||||
}
|
}
|
||||||
GALE_DEBUG("stop std11::thread [START]");
|
GALE_DEBUG("stop std11::thread [START]");
|
||||||
m_thread->join();
|
#if defined(__TARGET_OS__Android)
|
||||||
|
//m_thread.join();
|
||||||
|
#else
|
||||||
|
m_thread->join();
|
||||||
|
#endif
|
||||||
//gale::contextUnRegisterThread(m_thread);
|
//gale::contextUnRegisterThread(m_thread);
|
||||||
GALE_DEBUG("stop std11::thread [delete]");
|
GALE_DEBUG("stop std11::thread [delete]");
|
||||||
delete m_thread;
|
#if defined(__TARGET_OS__Android)
|
||||||
m_thread = nullptr;
|
|
||||||
|
#else
|
||||||
|
delete m_thread;
|
||||||
|
m_thread = nullptr;
|
||||||
|
#endif
|
||||||
GALE_DEBUG("stop std11::thread [set state]");
|
GALE_DEBUG("stop std11::thread [set state]");
|
||||||
m_state = state_stop;
|
m_state = state_stop;
|
||||||
GALE_DEBUG("stop std11::thread [STOP]");
|
GALE_DEBUG("stop std11::thread [STOP]");
|
||||||
}
|
}
|
||||||
|
|
||||||
void gale::Thread::threadCall(gale::Context* _context) {
|
void gale::Thread::threadCall() {
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
GALE_DEBUG("THREAD MAIN [START]");
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
gale::setContext(m_context);
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
GALE_ERROR("THREAD MAIN [START]");
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
gale::setContext(_context);
|
|
||||||
while (m_state != state_stopping) {
|
while (m_state != state_stopping) {
|
||||||
if (m_state == state_starting) {
|
if (m_state == state_starting) {
|
||||||
GALE_DEBUG("run std11::thread [NOTHING to do]");
|
GALE_DEBUG("run std11::thread [NOTHING to do]");
|
||||||
|
@ -13,6 +13,12 @@
|
|||||||
#include <etk/thread/tools.h>
|
#include <etk/thread/tools.h>
|
||||||
#include <gale/context/Context.h>
|
#include <gale/context/Context.h>
|
||||||
|
|
||||||
|
#if defined(__TARGET_OS__Android)
|
||||||
|
#include <pthread.h>
|
||||||
|
#else
|
||||||
|
#include <thread>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace gale {
|
namespace gale {
|
||||||
/**
|
/**
|
||||||
* @brief in the dimention class we store the data as the more usefull unit (pixel)
|
* @brief in the dimention class we store the data as the more usefull unit (pixel)
|
||||||
@ -27,7 +33,12 @@ namespace gale {
|
|||||||
state_stopping
|
state_stopping
|
||||||
};
|
};
|
||||||
enum state m_state;
|
enum state m_state;
|
||||||
std11::thread* m_thread;
|
#if defined(__TARGET_OS__Android)
|
||||||
|
pthread_t m_thread;
|
||||||
|
#else
|
||||||
|
std11::thread* m_thread;
|
||||||
|
#endif
|
||||||
|
gale::Context* m_context;
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Constructor (default :0,0 mode pixel)
|
* @brief Constructor (default :0,0 mode pixel)
|
||||||
@ -39,8 +50,8 @@ namespace gale {
|
|||||||
virtual ~Thread();
|
virtual ~Thread();
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
private:
|
public:
|
||||||
void threadCall(gale::Context* _context);
|
void threadCall();
|
||||||
protected:
|
protected:
|
||||||
virtual bool onThreadCall() { return true; };
|
virtual bool onThreadCall() { return true; };
|
||||||
};
|
};
|
||||||
|
@ -435,25 +435,32 @@ class AndroidContext : public gale::Context {
|
|||||||
enum gale::key::status _status,
|
enum gale::key::status _status,
|
||||||
int32_t _pointerID,
|
int32_t _pointerID,
|
||||||
const vec2& _pos) {
|
const vec2& _pos) {
|
||||||
|
GALE_DEBUG("OS_SetInput [BEGIN]");
|
||||||
gale::Context::OS_SetInput(_type, _status, _pointerID, vec2(_pos.x(),m_currentHeight-_pos.y()));
|
gale::Context::OS_SetInput(_type, _status, _pointerID, vec2(_pos.x(),m_currentHeight-_pos.y()));
|
||||||
|
GALE_DEBUG("OS_SetInput [END]");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANDROID_SetKeyboard(char32_t _myChar, bool _isDown, bool _isARepeateKey=false) {
|
void ANDROID_SetKeyboard(char32_t _myChar, bool _isDown, bool _isARepeateKey=false) {
|
||||||
|
GALE_DEBUG("ANDROID_SetKeyboard [BEGIN]");
|
||||||
OS_setKeyboard(m_guiKeyBoardSpecialKeyMode,
|
OS_setKeyboard(m_guiKeyBoardSpecialKeyMode,
|
||||||
gale::key::keyboard_char,
|
gale::key::keyboard_char,
|
||||||
(_isDown==true?gale::key::status_down:gale::key::status_up),
|
(_isDown==true?gale::key::status_down:gale::key::status_up),
|
||||||
_isARepeateKey,
|
_isARepeateKey,
|
||||||
_myChar);
|
_myChar);
|
||||||
|
GALE_DEBUG("ANDROID_SetKeyboard [END]");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ANDROID_systemKeyboradEvent(enum gale::key::keyboard _key, bool _isDown) {
|
bool ANDROID_systemKeyboradEvent(enum gale::key::keyboard _key, bool _isDown) {
|
||||||
|
GALE_DEBUG("ANDROID_systemKeyboradEvent [BEGIN]");
|
||||||
OS_setKeyboard(m_guiKeyBoardSpecialKeyMode,
|
OS_setKeyboard(m_guiKeyBoardSpecialKeyMode,
|
||||||
_key,
|
_key,
|
||||||
(_isDown==true?gale::key::status_down:gale::key::status_up));
|
(_isDown==true?gale::key::status_down:gale::key::status_up));
|
||||||
|
GALE_DEBUG("ANDROID_systemKeyboradEvent [END]");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANDROID_SetKeyboardMove(int _move, bool _isDown, bool _isARepeateKey=false) {
|
void ANDROID_SetKeyboardMove(int _move, bool _isDown, bool _isARepeateKey=false) {
|
||||||
|
GALE_DEBUG("ANDROID_SetKeyboardMove [BEGIN]");
|
||||||
// direct wrapping :
|
// direct wrapping :
|
||||||
enum gale::key::keyboard move = (enum gale::key::keyboard)_move;
|
enum gale::key::keyboard move = (enum gale::key::keyboard)_move;
|
||||||
m_guiKeyBoardSpecialKeyMode.update(move, _isDown);
|
m_guiKeyBoardSpecialKeyMode.update(move, _isDown);
|
||||||
@ -461,11 +468,14 @@ class AndroidContext : public gale::Context {
|
|||||||
move,
|
move,
|
||||||
(_isDown==true?gale::key::status_down:gale::key::status_up),
|
(_isDown==true?gale::key::status_down:gale::key::status_up),
|
||||||
_isARepeateKey);
|
_isARepeateKey);
|
||||||
|
GALE_DEBUG("ANDROID_SetKeyboardMove [END]");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_Resize(const vec2& _size) {
|
void OS_Resize(const vec2& _size) {
|
||||||
|
GALE_DEBUG("OS_Resize [BEGIN]");
|
||||||
m_currentHeight = _size.y();
|
m_currentHeight = _size.y();
|
||||||
gale::Context::OS_Resize(_size);
|
gale::Context::OS_Resize(_size);
|
||||||
|
GALE_DEBUG("OS_Resize [END]");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -878,6 +888,7 @@ extern "C" {
|
|||||||
jobject _thiz,
|
jobject _thiz,
|
||||||
jint _id) {
|
jint _id) {
|
||||||
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderInit [BEGIN]");
|
||||||
if( _id >= (int32_t)s_listInstance.size()
|
if( _id >= (int32_t)s_listInstance.size()
|
||||||
|| _id<0
|
|| _id<0
|
||||||
|| nullptr == s_listInstance[_id] ) {
|
|| nullptr == s_listInstance[_id] ) {
|
||||||
@ -885,6 +896,7 @@ extern "C" {
|
|||||||
// TODO : generate error in java to stop the current instance
|
// TODO : generate error in java to stop the current instance
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderInit [END]");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Java_org_gale_Gale_EWrenderResize(JNIEnv* _env,
|
void Java_org_gale_Gale_EWrenderResize(JNIEnv* _env,
|
||||||
@ -893,6 +905,7 @@ extern "C" {
|
|||||||
jint _w,
|
jint _w,
|
||||||
jint _h) {
|
jint _h) {
|
||||||
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderResize [BEGIN]");
|
||||||
if( _id >= (int32_t)s_listInstance.size()
|
if( _id >= (int32_t)s_listInstance.size()
|
||||||
|| _id<0
|
|| _id<0
|
||||||
|| nullptr == s_listInstance[_id] ) {
|
|| nullptr == s_listInstance[_id] ) {
|
||||||
@ -901,6 +914,7 @@ extern "C" {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
s_listInstance[_id]->OS_Resize(vec2(_w, _h));
|
s_listInstance[_id]->OS_Resize(vec2(_w, _h));
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderResize [END]");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO : Return true or false to not redraw when the under draw has not be done (processing gain of time)
|
// TODO : Return true or false to not redraw when the under draw has not be done (processing gain of time)
|
||||||
@ -908,6 +922,7 @@ extern "C" {
|
|||||||
jobject _thiz,
|
jobject _thiz,
|
||||||
jint _id) {
|
jint _id) {
|
||||||
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
std::unique_lock<std::mutex> lock(g_interfaceMutex);
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderDraw [BEGIN]");
|
||||||
if( _id >= (int32_t)s_listInstance.size()
|
if( _id >= (int32_t)s_listInstance.size()
|
||||||
|| _id<0
|
|| _id<0
|
||||||
|| nullptr == s_listInstance[_id] ) {
|
|| nullptr == s_listInstance[_id] ) {
|
||||||
@ -916,6 +931,7 @@ extern "C" {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
s_listInstance[_id]->OS_Draw(true);
|
s_listInstance[_id]->OS_Draw(true);
|
||||||
|
GALE_DEBUG("Java_org_gale_Gale_EWrenderDraw [END]");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -506,6 +506,7 @@ void gale::Context::clipBoardSet(enum gale::context::clipBoard::clipboardListe _
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
||||||
|
GALE_INFO("plop 10");
|
||||||
gale::openGL::threadHasContext();
|
gale::openGL::threadHasContext();
|
||||||
int64_t currentTime = gale::getTime();
|
int64_t currentTime = gale::getTime();
|
||||||
// this is to prevent the multiple display at the a high frequency ...
|
// this is to prevent the multiple display at the a high frequency ...
|
||||||
@ -517,11 +518,13 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
m_previousDisplayTime = currentTime;
|
m_previousDisplayTime = currentTime;
|
||||||
|
GALE_INFO("plop 20");
|
||||||
|
|
||||||
// process the events
|
// process the events
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsSystemEvent.tic();
|
m_FpsSystemEvent.tic();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 30");
|
||||||
bool needRedraw = false;
|
bool needRedraw = false;
|
||||||
//! Event management section ...
|
//! Event management section ...
|
||||||
{
|
{
|
||||||
@ -544,6 +547,7 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
// release the curent interface :
|
// release the curent interface :
|
||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 40");
|
||||||
bool hasDisplayDone = false;
|
bool hasDisplayDone = false;
|
||||||
//! drawing section:
|
//! drawing section:
|
||||||
{
|
{
|
||||||
@ -552,6 +556,7 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsSystemContext.tic();
|
m_FpsSystemContext.tic();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 41");
|
||||||
if( needRedraw == true
|
if( needRedraw == true
|
||||||
|| _displayEveryTime == true) {
|
|| _displayEveryTime == true) {
|
||||||
lockContext();
|
lockContext();
|
||||||
@ -561,10 +566,12 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
m_FpsSystemContext.incrementCounter();
|
m_FpsSystemContext.incrementCounter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 42");
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsSystemContext.toc();
|
m_FpsSystemContext.toc();
|
||||||
m_FpsSystem.tic();
|
m_FpsSystem.tic();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 43");
|
||||||
if (m_application != nullptr) {
|
if (m_application != nullptr) {
|
||||||
if( true == needRedraw
|
if( true == needRedraw
|
||||||
|| true == _displayEveryTime) {
|
|| true == _displayEveryTime) {
|
||||||
@ -576,28 +583,35 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
hasDisplayDone = true;
|
hasDisplayDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 44");
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsSystem.toc();
|
m_FpsSystem.toc();
|
||||||
m_FpsFlush.tic();
|
m_FpsFlush.tic();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 45");
|
||||||
if (hasDisplayDone == true) {
|
if (hasDisplayDone == true) {
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsFlush.incrementCounter();
|
m_FpsFlush.incrementCounter();
|
||||||
}
|
}
|
||||||
gale::openGL::flush();
|
gale::openGL::flush();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 46");
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsFlush.toc();
|
m_FpsFlush.toc();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 47");
|
||||||
// release open GL Context
|
// release open GL Context
|
||||||
gale::openGL::unLock();
|
gale::openGL::unLock();
|
||||||
|
GALE_INFO("plop 48");
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 50");
|
||||||
if (m_displayFps == true) {
|
if (m_displayFps == true) {
|
||||||
m_FpsSystemEvent.draw();
|
m_FpsSystemEvent.draw();
|
||||||
m_FpsSystemContext.draw();
|
m_FpsSystemContext.draw();
|
||||||
m_FpsSystem.draw();
|
m_FpsSystem.draw();
|
||||||
m_FpsFlush.draw();
|
m_FpsFlush.draw();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 60");
|
||||||
{
|
{
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
@ -612,7 +626,9 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
|||||||
// release the curent interface :
|
// release the curent interface :
|
||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
|
GALE_INFO("plop 70");
|
||||||
gale::openGL::threadHasNoMoreContext();
|
gale::openGL::threadHasNoMoreContext();
|
||||||
|
GALE_INFO("plop 80");
|
||||||
return hasDisplayDone;
|
return hasDisplayDone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user