9

As you've understood, the framebuffer is an array in memory that holds all the pixels to display on the screen. On a desktop PC, it's probably special memory on the graphics card, but in a SoC with one memory shared by GPU and CPU, it's probably a normal memory allocation that the display controller uses DMA to read from. The display controller is a piece ...


7

Note that in your Dark Souls example, all the resolutions listed are the exact same aspect ratio. So the question is, why doesn't it support arbitrary aspect ratios? The answer is that it costs time and effort to support arbitrary aspect ratios, and if that money spent doesn't translate to increased profit, then it doesn't make sense to do. This answer ...


6

Short answer, set the precision of the image to a higher value. Long answer, When looking at a gamma correction curve, you can see that the lower values get changed much more, this means that the difference between lower values will get greater and that causes this effect. You have a limited amount of values for a color channel and this means that when it ...


5

Why would you use Images instead of Framebuffers? Image Load/Store is not intended to replace framebuffers. It's a feature that allows (relatively) arbitrary reading and writing to memory. So you would use images when you need to arbitrarily read and write to memory. You would use framebuffers when you're rasterizing primitives for rendering purposes. The ...


4

So far, I've been able to attach to vrcompositor.exe with RenderDoc and intercept the D3D calls that do the composition. According to Baldur Karlsson (the author of RenderDoc), it's not that hard to hack RenderDoc to use its hooks to run arbitrary code on each Present call of the chain I'm interested in. I've not had a chance to try that out yet, so this ...


4

I think you misunderstood the use of glBlitFrameBuffer. When using this to blit Color Buffers, according to the docs, One thing to keep in mind is this: when using GL_COLOR_BUFFER_BIT​, the only colors read will come from the read color buffer in the read FBO, specified by glReadBuffer. The colors written will only go to the draw color buffers in the write ...


4

It entirely depends what hardware and OS you're on. It's up to the integration between the windowing system and GL. In the simple case where one application is rendering full-screen directly, the framebuffer is in memory that's accessible by both the GPU and the display controller. After the GPU is finished, and when the display controller gets to a vsync (...


3

You need to set the colour back to white before drawing the framebuffer to the screen. Otherwise, the whole framebuffer gets multiplied with red. glBindFramebuffer(GL_FRAMEBUFFER, 0); glColor3f(1, 1, 1); // <------- add this (doesn't have to be exactly here) glBindTexture(GL_TEXTURE_2D, fbo_tex[0]); glMatrixMode(GL_PROJECTION); glLoadIdentity(); ...


3

Is it possible to bind default framebuffer's depth buffer to another framebuffer? First, you "attach" images to framebuffers. You "bind" objects to the context; you "attach" objects to other objects. Second, no, you cannot attach images of the default framebuffer to anything. If not, how can I copy default depth to another depth buff, or what is best ...


3

The compositor in the OS wants to run at a consistent 60 FPS whatever rate your application runs at. If there were a single framebuffer for your application, then you might end up writing to it at the same time the compositor or overlay hardware wants to read from it to put it into the final frame. This would cause tearing. (Tearing could be avoided with a ...


3

You have a bit of a misunderstanding there. The paragraph you quoted doesn't actually say anything about framebuffer objects yet. It just talks about a single texture. While we usually understand a texture as a single image, it is (or can be) actually comprised of a set of images. This might be because it is an Array Texture or, even more common, it just has ...


2

I have tried doing glCear(GL_BACK_LEFT) between each iteration but it is not clearing, I'm wondering if I'm missing a line of code before the glClear, or if I'm calling it right. I think the problem is that the back buffer isn't clearing This comment of yours sheds some light on the matter. This function call doesn't do what you think it does and is ...


2

This answer uses GDI and a little bit of MFC. The MFC bits aren't necessary and just there for my convenience. You can hit the Windows API directly if you need to. In your window class have some data members for the bitmap. I currently use MFC's CBitmap for convenience: CBitmap bitmap_; unsigned char* bitmapBits_; bitmapBits_ is a pointer ...


2

I've seen no answer to my question. But after lots of experimentation and further study of Apple documentation for clues I have figured out how to capture GPU generated frames. First, I gave up on the attempt to have the shader write to the screen and an offscreen buffer in the same render pass. The odd (and undocumented as far as I can tell) behavior of ...


2

After trying everything possible I found my mistake: The shaders are fine, the only thing which is wrong is the frameBufferObject binding. To be honest, the texture to FBO binding. the only thing I replaced is this: glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X, m_cubeMapTexture, 0); glFramebufferTexture2D(...


1

I wouldn't recommend trying to write this code yourself. It's not a question of using into OpenGL - which won't get you another process' framebuffer - but of asking the OS. This is not at all easy to do, and it's work you don't need to do yourself. Depending on what the streaming protocol is, the easiest way might be just to write or use a client for that ...


1

FBOs can only use a single depth image, but that image can be layered. Broadly speaking, VR multi-eye rendering ought to be done through layered FBO images for both the color and depth buffers. The problem with your code is that you can't use glFramebufferTexture3D to attach a layered image. You must use glFramebufferTexture. Also, you need to use layers for ...


1

Can it be (eg. if I run a video game full-screen) that the compositor could simply declare the application's off-screen buffer the same as its 'screen buffer' Yes. This is one of the things that "fullscreen exclusive" mode would do for you: it enables the application's swap buffers (front/back default framebuffers) to be directly scanned out by ...


1

Copying the bytes of a JPEG file to the framebuffer device doesn't display the image represented by the JPEG file. The file needs to be decoded by an application that understands the JPEG format, to get the actual image. Your system is working normally. You can use a command like display to decode the file and draw the image to the screen.


1

To write to an arbitrary location in a FBO you need to do rasterization of point primitive at that location. This is significantly more costly than a single imageStore because it involves invoking the vertex shader, the ROP units, and possibly rasterizing a whole 2x2 quad or more for just a single pixel.† With imageLoad/imageStore you have greater ...


1

So the way I went by not showing the window seems the way to go, and the error about GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTapparently wasn't related to this at all and is gone.


Only top voted, non community-wiki answers of a minimum length are eligible