OPEN GL question

Discussion in 'OT Technology' started by D1G1T4L, May 17, 2009.

  1. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    I am using GL_POLYGON to create a button and put a texture on. I, however, can't find a way to make it clickable. Does anyone know how it's possible to make a clickable button in open gl?
     
  2. modspace

    modspace New Member

    Joined:
    Feb 22, 2006
    Messages:
    190
    Likes Received:
    0
    Location:
    oklahoma
    pretty sure you are going to have to make your own hit test.
    if you are using windows, then in your WM_MBUTTONDOWN notifcation, get x and y values with
    xPos = GET_X_LPARAM(lParam);
    yPos = GET_Y_LPARAM(lParam);


    check to see whether they are within your button
     

Share This Page