Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

OPENGL : how to create a tree?

komet81komet81 Member Posts: 1
how to create a tree using opengl programming?
from my research, i've found that we can create a simple tree by using a recursive function. but, i have no idea how to start.

is there any library to draw a tree?

Comments

  • XLoomXLoom Member Posts: 129
    I don't fully understand this question. Do you mean tree as a data structure or do you mean tree like pinetree or oak or something like that?

    If you have a data structure, where data is represented as a tree, then yes, you could use recursive function to follow through nodes of the tree and draw whatever they represent at correct locations, which depend on what you need.

    If you mean a natural tree, then an easiest way would probably be to load an entire model of a tree and later draw it. There are plenty of tutorials on how to load models into OpenGL application. http://nehe.gamedev.net might be a good place to look at for anyone using OpenGL.

    Good luck,
    XLoom
Sign In or Register to comment.