Lost in JNI

Started by CaptainJester, October 09, 2004, 01:04:59

Previous topic - Next topic

CaptainJester

I have been trying to put DevIL in the LWJGL library.  I went through Sun's tutorial on JNI and found it pretty easy to follow.  However when looking at the stuff you did with JNI here, I just don't know what to do.  I tried to follow it and make the DevIL stuff look the same, but I just keep getting errors.  Is there an reference that you guys used? or was it trial and error?

Thanks.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Matzon

Well, basically trial and error for my part. I started off with the OpenAL binding - and for the most part jni is *really* simple. However when things become void* and void** and particularly struct pointers it gets much more tricky.
Start off with getting the most basic of methods implemented. Basically all those with basic data types - and then slowly move on to the next methods.

I can take a look at your code if you want to, email it to matzon@lwjgl.org

Btw - do you plan the DevIL binding to be a project of its own, or would you like it to be hosted and distributed with lwjgl?

CaptainJester

Thanks.

Well I thought I would include it in LWJGL.  I saw all the posts over at JavaGaming.org, so I thought I would give it a try.  I was going to check with you to see if you really wanted it in there, but I wanted to get something working first.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

princec

We certainly won't want all its functionality though. Really I expect nearly everyone will only need TGA, PNG and JPEG support, which covers all major graphics format styles. And as for output... well, perhaps TGA might be useful for screenies.

Cas :)

spasi

I'd like TIFF too. :wink:

CaptainJester

Quote from: "princec"We certainly won't want all its functionality though. Really I expect nearly everyone will only need TGA, PNG and JPEG support, which covers all major graphics format styles. And as for output... well, perhaps TGA might be useful for screenies.

Cas :)

Yes.  I was thinking the same thing.  Put the basics in, then see if there are any request for specific functionality.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

CaptainJester

Quote from: "Matzon"I can take a look at your code if you want to, email it to matzon@lwjgl.org

I tried to send it to you, but I got an email error:
QuoteUnable to deliver message to the following address(es).

<matzon@lwjgl.org>:
Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)
I'm not going to try again; this message has been in the queue too long.

I will send it again to see what happens.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Matzon

try
matzon@lwjgl.com instead then

Matzon

seems the mail service on lwjgl.org is down - they had a diskcrash.
just use .com or send to brian@matzon.dk - those domains are managed by me
(.org will also use my mail later on, but right now it's done by somebody else)

princec

What does TIFF do that PNG, JPEG and TGA don't?

Cas :)

spasi

Nothing special really, we just use it a lot! :lol:

Anyway, I believe it's a broadly supported/used format and should get in.

oNyx

Well, tga is the "raw" format, png is the lossless compressed format and jpg is the lossy one.

TIF wouldn't add anything. You could either use tga or png instead.

I guess there isn't a single game out there which uses tif.

princec

WHS. It covers nothing that the other 3 formats don't cover so may as well just convert all your tiffs to PNGs...

Cas :)