PDA

View Full Version : A few basic questions on OpenGL



10-14-2006, 05:17 AM
Hi. I'm new to OpenGL and I have a few questions. I hope someone can help me :)

1. Is it possible to have different textures on the front and back of the object?
2. Is it possible to draw an object which has differently coloured outline and filling (for example a blue quad with red outline)?
3. Is it possible to draw for example a quad with dashed outline (something similar to line patterns but with outlines)?

memfr0b
10-14-2006, 05:56 AM
1. Is it possible to have different textures on the front and back of the object?You can achieve this by using culling and drawing in two steps:


2. Is it possible to draw an object which has differently coloured outline and filling (for example a blue quad with red outline)?Again, you need to draw in two steps. The polygon offset is necessary because lines and polygons are rasterized differently, which could cause the outline to be hidden.


3. Is it possible to draw for example a quad with dashed outline (something similar to line patterns but with outlines)? glLineStipple (http://www.mevis.de/opengl/glLineStipple.html) should affect polygon outlines.

10-14-2006, 10:29 AM
Great thanks :)