Jump to content

  • Log In with Google      Sign In   
  • Create Account


Selection buffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Neo_the_great_hacker   Members   -  Reputation: 122

Like
Likes
Like

Posted 31 July 2001 - 06:30 AM

Hi, I have a little problem with selecting objects from my scene. I found out that the problem in the code is, that in my resize function I have these lines of code: if (w <= h) glOrtho (-nRange, nRange, -nRange*h/w, nRange*h/w, - nRange *2, nRange*2); else glOrtho (-nRange*w/h, nRange*w/h, -nRange, nRange, -nRange*2, nRange*2); with w being the window width, and h the height. Know, when I use theese two lines of code, I get strange results, because somehow the things seem to be switched, when I click on one object, the selection buffer registers a hit for an other object. Wheras when I substitute the four lines with this line: gluPerspective(45.0f, fAspect, 1.0, 425.0); it works, only that the scene isn''t resized correctly. Do you guys know the reason????

Sponsor:

#2 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 31 July 2001 - 10:29 AM

how about
glOrtho (-nRange*h/w, -nRange*h/w, nRange*h/w, nRange*h/w, - nRange *2, nRange*2);

#3 thuned   Members   -  Reputation: 122

Like
Likes
Like

Posted 31 July 2001 - 12:21 PM

i think ur selection mode has to be in the same ortho mode too to work correctly.

#4 Neo_the_great_hacker   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 12:10 AM

quote:
Original post by zedzeek
how about
glOrtho (-nRange*h/w, -nRange*h/w, nRange*h/w, nRange*h/w, - nRange *2, nRange*2);


This line in the Selection function??? It didn''t work there.



#5 phueppl1   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 August 2001 - 05:53 PM

Use the backbuffer :o)...

cya,
Phil

Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS