Questions tagged [fbo]

Framebuffer object (FBO) is an OpenGL object type that allows rendering to textures or other user-allocated image buffers. Versions of OpenGL older than 3.0 can access an extension version of this functionality.

421 questions
2
votes
1 answer

OpenGL + SDL + Cannot Draw to Offscreen FBO

I have 2 programs - both OpenGL 3.x: one is a Win32 program (a modified NeHe tutorial) which creates a Window and GL context via wglCreateContext() and wlgMakeCurrent() one is an SDL2 progam Both programs call this function: int DrawGLScene(…
SparkyNZ
  • 6,266
  • 7
  • 39
  • 80
2
votes
0 answers

Android glReadPixels from PBO blocking/performance

I'm having an unusual problem while working on an openGL project. Essentially I require frame data in GRAYSCALE single channel format for some CV stuff. I'm using a custom shader, an FBO and PBO's to get the task done. The flow of the program is as…
2
votes
0 answers

Retrieve color of current texel in fragment shader

I want to retrieve the color of the current texel in my fragment shader so I can adapt the output color depending on it. For example: if the current texel's color is red then set the color to green. Above, you can see there are two triangles. One…
GuiTeK
  • 1,561
  • 5
  • 20
  • 39
2
votes
1 answer

Rendering layers of bitmaps with alpha to FBO

I need to draw several "layers" of bitmaps that are semi-transparent to a FBO (for later readback). My current approach is to create a FBO, attach a texture to it and use glTexSubImage2D to "draw" the bitmaps to the FBO, this however, doesn't work…
monoceres
  • 4,722
  • 4
  • 38
  • 63
2
votes
1 answer

How to correctly set the width and height of a FrameBuffer in libgdx?

I am using a FrameBuffer to rasterize several TextureRegions in a single TextureRegion, to be drawn on an Image/Actor afterwards. The constructor of a FrameBuffer is the following: FrameBuffer(Pixmap.Format format, int width, int height, boolean…
J. Doe
  • 85
  • 12
2
votes
1 answer

Crop Fbo to a bounding box in Openframeworks

I have a drawing inside fbo, and trying to decrease fbo size by cropping to the visible parts using bounding box. Here is a visual representation what I'm trying to achieve: bounding box example I found solution: pass fbo data to pixels and then…
Gordey
  • 23
  • 2
2
votes
1 answer

Image Processing on GPU- sucessive shaders for filters - FBO

I'm currently trying to implement in OpenGL image processing algorithms. I would like to successively use several shaders in order to perform several filters (Sobel Gaussian,...). I understood that to do this I had to render to texture thanks to a…
zenna
  • 9,006
  • 12
  • 73
  • 101
2
votes
2 answers

Using a FrameBufferObject with several Color Texture attachments

I'm implementing in my program the gaussian blur effect. To do the job I need to render the first blur information (the one on Y axis) in a specific texture (let's call it tex_1) and use this same information contained in tex_1 as input information…
user1364743
  • 5,283
  • 6
  • 51
  • 90
2
votes
1 answer

Retrieving FBO data in GLSL

I'm trying to get MRT working in OpenGL to try out deferred rendering. Here's the situation as I understand it. Create 3 render buffers (for example). Two RGBA8 and one Depth32. Create an FBO. Attach render buffers to FBO. ColorAttachment0/1 for…
Tom Savage
  • 3,172
  • 4
  • 31
  • 31
2
votes
1 answer

FBO lwjgl bigger than Screen Size - What I'm doing wrong?

I need your help again. I wanna use Frame Buffer Object bigger than the Screen size. When I do it as below FBO size 1024 x 1024 is cut off from the top in resolution 1024 x 768. I couldn't find the solution on my own - that's why I'm asking. First…
Przemek
  • 25
  • 4
2
votes
1 answer

Transparent frame buffers in webgl

I'm working on creating an color-trail effect in webgl. Basically I'd like to be able to select a range of colors from a texture and have them trail after the texture as its animated across the screen. My strategy was to both draw the texture to the…
Kev
  • 59
  • 4
2
votes
1 answer

Rendering to texture using FBO and shaders OpenGL

I want to load two textures in my FBO, one texture contains a HDR image, and my first target is to "copy" the image from first texture to second (which is empty), and called 'DownSamplingTex'. So I create FBO, load the texture I want to write in…
MikeFadeCrew
  • 107
  • 2
  • 11
2
votes
1 answer

OpenGL: only one FBO at a time works

I'm trying to render to a texture, then copy that texture and run it through post processing, then combine the filtered image with the original. I've got it so I can render to a a texture, then process it and display it, but I can only process it…
2
votes
1 answer

glDeleteFramebuffers explicit call

In OpenGL tutorials I never saw that someone call glDeleteFramebuffers before program finished. Should I delete FrameBuffer before close application? Or OpenGL driver will do this for me? P.S. Same question about texture glDeleteTextures.
tower120
  • 5,007
  • 6
  • 40
  • 88
2
votes
1 answer

How to render into FBO after "direct rendering to texture" without affecting the texture

I'm attempting to re-use FBO I have previously used for direct rendering into a texture. I want to render into this FBO, without affecting the texture and grab the pixels using glReadPixels. Normally, I would render anything and get the pixels using…
Jayco
  • 185
  • 2
  • 10