Love Chandigarh


Love Chandigarh

Recursive Drawing

A discussion on Recursive Drawing in Testing - Trash Garage, Ads, Old & Irrelevant Stuff forums; <div>Hello, I have a tree image which I am billboarding. I want to be able to draw this tree around 20 times randomly along my ...

   

Go Back   Love Chandigarh > Resources > Miscellneous > Trash Garage, Ads, Old & Irrelevant Stuff > Testing
LOGIN
HOME Blogs Latest   Register
  #1 (permalink)  
Old 16-11-2008
    Peter
Post Recursive Drawing

<div>Hello,

I have a tree image which I am billboarding.

I want to be able to draw this tree around 20 times randomly along my plane

Code:
glBegin( GL_POLYGON );
{
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-1.f, -1.0f, 0.0f);

glTexCoord2f(1.0f, 0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);

glTexCoord2f(1.0f, 1.0f);
glVertex3f(1.0f, 1.0f, 0.0f);

glTexCoord2f(0.0f, 1.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
}
glEnd();
The above will draw one instance of my tree, I tried to loop it and have that run 20 time...

<div style="margin:20px; margin-top:5px"> Code:
for (float x=1.0f;x
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumbleupon this post!Bookmark this post on Google!Share this post on Facebook!Spurl this Post!Reddit!
Reply With Quote
Reply

Tags
drawing, recursive


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Free-hand spatial 3D drawing Peter Testing 0 14-11-2008 11:21 PM


All times are GMT +5.5. The time now is 02:58 PM.



SEO by vBSEO 3.5.1 PL1 ©2010, Crawlability, Inc.