ramakarl / fluids3

fluids v.3
174 stars 41 forks source link

Linux compatability #1

Open ryankeedy opened 10 years ago

ryankeedy commented 10 years ago

I've been attempting to port 3.1 over to Linux (Ubuntu). However, I am experiencing compiling issues with a number of different types that seem to be reliant on Windows.

HND and HGLRC appear to be declared in wglew.h which is only included for win32 compilations HWND is defined in WinDef.h for handling windows

Probably unrelated, but the other problems are that _getch, va_start and va_end are not recognized.

This is admittedly not my strength, but it appears that some code rewriting will be necessary; it's not simply a matter of setting the right compiling options, etc.

ramakarl commented 10 years ago

Yes, porting to Linux is a bit more work. While OpenGL is cross-platform, the setup of the window contexts for opengl is not. Also, input event handling is different as well. You may find it easier to start from an XWindows OpenGL sample program, in order to see what is expected on the linux side: http://content.gpwiki.org/index.php/OpenGL:Tutorials:Setting_up_OpenGL_on_X11

Also, there are others that have worked on Linux ports as well. Serge Martin, here: https://github.com/sergemartin/fluids_v3 (Select Branch: opencl)

If you get a working 3.1 port on Linux, let me know and I'll post a link to it from Fluids v.3 website.