Hello everyone. I am having trouble with OpenGL 1.1 lighting. My code works on the iPhone 4 but not the iPhone 3G. Everything appears unlit (flat colours). I don't have a 3GS so I can't find out if it works on that one or not.
Here is my lighting setup:
- (void)setupLighting
{
const GLfloat lightAmbient[] = {0.2, 0.2, ...
I have this question in mind: I need to make a scene that looks like a real sky. My first idea was to make a cube and texturize it. It wasn't that good looking. I came up with the idea of using a sphere. But I couldn't light it from inside. I've put the camera on the origin watching (0,0,-100). Ambient and specular light source also at t...
I have a cube which I want to rotate. I also have a light source GL_LIGHT0. I want to rotate the cube and leave the light source fixed in its location. But the light source is rotating together with my cube. I use OpenGL ES 1.1
Here's a snippet of my code to make my question more clear.
GLfloat glfarr[] = {...} //cube points
GLubyte glu...
As I was reading RedBook I stayed quite confused, that openGL can have maximum 8 lights in scene (number depending on implementation, but should be arround 8).
But I can imagine number of situations that would need more lights, so I think there's a trick arround this in game dev.
For example, you have very long street with 50 strretl...
I have a 3D Modell of a house, where the roof is invisible so that the rooms can be seen
(like here)
But (for now) I have no textures and each surface has the same color, e.g.,
var myMaterial = new DiffuseMaterial (new SolidColorBrush(myColor))
If I view it in a WPF Viewport3D, I want to be able to differentiate between the surfaces....
Hey all,
I'm writing a little 3D engine for android to better learn the platform and opengl. I hope to eventually use it as a base for little 3D games.
I'm trying to implement lighting right now, and generally following the NeHe opengl android port tutorials. I have a simple spinning cube and 1 light that should not change posit...