Show Posts
|
|
Pages: [1]
|
|
4
|
Java Game APIs & Engines / JOGL Development / Vertex position?
|
on: 2006-04-07 17:09:09
|
|
Hello, I have a problem when it comes to collision detection and other stuff. The problem is that I don't know where my vertexes of my objects is...
example: I place an object with center in origo with vertexes around origo....then I use opengl glRotated and rotates my object...now how do I know the new positions of my vertexes in my object? without shaders?
thx.
|
|
|
|
|
5
|
Java Game APIs & Engines / JOGL Development / lighting materials?
|
on: 2006-03-29 17:35:30
|
|
I set these lightvalues...and then o draw a sphere...I wonder why my shere is blue and not red?
private float[] lightDiffuse = {0.7f, 0.7f, 0.7f, 1f}; private float[] lightAmbient = {1f, 1f, 1f, 1f}; private float[] lightPosition = {50f, 50f, 50f, 1f};
gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, lightDiffuse, 0); gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, lightAmbient, 0); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0); gl.glEnable(GL.GL_LIGHT0); gl.glEnable(GL.GL_LIGHTING);
private float[] matDiffCol = { 1f, 1f, 1f, 1f }; private float[] matAmbCol = {1f, 0f, 0f, 1f}; <---- blue? why not red?
gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT, matAmbCol, 1); gl.glMaterialfv(GL.GL_FRONT, GL.GL_DIFFUSE, matDiffCol, 1);
is there anything wrong with this code?
thx
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / FRONT BACK
|
on: 2006-03-26 17:21:54
|
|
I now have a plane that is red, and I have lights on it. One sid is red and the otherone is dark, front and back.
The thing is...it doesn't change when I change from counterclockwise to clockwise, the front is still red....
shouldn't clockwise vertex placment make the back face the viewer?
|
|
|
|
|
8
|
Java Game APIs & Engines / JOGL Development / lighting material back front
|
on: 2006-03-26 14:50:06
|
|
Hello, I have a problem with back and front of my polygons. When I set the GL_FRONT on my polygon with color red and I rotate, both sides are red.
and when I set GL_BACK none of the sides is red.
I need this to be able to check how to face the polygons right...or I know how to do it but I cant see any difference at this point becouse of the problem with front and back.
It should be just to set glNormal3f to a direction and that will be fron, right?
plz help=) thx!
|
|
|
|
|
13
|
Java Game APIs & Engines / JOGL Development / Double buffer
|
on: 2006-03-16 21:07:42
|
|
I have made a small testapplication where I use my mouse and when it moves triangles will appear....the thing is...it fickers on my screen,
caps.setDoubleBuffer(true) isn't working, any ideas on why?
thx
|
|
|
|
|
14
|
Java Game APIs & Engines / JOGL Development / Re: FSAA
|
on: 2006-03-16 21:06:47
|
|
I use windows XP and my graphics card is not very good I thing, it's built into my mother board and is a "Intel(R) 82915G Express Chipset Family"
do you think it can't handle antialiasing?
Also one more thing, this is something I thing is a problem as well. I have made a small testapplication vera I use my mouse and then it moves triangles will appear....the thing is...it fickers on my screen,
caps.setDoubleBuffer(true) isn't working, any ideas on that?=)...thx
|
|
|
|
|
15
|
Java Game APIs & Engines / JOGL Development / FSAA
|
on: 2006-03-16 10:29:20
|
|
I'm running the FSAA test that comes with JOGL and I get this message, and the FSAA isn't working.
"antialiasing will be disabled because none of the available pixel formats had it to offer"
what does that mean?
do I need to change something to get it to work?
thx
|
|
|
|
|
17
|
Java Game APIs & Engines / JOGL Development / Mouse control problem.
|
on: 2006-03-14 20:59:09
|
|
Hello, I wonder how you get control of the mouse in a game...
not in the regular sens like listeners...but like in a shootem up game where the aim always is in the middle of the screen and it never gets to the end of the frame so you can go around hoe much you want.
For me when I navigate at the moment I can only rotate untill the cursor comes to the end of the frame.
how do I solve this?
thx!
|
|
|
|
|
19
|
Java Game APIs & Engines / JOGL Development / Re: strange
|
on: 2006-03-09 14:52:31
|
|
public void init(GLAutoDrawable drawable) { GL gl = drawable.getGL();
gl.glClearColor(0, 0, 0, 0); gl.glEnable(GL.GL_DEPTH_TEST);
gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(-1, 1, -1, 1, -1, 1); }
public void display(GLAutoDrawable drawable) { GL gl = drawable.getGL(); GLU glu = new GLU(); GLUT glut = new GLUT(); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
glu.gluLookAt(0,0,0, 1,1,1, 0,1,0);
gl.glColor4d(1,0,0,1); glut.glutWireSphere(1, 100, 100);
}
|
|
|
|
|
20
|
Java Game APIs & Engines / JOGL Development / strange
|
on: 2006-03-09 09:30:23
|
|
I have made a very simple jogl thingy with just a wire spehere and when I resize or make the canvas redraw in some way the spehere rotates...
Anybody who knows why?
thx
|
|
|
|
|
21
|
Java Game APIs & Engines / JOGL Development / multisampling dem no effect.
|
on: 2006-03-09 09:07:15
|
|
I have tried the multisample deom in jogl and it doesn work, why is there no difference?
shouldn't this code be enough?
GLCapabilities caps = new GLCapabilities(); caps.setSampleBuffers(true); caps.setNumSamples(4); canvas = new GLCanvas(caps);
|
|
|
|
|
24
|
Java Game APIs & Engines / JOGL Development / Antialiasing
|
on: 2006-03-09 02:16:54
|
|
Hello, I'm running the multisample demo and there is no differences between the two and the
caps.getSampleBuffers() method returns false .....what does this mean...doesn't my graphics card support it or is something else wrong?
thx
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|