Results 1 to 4 of 4

Thread: Editing Screen Buffer

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    24

    Editing Screen Buffer

    How can I change the screen buffer (color buffer)? I want to add something (it doesn't matter what) to rasterized image. In other words, I want to work on rendered image/modify memory.

    Are they any functions in OpenGL (or glu, glut) supporting post-render screen manupilation?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Editing Screen Buffer

    Hi !

    You can use glReadPixels/glDrawPixels to read and write from/to the framebuffer.

    But remeber that none of these function are very fast as they have to transfer data from the GPU's memory to RAM and the other way around.

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    24

    Re: Editing Screen Buffer

    Thanks.

    I was thinking about that, but, as you wrote, these functions are not the fastest. So I am looking for a method of direct-writing/reading to/form screen buffer. If anyone has any idea, how to do this, I would be grateful for help.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    365

    Re: Editing Screen Buffer

    Originally posted by EraZer:
    So I am looking for a method of direct-writing/reading to/form screen buffer. If anyone has any idea, how to do this, I would be grateful for help.
    OpenGL doesn't provide a way of directly editing the frame buffer. However, depending on how you want to edit your frame buffer you can just copy it to a texture and use it(glCopyTexImageXX). With fragment programs you can then edit every texel(fragment) individually in any way you want. Fixed function/Reg combinders offers a more limited form of functionality, but still provides basic add/sub/mul/scale features.

Similar Threads

  1. Sample for 3D Terrain Editing
    By Ashish_Programmer in forum OpenGL: General
    Replies: 1
    Last Post: 01-29-2004, 09:03 PM
  2. editing opengl32.dll
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-09-2004, 02:58 PM
  3. editing the pixels
    By coda in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-04-2003, 02:36 AM
  4. editing variables
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 01-08-2001, 05:59 AM
  5. Off-screen frame buffer
    By zuoquan in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-30-2000, 02:50 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