Hi,
As I've mentioned before in the 'Sprite Blitting' thread, I've ported my games library from AWT to JME, so I have a basis to implementing 3D code in the library, but also by using LWJGL I can remove any need for AWT. This is important as AWT forms a large part of the embedded JVM I ship with my games.
So, I get a JME build of Blobbit Push all finished, and try to bundle it with my JVM. Doesn't work :( Much swearing and name-calling later, I work out that JME needs JRE 1.5 - my JVM is 1.42…
OK, switch over to JRE 1.6 (it's smaller than 1.5!) and start the laborious process of stripping out the runtime libraries, in order to get the JVM footprint as small as possible.
Then it hits me - JME uses AWT!!!
So, before I go hacking through all the code removing all the AWT references, is there an easier way, switch, feature, anything that I can use that I've not noticed?
Many thanks,
M
There are only certain features of jME that use AWT…I believe you can write a full application without touching AWT so long as you're picky about what extensions you use upon the core of jME.
Hmm don't think so I'm afraid
Using:
DisplaySystem.getDisplaySystem( "LWJGL" );
will cause AWT to load as there's a reference to Canvas in there
Yes, that's true. Currently there is no way to use jME without a reference to AWT. It is a dependency though that is planned to be broken (which is why awt is in a jmex package. It just hasn't been high in priority thus far.
Bah, thought so
Ah well, I'll just have to hack the code until the dependancy is removed…
If you feel up to the task, code contributions are always welcome.
Sure, why not - I'm going to have to do it anyway…
I'll let you know how I get on
Hmmmm <rubs chin>
I think I need to talk to Cas on Tuesday, as there's references to AWT within LWJGL itself and it was Cas' idea in the first place to remove all the AWT classes from the runtime…so I'll have to ask him how he did it
Comparing the JRE rt.jar's from the AWT and AWT-less builds, there's only 2MB in it, and that's before it's been bundled up into an exe installer, so maybe I'm wasting my time.
I'll keep you posted.
TextureManager does all image loading using awt, except for tga and dds files.
meh, that's true, although we started writing loader stubs for important file types…
Not getting into the discussion about if awt should be in jme or not, but for TextureManager I think we should use the ImageLoader interface for all extensions(and the "loaders" hashmap). that way we could also have the awt loaders external from the core and register them as default if we wanted to.
also, has anyone used DeviIL any(included with lwjgl)? it handles just about any format, even 3d textures, dds and cubemaps…probably fast too…pretty easy to test just by wrapping and registering to texturemanager offcourse…
sounds like a very good idea.
MrCoder said:
also, has anyone used DeviIL any(included with lwjgl)? it handles just about any format, even 3d textures, dds and cubemaps...probably fast too..pretty easy to test just by wrapping and registering to texturemanager offcourse...
when I was doing research what to use for 3d (jogl/lwjgl) I came across several posts that DevIL is "not good". Think that was on LWJGL forums, something about not being stable enough and not cross-platform enough. LWJGL officially stopped developing on it as I remember and they wrote those as reasons.
cool, good to know
Kova said:
when I was doing research what to use for 3d (jogl/lwjgl) I came across several posts that DevIL is "not good". Think that was on LWJGL forums, something about not being stable enough and not cross-platform enough. LWJGL officially stopped developing on it as I remember and they wrote those as reasons.
i couldn't find any concrete statement in the lwjgl forums to confirm that.
even if what you say is true, i think mr. coder's suggestion is great and would provide a lot of flexibility.
I don’t remember exactly where I found that DevIL is not so good, but here is a piece of it:
http://lwjgl.org/forum/index.php/topic,2293.msg12763.html#msg12763
http://lwjgl.org/forum/index.php/topic,1242.msg8274.html#msg8274
http://lwjgl.org/forum/index.php/topic,1153.msg7775.html#msg7775
quote from devil wiki:
All methods relating to IL, ILU are supported, as well as generic and OpenGL related methods of ILUT. DevIL is supported on all platforms.
Note: As of version 0.98, there are issues loading DevIL on Mac and Linux platforms:"
... I remember I found something where it officially said that, but I couldn't find it now. Anyway maybe they've fixed the problem in meantime, it would be best to ask them.
the first thread doesn't say much about devil.
the second and third thread are almost 2 years old.
the wiki entry is over a year old.
maybe we could ask matzon.
thanks mazton. this is really helpful.
i suppose then we can go on with implementing the ImageLoader interfaces for the different file types (that shouldn't break any existing code). When mazton's lib is done and stable we can port the respective ImageLoader implementations to that lib.
maybe some of the jme community members could even help a bit with the lib development.
sounds like the right thing matzon
We should probably move to a factory method of generating the image loaders then so we don't tie the TextureManager strongly to lwjgl