Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for building under Linux #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CzechBlueBear
Copy link

Hi, the following code allows building and running this cute little engine under Linux (using SDL2 as backend). Some features are not yet there (fullscreen switching, cursor confining), I plan to add them asap. Please merge if you wish! :-)

@sylv256
Copy link

sylv256 commented Mar 19, 2020

when will this be added

void InitGLObjects();
void DestroyGLObjects();
void SetupInputs();
void ConfineCursor();
void ToggleFullscreen();
int EnterMessageLoop();
void PeriodicRender(int64_t cur_ticks);
void SwapBuffers();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SwapBuffers is a Windows API function, this needs to be moved inside the Linux ifdef below to get this compiling on Windows.

void InitGLObjects();
void DestroyGLObjects();
void SetupInputs();
void ConfineCursor();
void ToggleFullscreen();
int EnterMessageLoop();
void PeriodicRender(int64_t cur_ticks);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cur_ticks must be passed by reference here because it's modified in the method. Without that, it's running at a hyper-speed framerate.

@lemewynn
Copy link

lemewynn commented Jul 7, 2020

Maybe it would be better to use CMake?

@jakiki6
Copy link

jakiki6 commented Jul 13, 2020

When I run it, it just gives me a white screen.

@Srinivasa314
Copy link

There are many bugs in this pull request so I created #32. It also fixes the problem mentioned by @jakiki6 .

@hYdos
Copy link

hYdos commented Mar 8, 2021

if #32 supersedes this pr, why not close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants