terrain draw circle

Started by
1 comment, last by g3m0r 12 years, 5 months ago
Hello,

I have a problem, I want to make a terrain editor.

Now I want a circle on the terrain as brush for gaining terrain height on a specific area or for paint texture.

How can I code this, with OpenGL 1 (without Shading Language) so that every computer with opengl can run that?
Do you know a terrain-application with source-code where I can look?


best regards,
g3m0r
Advertisement
Supposing you have the point where your mouse intersects the terrain, you could get the distance from each of the terrain's vertices to your mouse point. For each vertex, if the distance is below the radius of your circle, set the vertex color to the highlight color.

That's how I do it, granted I use per pixel rather than per vertex.
ok, thanks ;)

This topic is closed to new replies.

Advertisement