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
3
votes
1 answer

OpenGL drops performance when writing to nonzero FBO attachment on AMD

I noticed that my 3D engine runs very slow on AMD hardware. After some investigation the slow code boiled down to creating FBO with several attachments and writing to any nonzero attachment. In all tests I compared AMD performance with the same AMD…
Sergey
  • 7,985
  • 4
  • 48
  • 80
3
votes
1 answer

ThreeJS FBO Particle Lighting and Shadows

Update: I decided to implement a simple lighting solution from this link, http://blog.edankwan.com/post/three-js-advanced-tips-shadow, suggested by ScieCode. It's the first part of the linked page. The result can be seen in the picture at the…
M1ke
  • 239
  • 2
  • 11
3
votes
2 answers

Texture lookup inside FBO simulation shader

I'm trying to make FBO-particle system by calculating positions in separate pass. Using code from this post now http://barradeau.com/blog/?p=621. I render sphere of particles, without any movement: The only thing i'm adding so far is a texture in…
3
votes
1 answer

Is regeneration of MipMaps when using Render to Target via FBOs required?

Assuming mipmapping is desirable: I call glGenerateMipmapEXT(GL_TEXTURE_2D); when I first allocate the render target for my FBO. Do I have to call this again when I've completed rendering to it to correctly populate all the mipmapping levels, or do…
Chad Mourning
  • 608
  • 2
  • 12
  • 25
3
votes
2 answers

OpenGL multiple render target FBO with multisampling - requirements

When creating a multisample FBO, do all attached target textures need to be multisample-textures?
St0fF
  • 1,553
  • 12
  • 22
3
votes
1 answer

FBO to separate textures

How do I set FBO so it renders depth and color buffer in two separate textures, in one rendering pass ?
Pythagoras of Samos
  • 3,051
  • 5
  • 29
  • 51
3
votes
1 answer

OpenGL - Where is the state set by glDrawBuffers stored?

If I understand correctly, you can attach textures to an FBO and then use glDrawBuffers to link those attachment points to (fragment) shader output indices. Where is this latter state stored after a glDrawBuffers call? The currently bound shader,…
AdyAdy
  • 988
  • 6
  • 19
3
votes
0 answers

glTexImage2D memory usage in RAM (used in conjunction with an FBO)

When using glTexImage2D to attach textures to a Framebuffer Object (FBO), i recognized that the memory usage goes up in RAM. It looks like textures are allocated by OpenGL not only on the GPU but also in main memory. Why is that happening? Does it…
j00hi
  • 5,420
  • 3
  • 45
  • 82
3
votes
1 answer

Render QWidget to FBO

I am programming a VR app in Qt and need to show QWidget on the desktop and also inside VR. So far I am rendering like this: QOpenGLPaintDevice device(QSize(w12,h12)); QPainter painter(&device); gl_functions->glBindFramebuffer(GL_FRAMEBUFFER,…
pazduha
  • 147
  • 3
  • 17
3
votes
1 answer

Rendering transparent texture onto glTexture

I've been working in opengl for a while relatively smoothly, but recently I've noticed that when I render a primitive with a transparent texture onto my fbo texture (custom frame buffer) it makes the fbo texture transparent at the pixels the…
3
votes
2 answers

OpenGL FrameBuffer and glViewport

I am going through a render pass onto a FrameBufferObject such that I can use the result as a texture in the next rendering pass. Looking at tutorials, I need to call: glBindFramebuffer(GL_TEXTURE2D, mFrameBufferObjectID); glViewport(0, 0, mWidth,…
ChaoSXDemon
  • 860
  • 10
  • 29
3
votes
0 answers

Get FrameBufferObject from vtkRenderWindow

I'm pretty new to VTK world. I'm using PCL Library to visualize PointCloud data. The PCLVisualizer uses VTK library under the hood, to visualize the point clouds. I would like to access the FrameBuffer Object. PCLVisualizer exposes getRenderWindow()…
Michal Gallovic
  • 4,109
  • 2
  • 18
  • 25
3
votes
1 answer

Multisampling with glBlitFramebuffer

This is my first attempt to do multisampling (for anti-aliasing) with opengl. Basically, I'm drawing a background to the screen (which should not get anti-aliased) and subsequently I'm drawing the vertices that should be anti-aliased. What I've done…
KO70
  • 189
  • 2
  • 15
3
votes
0 answers

LibGDX Sprite is drawn white (but transparency is working)

I am working on a game project using LibGDX. Now I'm facing a problem I can't understand; let me explain what I've got before coming to the actual problem: Static background C (tiled) Moving background B (tiled) Moving background A…
Azurlake
  • 612
  • 1
  • 6
  • 29
3
votes
2 answers

Visual issue using Frambuffer Object as texture

My OpenGL engine draws a given scene into a Framebuffer Object, then uses its color attachment as a texture. It is then put on a square in the viewport. The problem is that I see a strange visual artifact: The square is built with glm::vec2…
Shepard
  • 801
  • 3
  • 9
  • 17