framebuffer

How to render anti-aliased image to a texture (and then write to PNG)?

强颜欢笑 提交于 2019-12-08 12:51:02
问题 I'd like to use the "render to texture" paradigm to write a .png screenshot of my OpenGL 3D rendering. I have it working without multi-sampling, but I'm struggling to get an anti-aliased image. First of all, is this possible? Second, what is the right combination of API calls? (meta third question, how can I better debug this? glCheckFramebufferStatus is clearly not enough). Here's what I'm working with: // https://stackoverflow.com/questions/7402504/multisampled-render-to-texture-in-ios

Put graphics on the screen without /dev/fb0

安稳与你 提交于 2019-12-08 05:22:59
问题 I am trying to draw things on the screen without an X11 server. (I want my program to be in initrd, so I don't want to bloat it with X11.) It's easy when I have /dev/fb0 , but when I use Xen, I don't have it (also I am not sure how that works - the passing of vesafb to the kernel by grub and such). I've tried SDL but it won't work without /dev/fb0 or X11. How does X11 work without /dev/fb0? It seems like no matter what I do X11 will always work... yet all libraries (like directfb, SDL, etc.)

Is there a fast way to the average colors from several framebuffers in WebGL / Javascript?

空扰寡人 提交于 2019-12-08 03:18:44
问题 I am very new to the WebGL subject. What I want to do is to calculate the average color of 6 different framebuffers like the ones below in the picture. Now I am wondering what the best way to go about it would be? I tried to do gl.readPixels(0, 0, 256, 256, gl.RGBA, gl.UNSIGNED_BYTE, pixelValues); but that seems to be very slow... Is there a way that this can happen on the graphics card? this is how the FBO is set up - I have this from a tutorial: ... 回答1: You have two options Write a

Android Display User space - Kernel space interaction

大憨熊 提交于 2019-12-08 02:05:28
问题 Android Display User space - Kernel space interaction. My current understanding is that there is a kernel driver for framebuffer which allocates the memory by calling mdss_mdp_alloc_fb_mem() This allocates some memory(in my case size : 800000) at an address in ION carved out region(My case - 0x7ee00000). Android somehow writes into this area, which the display driver reads and displays it. I might be wrong with my understanding. If so, request you to please correct me. I am interested to know

COLOR_ATTACHMENT's - How to render to multiple textures as color attachments inside a Framebuffer Object?

不羁岁月 提交于 2019-12-07 06:04:05
问题 I am trying to render to multiple textures as COLOR_ATTACHMENT s without success. All I get from displaying them is a black screen (with a red clear fill) meaning my texture is read but is 'empty'. My pseudo code is : attach 3 textures to an FBO with texture indexes 1, 2 and 3 and color attachments 0, 1 and 2 respectively. As a test case, I tried to render my scene to the 3 color attachments so they are supposed to hold the same exact data. Then read either of those textures at shader pass 2

Kernel panic using deferred_io on kmalloced buffer

痴心易碎 提交于 2019-12-06 15:38:46
I'm writing a framebuffer for an SPI LCD display on ARM. Before I complete that, I've written a memory only driver and trialled it under Ubuntu (Intel, Virtualbox). The driver works fine - I've allocated a block of memory using kmalloc, page aligned it (it's page aligned anyway actually), and used the framebuffer system to create a /dev/fb1. I have my own mmap function if that's relevant (deferred_io ignores it and uses its own by the look of it). I have set: info->screen_base = (u8 __iomem *)kmemptr; info->fix.smem_len = kmem_size; When I open /dev/fb1 with a test program and mmap it, it

Rendering to depth texture - unclarities about usage of GL_OES_depth_texture

好久不见. 提交于 2019-12-06 14:21:35
I'm trying to replace OpenGL's gl_FragDepth feature which is missing in OpenGL ES 2.0. I need a way to set the depth in the fragment shader, because setting it in the vertex shader is not accurate enough for my purpose. AFAIK the only way to do that is by having a render-to-texture framebuffer on which a first rendering pass is done. This depth texture stores the depth values for each pixel on the screen. Then, the depth texture is attached in the final rendering pass, so the final renderer knows the depth at each pixel. Since iOS >= 4.1 supports GL_OES_depth_texture , I'm trying to use GL

Add render target to default framebuffer of QOpenGLWidget

眉间皱痕 提交于 2019-12-06 11:29:23
I'd like to add a second render target to the default framebuffer of a QOpenGLWidget. The reason is that I'd like to implement object picking and check whether the user hit an object by rendering a segmentation mask into gl_FragData[1] . Unfortunately, you can only retrieve the GLuint handle from the widget and there is no constructor of QOpenGLFramebufferObject that takes in the handle and there is no other option to retrieve the framebuffer. Is there any possibility to attach another texture to the default frame buffer of the widget without workarounds? The only two options I can think of

Trying to render to texture using framebuffer always results in white texture

ⅰ亾dé卋堺 提交于 2019-12-06 08:18:53
问题 Using a couple of posts here in StackOverflow, I created what is supposed to be a simple render-to-texture using a framebuffer. The problem here is that it's not working. Something is broken in the mix, as my final texture is just a white square. I am not getting any gl errors whatsoever. Here is my code. Declare instance variables. GLuint texture; GLuint textureFrameBuffer; Generate the texture and framebuffer. glGetError(); //Generate the texture that we will draw to (saves us a lot of

LibGDX - Drawing to a FrameBuffer does not work

孤街浪徒 提交于 2019-12-06 06:09:46
So I'm trying to make custom buttons, for which I need to combine different parts of the button background. To do this I figured using a FrameBuffer would work, however it did not give viable results. Therefore I attempted to test my FrameBuffer drawing method, by writing a simple test method, which returns a texture that is drawn to the display at every render() call. This method is here (note that it is a test method, so it may be a little poorly optimized): private Texture test() { BitmapFont f = ReverseBlade.fontTitle; f.setColor(Color.LIGHT_GRAY); FrameBuffer fbo = new FrameBuffer(Format