Bindenlicht - Java binding for Irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
CybernOnO

Making BindenLicht thread safe

Post by CybernOnO »

I'm trying to make BindenLicht threadsafe.
I had an idea, as the JNI puts every call to native methode into a single class (the BindenLichtJNI class), i will see if my idea works:

The goal is to create a new class BindenLichtSyncJNI as this:

package Bindenlicht;

class BindenlichtSyncJNI {
private static Object sema= new Object();

public final static long new_IUnknown() {
synchronized(sema) {
return BindenlichtJNI.new_IUnknown();
}

}

.......
}

The idea is to synchonize every call to the native function whith a single semaphore. This make us sure that we wont call too native functions at once, and as a JNI function wont call any other JNI , there wont be starve problems.

Then, we replace every call to BindenLichtJNI method to BindenLichtSyncJNI in the other sources of BindenLicht.

I will first try this, then see if we could use more than one semaphore in order to make something less restrictive, ans allow to run several native methods than can run in the same time.

I will let you know when i have any result, let me know what you think of this apporach.
Karo

Newbie Question

Post by Karo »

I'm very much a newbie in using irrlicht and bindenlicht, so some help is appreciated. I use Mandrake Linux. I've successfully installed irrlicht, was able to make the hello world example. I've also been able to compile the Bindenlicht *.java files. What now? How do I compile the cpp files for Bindenlicht, and what is the Java syntax to use for the Bindenlicht features?
Karo

compiling Bindenlicht

Post by Karo »

I've tried copying the cpp files for Bindenlicht to the include directory of Irrlicht, and then executing e.g.:

Code: Select all

g++ *.cpp -I"/opt/jdk1.5.0/include/" -I"/opt/jdk1.5.0/include/linux/" -I"../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg
But it returns this error (it seems easy to solve, but I'm not good at c/c++):

Code: Select all

/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.2/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
collect2: ld returned 1 exit status
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

New Release

Post by William Finlayson »

Sorry about my lack of activity on this forum, but Bindenlicht is back in full swing though, version 0.1.5 R2 is now out. The biggest changes being a linux build, and some documentation. In addition to that, there are the usual multitude of bug-fixes.

I have started work on the next version, and it's going very well. I have the special effects tutorial running perfectly, and I just finished the shader tutorial. You can actually write your shader callback in pure Java now, and it all works seemlessly, I'm hoping to be able to do the same for custom scene nodes. More on all that when it's released though.

In other news, a web-designer has now joined the project, so you can look forward to a proper website in future, should be a lot friendlier than the plain sourceforge page.

Thanks to everyone who tried bindenlicht out so far and sent me feedback, the response has been great. Unfortunately, the statistics on sourforge are not working anymore, so I can't tell if I am getting any downloads of the new version at all, an email or whatever just to say it worked, or that it broke your machine would be appreciated. I'm hoping the linux build works out, let me know if anyone manages to get it working.
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

I just wanted to let you know that Bindenlicht is being used in a school project. Also interesting to note that it got the attention of one of our teachers :)

Keep up the good work!
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Post by William Finlayson »

Thanks eXodus, thats fantastic news! One thing I would love to do when the website goes up, is list projects using Bindenlicht. It's great to know that people are managing to use it, and aren't just admiring the pretty examples :D
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

0.1.6 released

Post by William Finlayson »

Bindenlicht version 0.1.6 is now out. It has added loads of features. It now uses a modified version of Irrlicht for better OpenGL/Linux support. Graphics on Linux are now on-par with Windows, which is great.

A major feature is the addition of shader support to Bindenlicht. You can now, use hardware shaders, and write the required callback in pure Java. Shaders are also working under Linux, which I'm very happy about.

Aside from that, there are the usual improvements on the API, getting rid of those pesky SWIGTYPE's. A big thankyou to all those who have been using it and helping out through bug reports and suggestions for improvement.
Guest

Post by Guest »

thats g8 news. i am already using Bindenlicht for my project. now with update it can speed up very fast Thanks

"getting rid of those pesky SWIGTYPE's." Thats Greates news for me :) .

Cheers
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post by LordNaikon »

i am using bindenlicht 2 .

it is very useful for my schoolprojekt 2

my teacher is interestet in bindenlicht 2

:P hehe!

the new release 0.1.6 .. has done a big step forward!
i am very pleased that i can use bindenlicht .. i like it very much!

@William Finlayson : i am this guy in your forum :) ... you will see me more often in you forum .. keep that in mind :D when i am starting silly questions
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Post by William Finlayson »

I'm glad you are finding it useful :) Feel free to ask as many questions as you like on the forums or email or whatever, user input and experiences are the best way for me to find improvements for it. No question is too silly :)
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

I will be using Bindenlicht in an upcoming school project too, a small sp rpg.

Wish me luck ;)

(even though i hate java ;X)
The Robomaniac
Project Head / Lead Programmer
Centaur Force
Guest

Post by Guest »

Hi,
I just downloaded Bindenlicht and ran the examples. It was cool!

But when I try to create an Eclipse project, I find that it doesn't find the Irrlicht.dll when it runs.

I have java -Dlibrary.path=C:\mypath

where mypath contains the Irrlicht.dll and bindenlicht.dll files.

It finds bindenlicht.dll OK, but then dies and complains it can't find Irrlicht.dll

Does anyone have any experience of this and could help me out?

Thanks.....
Guest

Post by Guest »

Sorry that was -Djava.library.path ... it was a mistype.....
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Post by William Finlayson »

The java library path is only used to find bindenlicht.dll, I think Irrlicht.dll has to be on your system path, or in the same directory as the java code is. I don't know under windows how to tell it to find a dll in a different location.

So you can either put Irrlicht.dll in the same directory as your code, add C:\mypath to the environmental variable PATH, or put Irrlicht.dll in windows/system32.

If you are launching your application from a .bat file, then you could do the following:

PATH=%PATH%;C:\mypath;
java -Dlibrary.path=C:\mypath

Hope this helps.
CBMFreak
Posts: 4
Joined: Fri Feb 04, 2005 8:14 am

Post by CBMFreak »

Apparently, posting a new thread doesnt spawn any response... atleast not in my case for some reaon... it only brings me silence... I am not sure how to interprete that.. anyway.... all good times 3.. I have yet another question... this is about bindenlicht and irrlicht, and when there is a thread about it, then why not grab the oppertunity. The question is very straightforward and it is :


How do I in java, by using bindenlicht and by making a terrain node,
use the getHeight method ????


It wont let me make a Vector2Df that is a required parameter...


please help me... I cant figure out what to do... this is supposed to be a forum where people help each other.... but please... correct me if Im wrong.
Post Reply