Hi, I want to put GLSL shader in my game to get realistic shadows and lighting. But when I use polygons GL_POLYGON ,they are totally black. Only thing that works OK with shader is glutSolid bullshit like glutSolidTeapot and glutSolidCube and so on. So I wanted to know the source of glutSolidCube function and I didnt found the source but I found that it somehow calculates the normals of each polygon. My question is how to attach normal to polygon. I don't want to use some default defined bullshit cause it is useless when you are making custom maps nad objects, it is good only for testing ,that's all (unfortunately each tutorial I've seen uses it). All I want is to know:
1.when I have some polygon using GL_POLYGON, how to give normals to it.
and
2.if you know 1., maybe you know how it would be with gluTesselator?
broli100 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.