Results 1 to 6 of 6

Thread: Front to Back

  1. #1
    Member Contributor
    Join Date
    Aug 2001
    Location
    sdddskskfj
    Posts
    54

    Front to Back

    Hi guys. I'm a newbie with opengl and would like to know a way to copy my Front Buffer to the Back Buffer. Is it possible? or I can swap only from back to front?

    Thank you!

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: Front to Back

    take a look at

    glDrawBuffer
    glReadBuffer
    glCopyPixels

  3. #3
    Member Contributor
    Join Date
    Aug 2001
    Location
    sdddskskfj
    Posts
    54

    Re: Front to Back

    Thank yoy Mazy.

    But how I DO I use glCopyPixels? I've been trying to make it work the entire day, but til now, nothing....

    Look how I'm doing:

    glReadBuffer(GL_FRONT);
    glDrawBufer(GL_BACK);
    glRasterPos3f(0.0f, 0.0f, 0.0f);
    glCopyPixels(10, 10, 50, 50, GL_DEPTH);
    glCopyPixels(10, 10, 50, 50, GL_COLOR);
    glDrawBufer(GL_BACK);
    glReadBuffer(GL_BACK);

    I don't know why... but it don't work!!


    Help me please!

    Thank you
    Fernando.

    [This message has been edited by Fernando (edited 12-18-2002).]

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Front to Back

    Make sure the raster position is actually where you want it. Draw a single point at the raster position and see if it appears where you want it. If it doesn't, maybe the raster position is outside the window, which makes it invalid.

  5. #5
    Member Contributor
    Join Date
    Aug 2001
    Location
    sdddskskfj
    Posts
    54

    Re: Front to Back

    Yeah!!!

    I was giving the a wrong value for the Z axis.

    Now I'm using glRasterPos3f(0.0f, 0.0f, -1.0f) and there's a black box appearing on the center of the screen isntead of the front buffer....

    Do you have any hints?

    Thank you
    fernando

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Front to Back

    All I can say right now is that something is wrong, but that's obvious. You have to provide more information, preferably code (only relevant pieces).

Similar Threads

  1. Front-to-back Blending
    By imported_Alemarius Nexus in forum OpenGL: General
    Replies: 10
    Last Post: 07-20-2011, 08:16 AM
  2. Front to Back vs Back to Front Compositing
    By balogna in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 12-11-2005, 12:11 PM
  3. sorting front to back
    By zed in forum OpenGL: Advanced Coding
    Replies: 17
    Last Post: 06-07-2005, 08:35 PM
  4. what is faster? fill front and back or only front
    By Jan in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 02-21-2002, 06:11 AM
  5. Front to back drawing...
    By Anonymous Coward in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-05-2001, 03:59 AM

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