Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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 / Java 3D / Re: GL4Java-glTranslatef.glTexture on: 2003-05-29 06:03:47
If you are using a perspective view, then the amount the globe travels in the x and y direction is highly dependant on its depth.  It will take a smaller change in x to move closer objects than it would to move farther objects the same perceived amount (i.e. a 1/4 screen).  Ortho projects maintain a constant relationship, but not necessarily 1:1, so connecting mouseMoved values directly to x or y just isn't going to work.

Do you really want to move the globe?  Perhaps, you just want to change the camera location/view.  This is a lot easier to do with the mouse and is similar to moving the scene.  Looking directly at an object and then looking to its right has the appearance of moving the object to the left.  So maybe moving the view of the camera is an option for you.

As far as the texture goes, you may want to look into mipmapping your textures, esp. if you will be changing the depth (zoom in/out) and use GL_LINEAR_MIPMAP_NEAREST instead of GL_LINEAR for your GL_TEXTURE_MIN_FILTER parameter.

-Ron
2  Discussions / General Discussions / Re: New Forum: GL4Java or OpenGL on: 2003-05-22 10:49:12
Here's another vote for GL4Java as a separate forum!  Cool

http://web.hypersurf.com/~sully/OpenGL/DemoBox.html Now celebrating [size=6]100[/size] demos!

-Ron
3  Java Game APIs & Engines / Java 3D / Re: GL4Java-GL_LINES on: 2003-05-15 02:25:34
Your code is good, check your camera position to ensure that (0,0,0) is within the view frustrum.
4  Java Game APIs & Engines / Java 3D / Re: GL4Java-TextureLoader on: 2003-05-14 07:24:18
Actually, your whole scene is being drawn upside-down, you just didn't realize it because an upside-down sphere still looks like a sphere.  ;)

Anyway, in your reshape method, just after your gluPerspective call, call this:

gl.glScalef(1,-1,1);

And that will fix it for you.  The reason is because you are using the swing version of gl4java.  If you had been using the canvas, this would have been unnecessary.  The technical reason is because gl4java copies the ogl screen buffer to the swing graphics buffer, but the two buffers interpret the direction of the Y axis differently.  In ogl, the +Y axis points up towards the top of your screen.  In swing graphics, +Y points toward the bottom of your screen.  So, an image drawn in ogl would appear upside-down when copied to swing.

-Ron
5  Java Game APIs & Engines / Java 3D / Re: GL4Java- viewpoint manipulation on: 2003-05-08 22:29:58
You probably have your far clip plane set too close, try increasing the far clip plane.

glu.gluPerspective(fov,aspectRatio,nearClipPlane,farClipPlane);

-Ron

P.S. My web page has about 100 gl4java tutorials you may find useful.  Grin
6  Java Game APIs & Engines / Java 3D / Re: GL4Java-GLUT Functions on: 2003-05-06 10:13:56
Try this:

protected GLUTFunc glut = null;
...
glut = new GLUTFuncLightImpl(gl, glu);
...
glut.glutWireSphere(double radius, int slices, int stacks);
...
-Ron
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.

trollwarrior1 (33 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (65 views)
2014-11-07 19:57:14

TehJavaDev (69 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (82 views)
2014-11-03 06:22:04

CopyableCougar4 (82 views)
2014-11-01 23:36:41
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!