Questions tagged [picking]

149 questions
1
vote
1 answer

Unable to mouse pick a quad rendered in a framebuffer

Struggling to mouse pick a point/quad. I believe I am either using coordinates in the wrong space or perhaps not accounting for the framebuffer's position/size (it's a sub window of the main window). Tried converting to various different coordinate…
Jack
  • 39
  • 6
1
vote
2 answers

Matplotlib pick event from multiple series

I am doing a scatterplot where I want to click on the individual points to do something. This is like the existing example code. https://matplotlib.org/examples/event_handling/pick_event_demo.html I have implemented an on_pick method def…
opus111
  • 2,744
  • 4
  • 25
  • 41
1
vote
1 answer

iPhone OpenGL ES: glReadPixels not working

I trying to implement a simple picking function using glReadPixels however when I click on an object that is 1 colour, I get different values back depending on where I clicked on that object? There not special lighting etc? Whats going on? …
Burf2000
  • 5,001
  • 14
  • 58
  • 117
1
vote
1 answer

Ray picking with gluUnProject()

I have a quad on the y = -50 plane. At the moment, all I want to do is obtain the coordinates of a mouse click on the quad. I've managed to do this to a limited extent. The problem is that the transformations I applied when drawing the quad…
zoo
  • 1,901
  • 1
  • 17
  • 25
1
vote
1 answer

Cesium Get color of picked entity to compare

Is there any way to get color of picked entity on Cesium? Basically, I need to check the color of clicked entity, if its blue, change it to red and vice-versa. Is there any way to achieve this? Thanks in advance.
meen
  • 2,287
  • 3
  • 23
  • 42
1
vote
2 answers

is it possible to render to framebuffer object outside of main render loop

i am using a separate framebuffer object for color picking 2d objects in opengl. i am curious if its possible to only draw to the framebuffer and read the color when needed. what i am doing now is in the main render loop i draw the scene to the…
cuatro
  • 103
  • 2
  • 9
1
vote
1 answer

OPEN GL ES 1.0. World coordinates to screen coordinates

For 3d-picking I planned to do this: -Get touch coordinates (x, y) -Choose vertex from vertex buffer of my model (xM, yM, zM). -Then project by my own hands (xM, yM, zM) on the screen coords (xM, yM, zM) ---> (xP, yP, ...) and then check match (for…
mihael.t
  • 11
  • 1
1
vote
0 answers

Incorrect values written in stencil buffer

I am trying to pick objects on mouse click. For this I have followed this tutorial, and tried to use the stencil buffer for this purpose. Inside "game" loop I am trying to draw 10 (5 pairs) 'pick'able triangles as follows: ... glClearColor(red,…
Sayan Pal
  • 4,768
  • 5
  • 43
  • 82
1
vote
1 answer

GlunUnproject moving object with the mouse

I'm trying to move objects with the mouse using the Gluunproject method with openGL 2.1 , but i'm really struggling here; here's the code i wrote : int viewport[4]; double modelview[16], projection[16], X1, Y1, Z1; double realY; …
1
vote
1 answer

Picking with glRenderMode

I try to do OpenGL picking so I followed this post (OpenGL Picking on Selection Mode ) which seems to have a working solution but I can't make mine work. I have a 3D textured polygon in my scene and I would like to know when I click on it. Here is…
SteveTJS
  • 635
  • 17
  • 32
1
vote
2 answers

SharpDX GetPickRay issues

I am trying to get a picking ray from the current camera position/view so I can use it to select objects in the 3d world. The issue is that when I move the camera around, the ray becomes incorrect. Am I doing something wrong or is it a floating…
ManIkWeet
  • 1,298
  • 1
  • 15
  • 36
1
vote
2 answers

"objects map" in opengl

To keep it short: As we all know, opengl draws many triangles on the screen. What I want to know: If opengl draws triangles, it has to know, which triangle belongs to which pixel on the screen, right? Can I get this information too? For example call…
bricklore
  • 4,125
  • 1
  • 34
  • 62
1
vote
1 answer

Why Do I Always Zoom in When Picking? (OpenGL)

I have the following code: #define GLUT_DISABLE_ATEXIT_HACK #include #include #include #include GLfloat ctrlptsBezier[4][4][3] = { { {-2.0, -2.0, 1.0}, {-0.5, -2.0, 0.0}, {0.5,…
Rome_Leader
  • 2,518
  • 9
  • 42
  • 73
1
vote
1 answer

Picking objects in OpenGl ,using C#

i'm working with opengl using C#(using TaoFrame work ) ,the thing is that i want to draw 2 objects on screen (rectangle for example ),the main goal of my Question is, how to press the mouse button so i can select one object to make it move .…
Wazzz
  • 195
  • 1
  • 11
1
vote
4 answers

How do you determine when an object is drawn on-screen in OpenGL?

I'm extremely new to OpenGL. I'm writing a program that displays flying 3D text on screen. I need to know when certain text string appears (drawn) onto the screen and are visible to the user. The program needs to identify which text strings are…
Harry
  • 11
  • 1
  • 3