scp-fs2open / PCS2

A tool to convert and edit models for use in FreeSpace 2 and FreeSpace Open
3 stars 11 forks source link

Feature/wx3 support #10

Closed niffiwan closed 7 years ago

niffiwan commented 7 years ago

3rd attempt at the same thing from the 3rd person to attempt it? \:)

I've tested this on Linux & Windows and seems to work OK.

z64555 commented 7 years ago

ILU and ILUT are currently in the "Ungrouped" category in CMake, would be good to put those under the same category as IL. Also would be good to rename the IL category to "DevIL"

niffiwan commented 7 years ago

frak, I thought I'd tested having context set in Init().

../src/unix/glx11.cpp(86): assert "xid" failed in SetCurrent(): window must be shown
The program 'pcs2' received an X Window System error.
This probably reflects a bug in the program.
The error was 'GLXBadDrawable'.
  (Details: serial 820 error_code 171 request_code 154 minor_code 11)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

aka X11 doesn't like your solution \:( I'll have a hunt around and see if there's another way of doing this

niffiwan commented 7 years ago

ok; thanks to this page I've found a different way of doing this which seems to work on Linux. Now just need to retest on my Windows laptop

niffiwan commented 7 years ago

woohoo! This also worked on my Windows laptop. So if @z64555 or @DahBlount could retest & confirm this works we might have a winner (and then I can go & address @z64555's other feedback)

TRBlount commented 7 years ago

opengl_init changes compile and run on my windows laptop as well.

z64555 commented 7 years ago

OK, I'll give the changes a lookover as soon as I get back

z64555 commented 7 years ago

Confirmed as working. Lets boogie.

niffiwan commented 7 years ago

Ah. Thanks! I was intending to squash some commits & address some other comments first, but oh well \:D

niffiwan commented 7 years ago

@z64555 re this comment:

ILU and ILUT are currently in the "Ungrouped" category in CMake, would be good to put those under the same category as IL. Also would be good to rename the IL category to "DevIL"

I don't think it's possible, I tried messing around with the variable names in cmake and it breaks builds, probably because find_package needs to look for specific names like IL_LIBRARIES, IL_INCLUDE_DIR, etc.

edit: also grouping seems to occur only by having the same STRING_ occuring at the start of at least two variables. https://cmake.org/pipermail/cmake/2009-June/030372.html