Results 1 to 3 of 3

Thread: Plotting an image 1 (second question coming soon)

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    9

    Plotting an image 1 (second question coming soon)

    In VC++ 6.0, using an MFC application, I am plotting the contents of an array on the screen. My first problem is how can I force the image to plot so that the top left corner of the image is locked to the top left corner of the window - even when the window is resized. My gl initialisation looks like this:

    GLvoid CChildView::ReSizeScene(GLsizei w, GLsizei h)
    {

    GLfloat Entf;
    //Range Var

    Entf = (float)imageHeight;
    if(h == 0)
    {
    h = 1;
    }

    glViewport(0, 0, w, h);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();

    //Clipping volume (left, right, bottom, top, near, far)
    if(w <= h)
    {
    glOrtho(0, Entf, 0, Entf*h/w, 0, 1) ;
    }
    else
    {
    glOrtho(0, Entf*w/h, 0, Entf, 0, 1) ;
    }

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    }

    I am a meer novice at all this so please answer in plain english..!

    [This message has been edited by amuirwood (edited 08-24-2001).]

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    9

    Re: Plotting an image 1 (second question coming soon)

    PS Currently the bottom left corner of the image locks to the bottom left corner of the window.

  3. #3
    Guest

    Re: Plotting an image 1 (second question coming soon)

    Just use glRasterPos2f to postition your blit...

Similar Threads

  1. Coming back to OpenGL (1.2 to 3.3)
    By decimad in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-10-2014, 10:17 AM
  2. So, how is FBO on ATI coming along?
    By Jan in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 05-18-2005, 08:02 AM
  3. Well Gurus, how is OpenGL 2.0 coming along?
    By Robbo in forum OpenGL: Advanced Coding
    Replies: 102
    Last Post: 12-17-2002, 01:08 AM
  4. Plotting an image 2
    By amuirwood in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-24-2001, 04:45 AM
  5. I'm coming crazy...help me
    By KurtCob in forum OpenGL: Advanced Coding
    Replies: 14
    Last Post: 12-05-2000, 11:26 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