How to Draw tree using OpenGL
I am using visual stdio ... c++
how i can draw tree
I need help >>>
What is that thing that you call a tree anyway? Are you trying to visualize a data structure? Do you want to draw an image of a plant that people commonly refere to as a tree?
OpenGL(R) is lowlevel rasterization API, not a fancy 3D engine. There is no glDrawTrees( ) function. Using modern OpenGL(R), you have allocate a vertex buffer and probably index buffer and load a triangle approximation of whatever you call a tree into that. You have to write a shader program that runs on the GPU to transform the triangles of your "tree" and to determine the color of the pixels once the triangles get rasterized, etc....
If you want to quickly move forward with your one time tree drawing demands, my advice would be to use a highlevel 3D engine like this one or that one.
If you want to learn how to use OpenGL(R), it is adviseable to first understand what OpenGL(R) is and what it is not. If you understand what OpenGL(R) is, know what triangle rasterization means and have basic understandings of linear algebra, you will easily figure out (after some practice) how to draw a tree by building on top of the OpenGL(R) API.
As a starting point for OpenGL(R) tutorials, I would suggest this website.
Last edited by Agent D; 03-12-2014 at 06:58 AM.
thank u a lot my dear