Andreas Linden
Andreas Linden

Reputation: 12721

OpenGLES 1.x Toon shading

I am trying to get some toon shadding like effect for primitive types, ie. rectangles or triangles. for now I first render my vertices using GL_LINE_LOOP with GL_TEXTURE_2D disabled and then using GL_TRIANGLES with GL_TEXTURE_2D enabled. the effect is as follows.

http://oi43.tinypic.com/o03ssl.jpg

My questions are, 1. how can I get rid of the lines between the blocks and 2. how can I make the lines black without affecting everything else beeing rendered afterwards?

Upvotes: 0

Views: 407

Answers (1)

Tim
Tim

Reputation: 35933

For #1, two options

  1. rendering all lines before drawing any triangles (currently looks like you draw lines then triangles for each object individually).
  2. use the depth buffer to place your lines behind the triangles you are drawing.

For question #2, can you elaborate what you mean? Why would changing the line color to black affect anything else being rendered?

Upvotes: 2

Related Questions