Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Testing Java capabilities !! JNI & C++ with Glut !!  (Read 1194 times)
0 Members and 1 Guest are viewing this topic.
Offline NewOnJava

Junior Member




1970 born Java game hobbyer.


« Posted 2010-02-07 17:38:40 »

Hello!

I want to try to compine Java Applet and C++ Glut code.

I need to know is it possible at all, to build an Java applet to launch an JNI C++ OpenGL Glut window ??
I dont want to use JAWT, i just want to build my OpenGL example entirely with C++ and OpenGL Glut.

So no OpenGL to browser Applet window all to Glut window which is launched from C++ library.
And examples theyself are entirely at C++ library too.

Java Applet  --> JNI --> C++ Example1  --> Exit back to Java Applet.
                              --> C++ Example2  --> Exit back to Java Applet.
                              --> C++ Example3  --> Exit back to Java Applet.

Im with Linux Ubuntu 9.10.

//----

Thanks,,
Offline JL235

JGO Coder


Medals: 10



« Reply #1 - Posted 2010-02-07 18:08:12 »

GLUT is old and just not very good. There are already several other Java bindings for using OpenGL in an applet, so do you mind if I ask why you specifically want to use it?

Offline NewOnJava

Junior Member




1970 born Java game hobbyer.


« Reply #2 - Posted 2010-02-07 18:28:21 »

GLUT is old and just not very good. There are already several other Java bindings for using OpenGL in an applet, so do you mind if I ask why you specifically want to use it?

Glut!

Im with my Ubuntu and i simply dont know any other OpenGL libraryes to Linux C++ than Glut and SDL, SDL it is too heavy to my use.

And as i dont want to use Applets surface to OpenGL, i have on my mind to build my entire game to C++ library and just launch it from Applet ??
Im not an professional game developer, this is just an hobby, is my way to approach OpenGL game programming too odd ??

This way i thinked i should go, as i am using C++ for game itself and Java for browser launch ??

//----

Thanks,,
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JL235

JGO Coder


Medals: 10



« Reply #3 - Posted 2010-02-07 20:08:43 »

There is JOGL, LWGL, Slick, JSDL and others already for using OpenGL in an applet.

But anywho, yes it's perfectly thesable and it's essentially what JOGL does. There are multiple .dll and .so files for each OS and these are stored in various .jars. The .jars are linked to from a .jnlp file. The JNLP file is run by either the applet (via the JNLPAppletLauncher) or more recently the applet launcher in the applet tag itself (in practice you need to support both). So on startup it downloads the appropriate .jar for your system.

Your .jars will also need to be signed which the user will need to accept (most people do, but some like me don't). Otherwise your code is fully sandboxed and won't be allowed to use JNI. This is also why I'd recommend using something like JOGL because it's signed by Sun Microsystems (it's already trusted).

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (14 views)
2014-04-15 18:08:23

BurntPizza (12 views)
2014-04-15 03:46:01

UprightPath (25 views)
2014-04-14 17:39:50

UprightPath (11 views)
2014-04-14 17:35:47

Porlus (28 views)
2014-04-14 15:48:38

tom_mai78101 (50 views)
2014-04-10 04:04:31

BurntPizza (109 views)
2014-04-08 23:06:04

tom_mai78101 (209 views)
2014-04-05 13:34:39

trollwarrior1 (177 views)
2014-04-04 12:06:45

CJLetsGame (184 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!