JOGL shadows and problem with port from NeHe

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 (http://www.java-tips.org/other-api-tips/jogl/shadows-nehe-tutorial-jogl-port.html).
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.

Hi

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:
http://forum.jogamp.org/

Best regards.

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”.

You should look at this article in our wiki:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE

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:
http://jogamp.org/deployment/v2.1.4/archive/jogamp-all-platforms.7z

Hello, of cos i tried this way, but can’t find CGcontext, and all
(import com.jogamp.opengl.cg.*:wink: is incorrect. Google say me, that jogl 2 not support (or contain) cg and i must to use GLSL. Where am i stupid???

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

The package com.jogamp.opengl.cg is still in JOGL 2:
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/cg/package-frame.html

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:
http://jogamp.org/deployment/v2.1.4/archive/jogamp-all-platforms.7z

The detailed instructions for IDEA IntelliJ are there:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Add_a_library_dependency_to_your_project

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

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.

Hi

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.

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 javax.media.opengl.GL2;
Sorry, but i use LAST jogl version and LAST demos https://github.com/sgothel/jogl-demos

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.

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

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.