Hey
Cant you use gluUnproject that turns mouse coords to world coords. Is that what u want?
"To err is human, to really mess up requires a computer"
"Only two things are infinite, the universe and human stupidity, and I''m not sure about the former. "
- Albert Einstein
Mouse woes
wow miss a day and see all the cool stuff people come up with!
My problem still though, is that I draw y # of triangle strips x long. And i cant seem to get the damn thing to render in the loop with glbegin and glend each iteration. ie
That wont work. If i can get the verts setup right to draw like that Selection, or Eber Kain''s method will work.
My problem still though, is that I draw y # of triangle strips x long. And i cant seem to get the damn thing to render in the loop with glbegin and glend each iteration. ie
|
That wont work. If i can get the verts setup right to draw like that Selection, or Eber Kain''s method will work.
What do you mean by "can''t get to render" ?
It doesn''t appear on screen ? or it doesn''t fill the selection buffer ?
do you use picking ?
It doesn''t appear on screen ? or it doesn''t fill the selection buffer ?
do you use picking ?
Right now I am trying to get it working with selection. But when I render it like that the terrain does not render properly (to selection or the visible one...)
I can post a screen shot if that would help?
I can post a screen shot if that would help?
If "it does not render properly" means that one border is bad, that may be because you start x at 2 (I recommend starting x at 3 in the ''for'' instruction).
I hope you decode the selection buffer correctly. Or else you''ll think it gives weird results but in fact they''re correct.
Anyway, you can post a screenshot. I think that would help a bit.
I hope you decode the selection buffer correctly. Or else you''ll think it gives weird results but in fact they''re correct.
Anyway, you can post a screenshot. I think that would help a bit.
Well I fixed that some how ... not quite sure what i did, but selection is not working. The only thing if anything that I can select is the one pushed at the biginning of the selection code (c/o nehe''s tutorial) If you want me to post the code just say the word! I appreciate all the help
The only I''ll say is that you need to use a buffer which can contain enough information, say, at least 4096 bytes for huge selection like yours. If you use a small buffer (say, less than 128 bytes), OpenGL will ignore all bytes that should be written ''over'' the buffer limit when each new hit happens.
Ingenious!!! Thats helping!, only now that my buffer is 8192, Im getting values when i click on stuff. Only that its like -4250000 or other crazy values. Yet Im pushing from 0 and up. so thats kinda odd.
Any ideas about this? ... and have you ever seen such difficulty with selection!!! omg
Any ideas about this? ... and have you ever seen such difficulty with selection!!! omg
another thing:
Its still not working for every polygon of the terrain. only some?
Its still not working for every polygon of the terrain. only some?
It does exclusively work the polygons that are in the field of view.
If you use selection without picking, then it will return all the names pushed for polygons visible on screen.
If you use picking, you''ll only get polygons that are a few pixels around the mouse coordinates.
The buffer is a bit hard to decode.
It gives exclusively integers.
As far as I remeber, the format is :
[stack_depth][z1][z2][name_1][name_2]...[name_n]
for each hit.
I have to check, though.
Wait a few seconds please
If you use selection without picking, then it will return all the names pushed for polygons visible on screen.
If you use picking, you''ll only get polygons that are a few pixels around the mouse coordinates.
The buffer is a bit hard to decode.
It gives exclusively integers.
As far as I remeber, the format is :
[stack_depth][z1][z2][name_1][name_2]...[name_n]
for each hit.
I have to check, though.
Wait a few seconds please

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement