Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
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  
  JOGL shadows and problem with port from NeHe  (Read 3044 times)
0 Members and 1 Guest are viewing this topic.
Offline mezlogo

Junior Newbie

« Posted 2014-02-07 21:18:52 »

Good day to you, immediately I beg your pardon for my English.
I study openGL on lessons NeHe, and when i reached the long-awaited 27 lesson (shadows), I found that nothing works. No, program is run, all the moves, but no shadows.
I took a port from here (
Unfortunately, googling does not help, can't find other examples under jogl2.
Ask if You had this problem, or do you know why not, a shadow appears help.
I don't know what to do.
P.S. thanks in advance and sorry for the stupid questions. From Russia with love.
Offline gouessej
« Reply #1 - Posted 2014-02-07 22:00:58 »


There are tons of examples using JOGL 2 on jogl-demos:

Several JogAmp contributors frequently port some tutorials and code examples to JOGL 2, one of them ported at least the ten first Nehe's tutorials, you should ask your questions about JOGL on our official forum:

Best regards.

Offline mezlogo

Junior Newbie

« Reply #2 - Posted 2014-02-07 22:13:50 »

Hi, unfortunately examples are not suitable because:
1) I can't run, IDEA has been successfully importing the project itself, but when you connect external dependencies downloaded from off site JOGL, you need to rewrite almost all imports and classes in their project... don't think I can do that. 2)There are only 2 examples (looks great!) with volumetric shadows and shadowmap, but too many of them "unnecessary".
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-02-07 22:43:27 »

You should look at this article in our wiki:

There is no need to rewrite all imports... or you downloaded a very old version of JOGL and you try to use it with the source code relying on JOGL 2. The latest version is here:

Offline mezlogo

Junior Newbie

« Reply #4 - Posted 2014-02-08 20:03:56 »

Hello, of cos i tried this way, but can't find CGcontext, and all
(import*Wink is incorrect. Google say me, that jogl 2 not support (or contain) cg and i must to use GLSL. Where am i stupid???
Offline gouessej
« Reply #5 - Posted 2014-02-09 00:16:49 »

I don't say that you're stupid, I have never written such things about you.

The package is still in JOGL 2:

Sorry but your IDE still points to an obsolete version of JOGL. The classes of this package are in jogl-all.jar, this JAR is in the directory called "jar" in this archive:

The detailed instructions for IDEA IntelliJ are there:

Ensure that you have never put any obsolete JAR into your classpath or into your JVM in order to avoid conflicts.

Offline mezlogo

Junior Newbie

« Reply #6 - Posted 2014-02-09 10:03:09 »

Thx for the answer.
Oh no, i have never written that you tell about me. It's just true.
I capture video, maybe this demonstrate where i mistake.
(Sorry that i don't edit it)

Please, sorry for my English and so stupid problem.
Offline gouessej
« Reply #7 - Posted 2014-02-09 11:26:18 »


Sorry for the confusion. Actually, you need to build JogAmp from its source code to run its examples. You can use it as a library but I shouldn't have mixed both. The problem is that the latter is supported with IDEA IntelliJ but not the former (there is no instruction to build JogAmp with your IDE). If you still want to do that, download GlueGen, JOGL, JOAL and JOGL-demos from Github but as I don't use this IDE, I won't be able to help you. If you used Eclipse , you would just have to import those projects with EGit within this IDE and it would automatically build everything for you with no modification.

There is another solution. As you are interested in using only 2 examples, you can create a new project and add JogAmp as a library dependency by following these instructions. Then, copy the source code of the examples you'd like to use and a few required classes in order not to depend on tons of other libraries used in jogl-demos (JBullet, vecmath, ...). Before trying to run complicated examples, you can try to run the rudimentary example I posted on the official Wikipedia page of JOGL.

In my humble opinion, it's important to start with something simple.

P.S : I'm sorry for IDEA IntelliJ users, I don't want to harm anybody but as far as I know, no JogAmp contributor uses it as its main IDE. Please feel free to contribute by improving our instructions for this IDE. In the meantime, rather use Eclipse or Netbeans.

Offline mezlogo

Junior Newbie

« Reply #8 - Posted 2014-02-09 16:16:57 »

I download Eclipse. Create empty project with 2 external JAR glugenr-rt and jogl-all, then i import in this project archive download from github jogl-demos. But still 8 651 errors because wrote import com.jogamp.openal.util.*; And if i write GL2 gl field, eclips's quick fix tool wrote import;
Sorry, but i use LAST jogl version and LAST demos
Offline gouessej
« Reply #9 - Posted 2014-02-09 19:00:41 »

If you use jogl-demos from Github, you have to do the same for gluegen, jogl, jogl-utils and joal:

and then you don't have to add any external JAR.

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

Junior Newbie

« Reply #10 - Posted 2014-02-10 19:37:04 »

How i can unite 4 independent project? I must manual edit .clsspath? Cos eclipse swearing at me,when i copy all srs package in one. Thx
Offline gouessej
« Reply #11 - Posted 2014-02-11 11:16:09 »

Why do you drive simple things complicated? Just import each project separately (File -> Import -> Git -> Projects from Git) and that's all as each project already refers to some others, it's already managed, you don't have to mess with .classpath files. Don't try to put everything into the same project, it won't work, it will break the Ant scripts.

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

SHC (22 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (28 views)
2015-07-24 06:06:53

NoxInc (36 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!