Results 1 to 2 of 2

Thread: where is this wrong?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2001

    where is this wrong?

    The program is here.

    void CTopView::OnLButtonDown(UINT nFlags, CPoint point)

    GLuint CTopView::PickPoint(int x,int y)

    GLuint selectBuf[BUFSIZE];
    GLint hits;
    GLint viewport[4];

    glGetIntegerv(GL_VIEWPORT, viewport);

    glSelectBuffer (BUFSIZE, selectBuf);
    (void) glRenderMode (GL_SELECT);


    glMatrixMode (GL_PROJECTION);
    glPushMatrix ();
    glLoadIdentity ();
    gluPickMatrix((GLdouble)x, (GLdouble) (viewport[3] - y), 18, 18, viewport);
    gluPerspective(35.0, (GLfloat)viewport[2]/(GLfloat)viewport[3], 1.0f, 5000.0f);


    glPopMatrix ();
    glFlush ();

    hits = glRenderMode(GL_RENDER);


    anyone can tell me where this is wrong.

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2001

    Re: where is this wrong?

    Could you please tell us what exactly doesnt' work like it should?

    Does it draw polygons in purple, when they should be orange? Or does it dial into your local Krogers and get 1/2 gal skim when you want 2%?

    Some hints, please.

Similar Threads

  1. something wrong with my vc++???
    By allen_dog in forum OpenGL: Windows
    Replies: 2
    Last Post: 02-11-2004, 02:40 PM
  2. Not sure what's wrong
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-08-2003, 09:08 AM
  3. HELP! What am I doing wrong?
    By Ketzal in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-07-2001, 05:44 AM
  4. What's wrong with this?
    By EvilGenius in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-05-2001, 06:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean