Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Tree structure in Opengl

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    wrwrqwrqw
    Posts
    14

    Tree structure in Opengl

    hello, Im making an opengl program where i need to organize data into a tree structure. I wanna visualize this tree structure like in eg. windows Explorer. Does someone know where i can find an existing implementation. I already found some tree structures to use with MFC, but my program is set up as an opengl window. So I cant use MFC drawing commands. Modifying this existing structure is too complex.

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    wrwrqwrqw
    Posts
    14

    Re: Tree structure in Opengl

    Or is it possible to use MFC drawing commands in an opengl window ? I mean a CDC object to draw lines and stuff.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    2

    Forced to use OpenGL

    Quote Originally Posted by Raketman View Post
    hello, Im making an opengl program where i need to organize data into a tree structure. I wanna visualize this tree structure like in eg. windows Explorer. Does someone know where i can find an existing implementation. I already found some tree structures to use with MFC, but my program is set up as an opengl window. So I cant use MFC drawing commands. Modifying this existing structure is too complex.
    I have looked at GLUI and I do not find any documentation of how trees are implemented in OpenGL. I am aware that OpenGL is not designed for 2D widgets like that and that I should use something like MFC or .Net, but I have to implement a 2D touch screen in a 3D virtual environment world and the only option I have is to implement in OpenGL. Do anyone have any idea of where to point to? I have looked at the rollouts in GLUI, but that isn't close enough to what I am looking for.

  4. #4
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    Look for CEGUI. It seems to support everything, even tree controls.
    There is a screenshot of one here :
    http://blog.cjohnson.id.au/game-deve...rted-to-cegui/
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    2
    This looks promising, thank you. I'll come back and let everyone know whether this works for my specific situation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •