Help ?? How can i draw a tree???

Plese a need help to draw a tree in Opengl, using textures bmp,jpeg

do a search on “billboarding”
www.gamedev.net I think has a tutor on this.

Originally posted by NeoRoland:
Plese a need help to draw a tree in Opengl, using textures bmp,jpeg

Nop , i can’t found ??

:slight_smile:

I need a basic example ,and , how can i load a texture with transparent

please !!! :`( :’(

There are loads of billboarding examples kicking around the web. Try nehe.gamedev.net for one, they’ve probably got something. Actually, I’ve just checked, there are no tree examples, but check out lessons 9, 19 and 33 for information relating to what you want to do. For the rest of the info, Google is your friend.

I’ve just checked and there’s a Direct3D sample app that does billboarded trees. I know I’m risking life and limb mentioning the other API here, but you could learn the basic method from there (as long as you remember to fudge your matrices back to the OGL way when you come to build it using OGL )

As for transparent textures, you mention bmp and jpgs, neither of those formats supports an alpha channel (well, ok, bmp does, but the spec is so badly formed that nothing works right). Check out wotsit.org and look for a file format description of TGAs. Really easy format, simple RLE compression, and they support up to 32 bit images.

(or just plug libpng into your code )

I don’t think you tried very hard, I put the words “billboarding” and “openGL”.

Here was the first hit:

A tutor on billboarding with openGL.
http://www.lighthouse3d.com/opengl/billboarding/index.php3?billInt

second hit from google:
another tutor on billboarding and the image use is of a tree
http://www.sgi.com/software/opengl/advanced97/programs/programs.html

nehe.gamedev.net has a tutor on images with transparency.

[This message has been edited by nexusone (edited 03-13-2004).]

thanks a lot