jME, OSX, and possibly redundant questions

I’m leaving town in about 10 days for 5 weeks. I was going to convert my BMP loading code to work javax.imageio style (but still create a java.awt.Image).



However, if you want to take a crack at it before I get back, I’ll send you a copy and you can try converting it to load directly into a jme.image.Image.



-Mike

The Macintosh lockup occurs precisely at:



jmesrccomjmeutilTextureManager.java



image = ImageIO.read(file);



Which is where a non-BMP/non-TGA texture file gets loaded.

Remarking out this line makes the rest of the application run correctly. Bypassing texture loading, the Macintosh no longer freezes, it accepts keyboard and mouse input, and the (untextured) cube is drawn and rotating correctly.

I hacked the TextureManager to rename all texture files as TGA. I'm working on getting the TGA manual loader to work; however, the TGA manual loader locks up the Mac when it tries to create a new java.awt.image.DirectColorModel.

Aye mkienenb, I think that would be handy. The Mac needs to totally circumvent anything even remotely related to AWT.

My bad, Textures are fundamentally based on com.jme.Image, not java.awt.Image ://



Trying to see if I can rewrite the TGA manual loader to create Texture objects directly.

Great Jeramie! I’ve had a big desire to support OS X, so I’m glad we know what we need to do now. I guess it’s just a matter of writing the remaining loaders sans AWT (BMP, JPG, GIF, PNG, etc). Quite a bit of work, but at least now we know it will be well worth it.



If you e-mail me the class I’ll get it into the base line.

I’ve got a Mac OS X system here, and when I get back mid-July, I’ll definitely take a look at running jme on it as I’m very interested in having my game eventually run on Mac OS X.



I understand the BMP file format sufficiently to create a jme.image.Images directly (I’ve been having to convert BMP files to 3do “TGA” file formats and vice-versa in another java project), so if no one beats me to it, I’ll give it a shot.



However, I suspect it’d be just as easy (and maybe easier) for someone to modify com.jme.image.BitmapHeader.

Hi… having overcome my difficulties running demos in Win32, I thought I’d bloody my head on this wall!



where are these signed *-mac.jar files to be found?



I try running the jmetest.input.action.TestFirstPersonController test on my machine and it is not locking up, per se, but telling me that any and all video modes I try are invalid. I have not altered the source code yet, and so have the settings dialog appearing (which it does).



tone

Sorry not following you. You are running on a windows box but looking for -mac jars?

I am on a mac now… my interest in jME is centered on ability to support both platforms.



tone

Just FYI, my boss pulled our analysis for using other engines for our client :frowning: So I’m not going to be able to further assist ya’ll. But I’m glad I was able to contribute what it was going to take for Mac to work. At least everything works on Mac as long as the textures are all TGA, heh.



Best of luck folks, was a pleasure meeting ya’ll. Hopefully catch ya’ll at E3 or GDC some year :slight_smile:

Make sure you Login first using the links at the top of the page. It’s possible that you might need to Login twice - a strange problem that no one’s yet been able to fix.

I’ve been mokeying arround with the tga loader. All I can seem to get out of it is grey scale… is that expected? Also it seem really picky about the textures I select. The large 500 by 500 monkey seems to work alright (again, only appears in grreyscale) but only when converted with photoshop. too other apps I have (the first 2 I tried of course :slight_smile: ) don’t work. Is it a custom header problem or something? I’ve read that sometimes the headers in tga files can be a pain. Secondly, another perfectly square tga file just fails to load period (tried all 3 apps for conversion) Its only 64 by 64 (I figured a small power of 2 would help!, but NAY!) not sure what’s going on there. Its pretty picky. The ones that dont run, dont let the program initialize at all. Unfortunately dont know much at all about formats and loaders :slight_smile: can we uses some open source converters? I think I found several. Any ideas?

The lense flares work out of the box on mac!!! that must mean we have support for png format!! DOH! why was i foolin arround with that silly tga thing! on further testing… some textures appear, and others don’t. but it DOES support at least SOME PNG out of the box on mac (it even has colors, where tga doesnt appear too (Oh and transparency too (where at least all my tga encoders dont)) DOH!!! oh well… I guess im making progress at least. Wonder if Jeramie ever tried png :confused: would have saved us both some time :stuck_out_tongue:

Great news on lensflare :slight_smile: I’m tempted to break out my old G3 and try to get jME running on there now!

launch time would be a little longer than on my dual g5 :stuck_out_tongue:

I have a class written using swing to accept keyboard input onthe mac… works like a charm. The window stays as the active focus, but is allways behind the open gl window. The user cant even tell whats going on. Might work for mouse too, perhaps not (especially if lwjgl grabes the mouse and uses it for its own devices (Im pretty sure swing cant take controll back from the native library like that) But keyboard is a start (and enough to play many games including mine :)) now i guess i just need to translate the whole keycodes across into the lwjgl setup to work with the KeyInput interface. Thats going to be annoying :stuck_out_tongue: I guess there is no other way though (PLEASE correct me if i’m wrong :)) Mac should have rudamentary keyboard input support by tonight!

Sounds interesting, so you have a test with an LWJGL window and key board support working?

A quick note (yep, I got a chance to check in on the boards!) you should be working with the LWJGL folks with this as well. The Mac/Swing/LWJGL issues in jME is an LWJGL bug, not a jME bug. So, if you find out any information regarding getting LWJGL and AWT/Swing to work nice together, make sure you give Puppy Games a shout. I’d be nice to not have to build work arounds in jME to get it working on the Mac.

Yeah, Ive posted over there, and read the boards… They sound like they are in the process of revamping the whole bloody thing on the mac side (port to cocoa from carbon, and HID support)… All im doing right now is something simple just to get the demos up and running basically :slight_smile: They’re so cool I just want to watch them over and over! (Especially that awsome trimesh :P) Ill probably just support the mostly used buttons… no big deal at all, just to make it mostly work. I did however come to a realization… Why waste my time with swing, if I can get a perhapse usefull jinput plugin working instead :slight_smile: Im having the HARDEST time finding the mac build though. Not really comfortable with ant, and everytime i try to build from eclipse, It just gives me a whole lot of what appear to be java syntax errors in their source… finding that odd to say the least. if anyone has jinput mac bianaryies, or can find them, drop me a line! Thanks :slight_smile:

quoth swpalmer from lwjgl forums : "Yes there is a problem with AWT on the Mac… As I understand it one thing this can cause is that AWT steals input events from LWJGL. I have also seen things deadlock depending on when the AWT thread is started. Typically I’ve seen the AWT thread get started by the use of java.awt.Image objects when loading graphics resources. Alien Flux works because Cas implemented his own image compression for textures. " hmm… do we have to use our own? or does the spgl have what we need for image loaders? anyone know?

So, the way I see it, we have some options here… we can write our own texture loaders (I cant to be sure) in an attempt to get arround this bug (is ther any other reason to want to get rid of awt?) or we can hack tigether an alternate input method that works (if this uses Jinput, this could be usefull for all in the future, if we switch to jogl). Either way seems like a hack of some sort. I guess we could also just wait for the mac port of lwjgl to get better too :slight_smile: but that means i can’t play! :slight_smile: what do you think i should spend my time doing? Any opinions? I wish i could get a working bianary file of Jinput… I wonder if its mac support is ready yet… anyway… let me know!