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

FBO: render to texture, wrong texture mapping when drawing rendered texture

I'm using OpengGL on a Mac OS X application to draw texture on a NSOpenGLView. The app is a movie player. It decodes movie frames into CVOpenGLTextureRef (which are OpenGL texture) and I draw them directly to the view using GL_QUAD. Everything works…
Andrea3000
  • 1,018
  • 1
  • 11
  • 26
2
votes
1 answer

Android opengl 1.1 Render to Texture 1286 error (Invalid framebuffer operation)

I am trying to implement a motion blur effect in my android game. After a lot of research I found that the best way to do that is to save the previous frame as a texture using the Frame Buffer Object and render it on top of the current frame. So…
SteveL
  • 3,331
  • 4
  • 32
  • 57
2
votes
1 answer

multisampled FBO depth/stencil and OpenGL specs

the OpenGL 4.2 specs (section 3.3.1) clearly states that: Because each sample includes color, depth, and stencil information, the color (including texture operation), depth, and stencil functions perform equivalently to the single-sample mode. …
user815129
  • 2,236
  • 2
  • 20
  • 40
2
votes
2 answers

OpenGL Render to texture (FBO) does not work

I'm trying to use FBO to render to texture and then display the texture, but all I get is a black rectangle. My code is: Initialization: #include #include #include #include // ... GLuint fbo_, rbo_,…
Dan Nestor
  • 2,441
  • 1
  • 24
  • 45
2
votes
2 answers

How to render to frame buffer without displaying on screen with OpenGL?

I knew it is possible to render offline without displaying it on screen. How to do it, maybe create an invisible window then draw. Can I use specific fbo when render?
tomriddle_1234
  • 3,145
  • 6
  • 41
  • 71
2
votes
1 answer

how to handle depth in glsl

I have a problem with FBO and depth in openGL. I am passing projection, view and model matrices to a shader that writes to the g buffer. When I unbind the FBO and write to gl_FragColor the scene displays as it ought. But when I write to…
ste3e
  • 995
  • 1
  • 9
  • 18
2
votes
1 answer

OpenGL: Loading images into texture array

I'm trying to load multiple textures (from 8x8 *.bmp images) into multiple FBOs, by the following snippet: glTexImage3D(GL_TEXTURE_2D_ARRAY_EXT, 0, GL_RGB8I_EXT, TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_NUM, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); for(…
fatarms
  • 543
  • 10
  • 19
2
votes
1 answer

How to blit two transparent frame buffer objects using QOpenGLFramebufferObject?

I have two FBOs created using QOpenGLFrameBufferObject, which are images with a transparent background and some lines and text on top of them. I am blitting the first fbo onto the second using QOpenGLFramebufferObject::blitFramebuffer, this results…
reckless
  • 741
  • 12
  • 53
2
votes
3 answers

Can glReadPixels be used to read layers from GL_TEXTURE_3D?

I'm trying to read a 3D texture I rendered using an FBO. This texture is so large that glGetTexImage results in GL_OUT_OF_MEMORY error due to failure of nvidia driver to allocate memory for intermediate storage* (needed, I suppose, to avoid changing…
Ruslan
  • 18,162
  • 8
  • 67
  • 136
2
votes
1 answer

Using Frame Buffer Objects (FBO) in Borland C++ Builder 6

I have an "access violation" on the Frame Buffer Object (FBO)'s command glGenFramebuffersEXT : void TGLForm::DrawScene() { wglMakeCurrent(ghDC, ghRC); glEnable(GL_TEXTURE_2D); GLuint framebuffer, texturefbo; GLenum…
Arnaud
  • 109
  • 3
  • 15
2
votes
1 answer

Can't create FBO with more than 8 render buffers

So, here's the problem. I have got an FBO with 8 render buffers which I use in my deferred rendering pipeline. Then I added another render buffer and now I get a GLError. GLError( err = 1282, description = b'invalid operation', baseOperation =…
Denis
  • 719
  • 2
  • 8
  • 23
2
votes
3 answers

Scaling a texture with a Framebuffer

My goal is to be able to scale textures when they are loaded, so I don't have to do it on every frame the sprite gets rendered. I figured the best method would be to render the scaled texture onto another texture, basically caching it. However, with…
rcapote
  • 1,034
  • 7
  • 19
2
votes
1 answer

WebGL2 FBO depth attachment values

I'm simply trying to render the depth values of my scene using WebGL2 like so: //Texture depthTexture = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, depthTexture); gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_COMPONENT24, width,…
Doc
  • 53
  • 7
2
votes
2 answers

Multisampled FBO's in OpenGL ES 3.0

How is it possible to have a multisampled texture as part of an FBO in OpenGL ES 3.0 (Android)? The method glTexImage2DMultisample does not seem to exist. I also want to call glReadPixels on this texture later on in this code, so the multisampled…
kirtan-shah
  • 405
  • 7
  • 21
2
votes
1 answer

OpenGL warp effect with too few polygons

I am working on a small 2d game where my wizards casts a spell I want to create an effect where the world warps as if the spell is bending Light much like hot air around a fire would. Right now I have a vertex shader warping the points of the…
SpecialEd
  • 473
  • 5
  • 17