Results 1 to 3 of 3

Thread: How to Draw tree using OpenGL

  1. #1
    Newbie Newbie
    Join Date
    Mar 2014
    Posts
    2

    Lightbulb How to Draw tree using OpenGL

    Hello

    I am using visual stdio ... c++

    how i can draw tree

    ??

    I need help >>>

  2. #2
    Senior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    281
    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.

  3. #3
    Newbie Newbie
    Join Date
    Mar 2014
    Posts
    2
    thank u a lot my dear

Similar Threads

  1. OpenGL: dynamic depth sorting with BSP Tree
    By Eerie Code in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-14-2014, 10:54 AM
  2. Tree structure in Opengl
    By Raketman in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-11-2012, 07:38 AM
  3. Help ?? How can i draw a tree???
    By NeoRoland in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-14-2004, 08:06 AM
  4. draw recursive tree
    By caophong in forum OpenGL: Linux
    Replies: 3
    Last Post: 04-29-2001, 10:13 PM
  5. to draw a tree
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-11-2001, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean