Thread: glDrawPixels

  1. #1
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926

    glDrawPixels

    are these functions glCopy Pixels, glDrawPixels... do they work in Perspective view. I have only seen them work in Ortho and that is all I can get them to work in also.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    works for me without orhto view

    Code:
    void drawImage() {
    	
    	// draw 'display' image
    	glClear(GL_COLOR_BUFFER_BIT);
    	glRasterPos2d(-1, -1);
    	glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)display);
    	glFlush();
    
    }
    
    ....
    void initGL(GLint width, GLint height) {
      
    	glMatrixMode(GL_PROJECTION);
    	glLoadIdentity();
    	glViewport(0, 0, (GLsizei)width, (GLsizei)height);
    }

  3. #3
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    nothing in your code above is perspective?? I meant with gluPerspective or glFrustum. With the depth buffer enabled and everything.
    [EDIT]Got it to work; I forgot to translatef down on the z buffer
    Last edited by linuxdude; 07-15-2004 at 04:40 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can I have some Sample Code? (OpenGL, glDrawPixels();)
    By Shamino in forum Game Programming
    Replies: 98
    Last Post: 11-03-2005, 10:46 AM
  2. glDrawPixels()
    By thedoofus in forum Game Programming
    Replies: 4
    Last Post: 05-13-2005, 06:48 AM