Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7410705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:16:27+00:00 2026-05-29T06:16:27+00:00

I have a rendering step which I would like to perform on a dynamically-generated

  • 0

I have a rendering step which I would like to perform on a dynamically-generated texture.

The algorithm can operate on rows independently in parallel. For each row, the algorithm will visit each pixel in left-to-right order and modify it in situ (no distinct output buffer is needed, if that helps). Each pass uses state variables which must be reset at the beginning of each row and persist as we traverse the columns.

Can I set up OpenGL shaders, or OpenCL, or whatever, to do this? Please provide a minimal example with code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:16:28+00:00Added an answer on May 29, 2026 at 6:16 am

    Yes, you can do it. No, you don’t need 4.X hardware for that, you need fragment shaders (with flow control), framebuffer objects and floating point texture support.

    You need to encode your data into 2D texture.

    Store “state variable” in 1st pixel for each row, and encode the rest of the data into the rest of the pixels. It goes without saying that it is recommended to use floating point texture format.

    Use two framebuffers, and render them onto each other in a loop using fragment shader that updates “state variable” at the first column, and performs whatever operation you need on another column, which is “current”. To reduce amount of wasted resources you can limit rendering to columns you want to process. NVidia OpenGL SDK examples had “game of life”, “GDGPU fluid”, “GPU partciles” demos that work in similar fashion – by encoding data into texture and then using shaders to update it.

    However, because you can do it, it doesn’t mean you should do it and it doesn’t mean that it is guaranteed to be fast. Some GPUs might have a very high memory texture memory read speed, but relatively slow computation speed (and vice versa) and not all GPUs have many conveyors for processing things in parallel.

    Also, depending on your app, CUDA or OpenCL might be more suitable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does IE8 have rendering bugs like IE6 or IE7? If I make my site
The documentation implies that you can either have 3D rendering or framebuffer mode, and
I have an image that I'm rendering like this: glDrawPixels(image->width, image->height, GL_BGR, GL_UNSIGNED_BYTE, image->imageData);
I have a multi-threaded C++ app which does 3D rendering with the OpenSceneGraph library.
I've have a rendering setup in which I write to a Frame Buffer object
I have a form representing a survey that is dynamically generated based on some
I have a rendering error in this website which I haven't seen anywhere else.
I would like to know the OpenGL Rendering settings for having a program render
I have an opengl scene rendering on an EAGLView layer and some other elements
I have a problem with rendering my html page by the same browsers in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.