Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: re: gluLookAt oddity on: 2007-07-24 04:54:06
That kinda works - the mushroom patch is now off to the far left of the clipping plane, but I have to invert the row and column variables to get the orientation correct. I can leave the row and variable correct and rotate the whole scene 90 degrees, but still wind up with various objects being translated outside of the game square....
2  Java Game APIs & Engines / JOGL Development / Re: re: gluLookAt oddity on: 2007-07-23 06:37:45
yeah I tried pushing and popping, but it made no difference. The camera is in the right mode too..

Its wierd. I was under the assumption that reloading the identity matrix then translating would move the next object to that location, (irrespective of gluLookAt) and that the gluLookAt affects which objects are within the clipping plane (by providing the origin that the clipping planes are relevant to...) Yet my objects seem to only want to base their location relevant to the camera.
3  Java Game APIs & Engines / JOGL Development / re: gluLookAt oddity on: 2007-07-20 05:22:44
Hi there.

I'm implementing a 3D centipede game (for practice) and I've struck an oddity. I use glLookAt to place the camera at the end of the playing field (keyboard controls haven't been implemented yet), yet when display(GLDrawable draw) is called it treats the camera position as (0,0). The code goes thus:

[size=8pt]public void display(GLAutoDrawable draw) {
      GL gl = draw.getGL();
      GLU glu = new GLU();
      char piece;

      gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
      gl.glLoadIdentity();
      glu.gluLookAt(19.0, 0.0, 100.0, 19.0, 0.0, 0.0, 0.0, 1.0, 0.0);

   //   drawGun(gl);
      drawGround(gl);
      for (float i = 0; i < rows ; i++) {
         for (float j = 0 ; j < cols ; j++) {
            piece = pa.get((int)i,(int)j);
            if (piece == Run.MUSHROOM) drawShroom(gl, i, -j);
            else if (piece == Run.HIT_MUSHROOM) drawHit(gl, i, -j);
            else if (piece == Segment.RIGHT || piece == Segment.LEFT) drawSeg(gl, i, -j);
            else if (piece == Run.NAPALM) drawNapalm(gl, i, -j);
         }
      }
      gl.glFlush();
   }[/size]


where the first call in each draw* method is a call to this:

[size=8pt]   private final void moveToLocation(GL gl, float row, float column) {
      gl.glLoadIdentity();
      gl.glTranslatef(row, 0, column);
   }[/size]


So what I get is a nice, colourful rendering rotated and translated improperly. Is this a gluLookAt problem, or do I have to manually re-translate each object???
4  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2007-07-03 04:40:56
First of all - GREAT tutorial/updates. I've just finished a course on OpenGL for ANSI-C and this changeover is brill...

kfaissal - I'm running a dual-core intel 32bit with Vista and JoGL works fine! Chews up a hellavalot of processing tho' (just for a simple triangle) using jogl-1.1.1-rc1-windows-i586 bins (I'm assuming those are old - although I only downloaded them a few months ago). Make sure you use javax.media.opengl.* tho'. Having said that I've got all the dlls and jars installed in my jre, which I understand may cause clashed for you. Good luck figuring that out!

xxS
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (22 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (83 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (78 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (94 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (151 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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