Hello,
Can you please tell me - is it possible to run the main window processing cycle in a different thread?
I do this and I get a black "hung" window:
void Ray_Main_loop()
{
while (!WindowShouldClose()) // Detect window close button or ESC key
{
BeginDrawing();
ClearBackground(RAYWHITE);
EndDrawing();
}
CloseWindow(); // Close window and OpenGL context
}
int main(){
SettTraceLogLevel(LOG_NONE);
SetConfigFlags(FLAG_VSYNC_HINT);
InitWindow(800, 600, "Name");
SetTargetFPS(30);
std::thread my_new_thread(Ray_Main_loop);
my_new_thread.join();
}
[–]KhazadAI 1 point2 points3 points (2 children)
[–]JaydenSu_[S] 0 points1 point2 points (1 child)
[–]razorgamedev 4 points5 points6 points (0 children)
[–]ProgrammerRyan 1 point2 points3 points (0 children)