Hi to all I'm writing grafical simulation in jogl.
To generate terrain I'm using glTringlestrips and it's working fine.
Now I wanted to add glutSolidSphere to simulate objects.
And now problem scene is lighted ok without sphere but when I'm adding sphere is ligted properly and terrain is black
ok maby I wasnt to precized so I'm linking my project.
thing is that only part of my project is lighted properly rest is black
when I'm swiching spheres rest is lighted properly
so any help would by fantastic
It might be a bit much to ask someone to look at your entire project at once Maybe you could perform some experiments to narrow down the possible problem, then ask a simpler question? For example, what happens if you add a simple object like one triangle instead of a sphere?
and for one group of spheres:
gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, green, 1);
gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, red, 1);
Now the colours show for all: terain + 2 grups of spheres, but I've lost all depth in tarrain coulors it's flat (no shadows no briter points) - but when I'm disconecting spheres is once again looking ok.
I bet that this are material settings or somthing with light
any idea would be helpfull
p.s. I've added whole project because without all classes and imports you wouldn't be able to run it and see what I'm talnking about.
Another question sorry that in one post:
how to make the light in one place eaven when I'm turning arround the scene( i know thees are the basics) but I don't have freas mind I know that I should push and pop matriks someware or add angles correction somwhere