Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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 1562 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 (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.
Offline gouessej
« Reply #1 - Posted 2014-02-07 22:00:58 »

Hi

There are tons of examples using JOGL 2 on jogl-demos:
https://github.com/sgothel/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.

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:
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

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

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)
http://www.youtube.com/watch?v=PmkM-2StvIU&feature=youtu.be

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

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.

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

 

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

The first screenshot will be displayed as a thumbnail.

TehJavaDev (15 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (30 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (43 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!