Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [frame-buffer]

The tag has no usage guidance.

11
votes
1answer
1k views

Deferred decals normal problem

I've been working on a deferred decal system. So far I have finished the projection part, meaning I can click something in the scene and it will properly project a decal onto the surface of the object....
6
votes
2answers
3k views

OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about glReadPixels but it looks really slow. Can you suggest a more efficient or just an alternative way for just copying what is ...
6
votes
0answers
2k views

OpenGL problem with FBO integer texture and color attachment [closed]

In my simple renderer, I have 2 FBOs one that contains diffuse, normals, instance ID and depth in that order and one that I use store the ssao result. The textures I use for the first FBO are RGB8, ...
5
votes
1answer
159 views

Best way to initialize values on 32-bit FP framebuffer in OpenGL

I have a framebuffer bound to 32-bit FP texture: ...
5
votes
1answer
501 views

Why does writing to a D3DFMT_R32F render target clamp to 1?

I'm currently implementing a picking system. I render some objects in a frame buffer, which has a render target, which has the D3DFMT_R32F format. For each mesh, ...
4
votes
1answer
260 views

Problem of saturation of ram on XNA?

I developed a small xna games. For some time I have a problem with the saturation of RAM. In fact everything works perfectly, the game runs with a "Frame" of 60fps. But strangely I do not know for ...
4
votes
1answer
1k views

OpenGL FBO not being drawn to

In my project I'm trying to implement a deferred rendering system, problem is, I can't seem to get a second FBO to work. UPDATE 1 Here is the FBO initialization code: ...
4
votes
1answer
875 views

How to attach a framebuffer to a whole cube map from a GL_TEXTURE_CUBE_MAP_ARRAY?

I'm trying to make shadow cube maps in an array. I want to draw each shadow map with a single pass using a geometry shader, which I read about here: https://stackoverflow.com/questions/462721/...
3
votes
2answers
6k views

OpenGL : sluggish performance in extracting texture from GPU

I'm currently working on an algorithm which creates a texture within a render buffer. The operations are pretty complex, but for the GPU this is a simple task, done very quickly. The problem is that, ...
3
votes
1answer
111 views

How to determine what color will be written into single pixel framebuffer?

I thinking about rendering into single pixel (1x1) framebuffer. For example we have two triangles which covers whole NDC area, one is green second red. What color will be written to 1x1 framebuffer? ...
3
votes
1answer
3k views

OpenGL Framebuffer Object issue

I am struggling with implementing a proper Framebuffer Object . glCheckFramebufferStatus is returning me: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT (36054). What am i missing? ...
3
votes
0answers
488 views

OpenGL transparent framebuffer texture

I'm trying to implement atmospheric glow like this. It was a huge pain to get it done, since I'm new to FBO and OpenGL, but I managed to do something similar to what the OP wanted. I followed his ...
2
votes
1answer
2k views

Shadow map: depth texture always returns 0

I'm implementing a shadow map for the sun light in my voxel engine using a depth texture attached to a framebuffer. But when I sample the depth texture during the normal pass, the value returned is ...
2
votes
2answers
8k views

Anti Aliasing: How to implement supersampling in OpenGL?

I'm learning OpenGL by working on a small Oculus Rift project, which implies, anti aliasing is everything :). Since the application of the barrel distortion shader requires rendering to a framebuffer ...
2
votes
2answers
827 views

Render-to-texture doesn't work on nvidia cards. OpenGL 3.3

I've implemented some postprocessing effects (DOF, HDR, Bloom) into my engine. I've tested it on AMD card which supports OpenGL 4.2. Yesterday I've made a test on NVidia card which supports only ...
2
votes
1answer
331 views

OpenglGL Render two scenes with one draw call

I need to draw a normal-vector scene and default scene. I could achieve this my having two programs with different fragment shader to produce the following images. It will require me to draw twice. <...
2
votes
1answer
681 views

Render scene depth to texture via FBO?

I'm trying to render my scene's depth via FBO and Render To Texture. I have a scene that I'm rendering to a texture, then render that texture to a fullscreen quad in a second pass using a fragment ...
2
votes
2answers
437 views

How do multiple render targets get rendered onto the back buffer(s) then screen?

I'm using DX11. I understand how render targets are created, set, and why they are used, but I am really unsure how this all plays together with presenting it to the screen. Does the GPU ...
2
votes
1answer
615 views

Opentk hdr rendering with framebuffer white screen problem

I am trying to do hdr rendering with two shader programs: one simply draws a hdr texture on a fullscreen quad and the other one does tonemapping. I am trying either linear tonemapping ...
2
votes
1answer
3k views

OpenGL FBO, render off screen and texture

I need to do some offscreen render to use the rendered image in something different from OpenGL context (for instance I need to use the image in a QListWidgetItem inside a Qt application). After ...
2
votes
1answer
906 views

Stencil Buffer not working as expected in OpenGL ES 2.0 (Android)

I'm trying to get to grips with the stencil buffer. Apart from setting up viewport, camera, etc, my OpenGL ES 2.0 initialisation code is: ...
2
votes
0answers
437 views

OpenGL (lwjgl) Frame Buffer Object GL_COLOR_ATTACHMENT Not Being Written To

I am currently developing a deferred renderer for my game engine and I have to output multiple textures from my shader to my GBuffer. I have been struggling with getting multiple outputs from the ...
2
votes
0answers
303 views

OpenGL: Avoid geometry shader for cubemap framebuffer

I want to render an environment map into a cubemap framebuffer but I dislike the fact, that I have to use the geometry shader to set gl_Layer because the geometry ...
2
votes
0answers
1k views

How to implement OpenGL triple buffering of buffer objects to avoid stalls?

I'm trying to implement the triple buffering described here. The intent is to gain higher frame rate by avoiding waiting for glBufferSubData() to finish. My ...
2
votes
0answers
625 views

glFramebufferTexture2D gives corruption with cube map textures

I am using glFramebufferTexture2D with cube map textures but it gives corruption in texture. draw_cube() function works perfectly when i draw that on default framebuffer. ...
1
vote
2answers
8k views

Resizing a Framebuffer Object (ie: its attachments) on Screen Resize

I have been experimenting with some post-processing effects and I have been using FBOs to store stuff. The problem is, I attempt to resize them when I change resolution. I get no errors, however the ...
1
vote
1answer
201 views

Render 2D texture on the cube texture at given location

I would like to simulate a moving sun on the sky. What I have managed to do so far is calculating the exact location of the sun, that is the 3D direction vector from the camera's position in the world ...
1
vote
1answer
344 views

What is the purpose of bitdepth for the several components of the framebuffer in glfwWindowHint function of GLFW3?

I would like to know what are the following "framebuffer related hints" of GLFW3 function glfwWindowHint : GLFW_RED_BITS GLFW_GREEN_BITS GLFW_BLUE_BITS GLFW_ALPHA_BITS GLFW_DEPTH_BITS ...
1
vote
2answers
480 views

Deferred rendering order?

There are some effects for which I must do multi-pass rendering. I've got the basics set up (FBO rendering etc.), but I'm trying to get my head around the most suitable setup. Here's what I'm thinking....
1
vote
1answer
1k views

How to get access to framebuffer as a uint32_t * in SDL2?

I am making my first foray into SDL. To do this, I would like to have direct access to the framebuffer on the window as a uint32_t *. This is because I have to pass ...
1
vote
2answers
227 views

Can I create custom framebuffer and render to it in cocos2dx?

I want to do post processing effects so I was thinking If I could just make custom framebuffer in cocos2dx like OpenGL and render the ALL SCENES objects in it. I want a single frame buffer for all ...
1
vote
2answers
108 views

How can I position framebuffer objects on the screen in OpenGL?

I currently have two framebuffers which are drawn using glBlitFramebuffer(0, 0, 1920, 1080, 0, 0, 1920, 1080, GL_COLOR_BUFFER_BIT, GL_NEAREST); But the ...
1
vote
1answer
782 views

Game Loop delay the right way and game speed

I am a newbie game developer. I am trying to find a right way to create my game loop. Consider following example. Simple Android Game I have a game with a simple gameplay - bouncing ball. I want ...
1
vote
1answer
653 views

How do I store an FBO'S as a cube map?

As of late I've been trying to implement Cubemaps in my engine, and have managed to get the rendering side of them working. Currently, I'm trying to implement a function for creating them, but I ...
1
vote
1answer
157 views

What's wrong with my method of getting intermediate rendering to my postprocessing shader?

I'm working on a project in OpenGL. Earlier this week, I successfully implemented Deferred Shading, but I'm not sure how to pass the information from the Deferred Shader to the Post Processing Shader. ...
1
vote
1answer
2k views

How to use FrameBuffer objects (OpenGL)

I want to draw a 2D scene and after the scene i want to draw some light effects. When i draw some light, i create a FBO, draw in it and when finished with drawing, i want to create a texture where i ...
1
vote
0answers
25 views

Problem generating multiple shadow maps in a loop

I've successfully implemented shadow mapping for a specific direction as you can see in the image below: Now I want to do omnidirectional shadow mapping but without using a cube map. My first step ...
1
vote
0answers
199 views

LibGDX Shader does not work with FBO texture

I have a shader and I want to run the shader on the whole rendered image at the end instead of each individual sprite that I render on screen. For this purpose I created an FBO, I render the all my ...
1
vote
1answer
2k views

Get a camera's frame-buffer in Unity [duplicate]

Is there a way to "record" the display of a camera instead of rendering it on screen? For example, if I want to stream a camera's frame block to an external application.
1
vote
1answer
1k views

OpenGL/SDL2 How to resize the render area with the window?

After calling SDL_SetWindowSize, the area being rendered to doesn't change with the window, so if the window gets bigger, it leaves a black area on the top and ...
1
vote
1answer
223 views

GLES multiple output buffers

I'd like to write multiple values (not just the color and depth value) in one pass to avoid redundancy in vertex shader. Therefore, i attach multiple (let's say two) color buffers (e.g. textures) to a ...
1
vote
0answers
6k views

Multiple Render Targets, Multiple Fragment Shaders

I render a normal and a depth image of a scene. Then I want to reuse these two images to do further texture/image processing in a second fragment shader. I use a framebuffer with 3 textures attached ...
0
votes
1answer
217 views

OpenGL Regarding Frame/Buffer Caching

I have been trying to get myself refreshed on OpenGL ES. Whilst doing so, I had the following question in mind: Does OpenGL have any "caching" mechanism? For example: Let's say we draw a stationary ...
0
votes
1answer
66 views

Achievements system like in Starcraft2

I am playing Starcraft2 and I am fascinated of how it is engineered. So lets say you played a 1v1 ranked game and you pumped 10 marines in the first 320 seconds. You'll get an achievement for that. I ...
0
votes
1answer
143 views

How to make a triangle pixellated with GLFW?

How can one make a triangle look pixelated without modifying the size of the window in GLFW3? Preferably, I'd like to accomplish this without the use of shaders. For example, by setting the size of ...
0
votes
1answer
1k views

In Unity, how can I check if an input was made x seconds/frames ago?

I'm using the Rewired input plugin, and it comes with an input buffer. I enabled the buffer for my directional keys and airdash button so that the player doesn't have to hit both keys on the same ...
0
votes
1answer
678 views

(LWJGL) Pixel Unpack Buffer Object is Disabled? (glTextImage2D)

I am trying to create a render target for my game so that I can re-render at a different screen size. But I am receiving the following error: ...
0
votes
3answers
781 views

OpenGL ES 2.0 Shadow Mapping - depth only FBO not working due to GL_FRAMEBUFFER_INCOMPLETE_ATTACHMEN

I am trying to add simple shadow mapping to my friends gles 2.0 app. It is based on gles 2.0 and PowerVR SDK. The problem I encounter is that FBO is not valid due to ...
0
votes
1answer
127 views

glClearBuffer takes 1 second on a Geforce 9500GT

These 2 lines (in C# using OpenTK) seem to cause 1 second lag every frame on a machine with a Geforce 9500 GT ...
0
votes
1answer
2k views

OpenGL 3.3: render to framebuffer w/o depth attachment

I want to render my scene to a framebuffer and store the RGBA values in a texture. For this, I attach a texture to GL_COLOR_ATTACHMENT0. When I define a GL_DEPTH_ATTACHMENT texture as well, everything ...