HackerPoet / NonEuclidean

A Non-Euclidean Rendering Engine for 3D scenes.
MIT License
6.1k stars 581 forks source link

Linux and Mac Build #1

Open udnaan opened 6 years ago

udnaan commented 6 years ago

Since it is already written using OpenGL, would it be possible to have a build for linux and Mac?

HackerPoet commented 6 years ago

It may be possible, but it uses a lot of Windows APIs for other things like mouse/keyboard input, windowing, and sound/music (future). If you're interested in porting, I can provide help, but I don't have a Mac or Linux machine for development at the moment.

udnaan commented 6 years ago

Fair enough. I'll look into it.

Apostolique commented 5 years ago

It should be possible to port this project to MonoGame. Then you can build for any current gen console along with Windows, Mac, Linux.

edn9 commented 5 years ago

Since linux have the glew lib, maybe this can work? Also proton/wine stuff is here to help too. (idk if is even compatible but I really want to play your work)

mm12 commented 5 years ago

how would I run it??

mm12 commented 5 years ago

Fair enough. I'll look into it.

It should be possible to port this project to MonoGame. Then you can build for any current gen console along with Windows, Mac, Linux.

LMK when you do I dont know how to use it

VergeDX commented 5 years ago

wine NonEuclidean.exe works OK.

mm12 commented 5 years ago

wine NonEuclidean.exe works OK.

1) love ur pic, 2) Wine hates me so I can't. what file should "run when I double click the application"

hkeena98 commented 5 years ago

wine NonEuclidean.exe works OK.

  1. love ur pic,
  2. Wine hates me so I can't. what file should "run when I double click the application"

Yeah just running wine NonEuclidean.exe has worked out pretty well for me trying running it on anything Unix based. Why is wine not working out for you?

KTRosenberg commented 5 years ago

Any progress on this? Can we get a full list of windows dependencies? If it's just the input and windowing, then there should be no issue.

Also, are all of the OpenGL features covered in WebGL as well? If so, the whole program could be ported for mobile devices on the Web to use WebVR, assuming the rendering isn't THAT expensive. At first glance, I do not see compute shaders and the like.

ehx-v1 commented 5 years ago

Re the Wine problems, seems like Wine just wants a default executable to take care of when not called from the command line. Should be some simple initial configuration stuff, just use literally any Windows executable you use often.

danwdart commented 4 years ago

You could use SDL for maximal portability, I'd have thought you'd have done that since you already used a portable 3D renderer. I was going to mention I couldn't find a configure or Makefile...

Aeyk commented 4 years ago

I support the SDL port initiative and am interested.

I went through and looked at the files that use Windows.h and (unsurprisingly) Engine.cpp is the biggest user. The following places use what looks to be a Windows API. I can look into the portable equivalents later.

Engine.cpp

hWnd(NULL), hDC(NULL), hRC(NULL) HWND, UINT, WPARAM, LPARAM GetWindowLongPtr eng->WindowProc(hWnd, uMsg, wParam, lParam); DefWindowProc(hWnd, uMsg, wParam, lParam); SetProcessDPIAware(); CreateGLWindow(); InitGLObjects(); SetupInputs(); //Recieve events from this window SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)this); TranslateMessage(&msg); DispatchMessage(&msg); HWND hCurWnd, UINT uMsg, WPARAM wParam, LPARAM lParam

Engine::WindowProc WNDCLASSEX GetModuleHandle CreateWindowEx DescribePixelFormat SetPixelFormat MessageBoxEx ChoosePixelFormat RAWINPUTDEVICE RegisterRawInputDevices GetWindowRect SetCursorPos GetSystemMetrics

Input.cpp

Memset is portable, correct? GH_MOUSE_SMOOTH raw->header.dwType RI_MOUSE_RIGHT_BUTTON_DOWN as some examples, these seem like they would simple enough in SDL.

Timer.h

This has only one reference to Win32 API, and it's about timing. QueryPerformanceCounter

Player.cpp

(Nothing?)

ehx-v1 commented 4 years ago

To clarify my previous comment:

  1. Wine hates me so I can't. what file should "run when I double click the application"

This sounds like Wine wants to know what the "default application" for when not starting Wine from commandline is. Set it up with some .exe you use often. (I don't have experience with Wine, but this seems like the only thing that makes sense.)

udnaan commented 4 years ago

To anyone trying to run it through wine, try lutris.

Since the time this issue was opened (2018), things have progressed significantly on Linux gaming front and I bet that there is an existing lutris profile that will run the window exe as it is.

Disclaimer: I have not tried it for this particular project.