framebuffer

Dirty Rectangles

天涯浪子 提交于 2019-11-27 14:52:50
问题 Where may one find references on implementing an algorithm for calculating a "dirty rectangle" for minimizing frame buffer updates? A display model that permits arbitrary edits and computes the minimal set of "bit blit" operations required to update the display. 回答1: To build the smallest rectangle that contains all the areas that need to be repainted: Start with a blank area (perhaps a rectangle set to 0,0,0,0 - something you can detect as 'no update required') For each dirty area added:

Using OpenGL Without X-Window System

放肆的年华 提交于 2019-11-27 13:53:02
问题 How to OpenGL on Linux Platform Without X-Window System, can I send OpenGL Graphics Directly to Framebuffer Device? There Is Project Named DirectFB (Direct FrameBuffer). With DirectFB We can do this but DirectFB needs for driver for each hardware and I want to user a graphic card that only have Linux driver. 回答1: This is how i did it in my ubuntu 11.04 in detail: 1- Install the dependencies using the command: sudo apt-get install xutils-dev libpciaccess-dev x11proto-dri2-dev x11proto-gl-dev

Paint Pixels to Screen via Linux FrameBuffer

左心房为你撑大大i 提交于 2019-11-27 11:14:10
I was recently struck by a curious idea to take input from /dev/urandom, convert relevant characters to random integers, and use those integers as the rgb/x-y values for pixels to paint onto the screen. I've done some research (here on StackOverflow and elsewhere) and many suggest that you can simply write to /dev/fb0 directly as it is the file representation of the device. Unfortunately, this does not seem to produce any visually apparent results. I found a sample C program that was from a QT tutorial (no longer available) that used an mmap to write to the buffer. The program runs

Setting up OpenGL Multiple Render Targets

孤人 提交于 2019-11-27 10:21:16
问题 I've seen a lot of material on this subject, but there are some differences between the examples I've found and I'm having a hard time getting a solid understanding of the correct process. Hopefully someone can tell me if I'm on the right track. I should also mention I'm doing this on OS X Snow Leopard and the latest version of Xcode 3. For the sake of example, let's say that I want to write to two targets, one for normal and one for color. To do this I create one framebuffer and bind two

opengl - blending with previous contents of framebuffer

邮差的信 提交于 2019-11-27 10:02:23
问题 I am rendering to a texture through a framebuffer object, and when I draw transparent primitives, the primitives are blended properly with other primitives drawn in that single draw step, but they are not blended properly with the previous contents of the framebuffer. Is there a way to properly blend the contents of the texture with the new data coming in? EDIT: More information requsted, I will attempt to explain more clearly; The blendmode I am using is GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA.

Easiest way for offscreen rendering with QOpenGLWidget

前提是你 提交于 2019-11-27 03:00:44
问题 I have a hidden QOpenGLWidget (Qt 5.4.2, NOT QGLWidget) and I want to basically continually do grab() or grabFramebuffer() to get its content (and write it to disk). The widget renders fine when visible, but does not when hidden. If I do a show() followed by a hide() call it works. This seems strange because QOpenGLWidget does internally already render to a framebuffer according to the docs. What is the easiest way to achieve this (if possible without creating another framebuffer)? Bonus

How to develop a DirectFB app without leaving X.11 environment

泪湿孤枕 提交于 2019-11-27 02:16:50
问题 I'm trying to develop a GUI application for an embedded platform, without any windowing whatsoever and I'm doing that with DirectFB, and it suits my needs very fine. Since the embedded I develop for is not that powerful, I would really like to try to develop on my own Ubuntu desktop. The problem is Framebuffer is conflicting with X.org causing me to leave the whole desktop, and shutdown X.org just to see the result of my changes. Is there a good framebuffer simulator that suits my needs? Qt

Writing to frame buffer

别说谁变了你拦得住时间么 提交于 2019-11-27 01:29:32
问题 I'm using an i5 core with builtin graphics accelerator GMA-HD running on an RHEL 6.0 OS. I needed to test the graphics acceleration capabilities of the graphics driver(which I found out was i915 in my PC). I used the following code(which I got from the internet with some modifications) for writing to framebuffer. #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <linux/fb.h> #include <sys/mman.h> int main() { int fbfd = 0; struct fb_var_screeninfo vinfo; struct fb_fix

Paint Pixels to Screen via Linux FrameBuffer

落爺英雄遲暮 提交于 2019-11-26 15:27:51
问题 I was recently struck by a curious idea to take input from /dev/urandom, convert relevant characters to random integers, and use those integers as the rgb/x-y values for pixels to paint onto the screen. I've done some research (here on StackOverflow and elsewhere) and many suggest that you can simply write to /dev/fb0 directly as it is the file representation of the device. Unfortunately, this does not seem to produce any visually apparent results. I found a sample C program that was from a

Does anyone know of a low level (no frameworks) example of a drag & drop, re-order-able list?

本秂侑毒 提交于 2019-11-26 10:49:29
I am looking for code (any language) of a basic graphical list which can be reordered by drag and drop. So exactly this functionality http://jqueryui.com/sortable/ but written directly on the frame buffer/canvas without any frameworks (or low level 'put pixel' libraries at most) and probably not in HTML/JS (unless it's Canvas only without CSS). The simpler the better as I will be using it in assembler and I don't want to reinvent the wheel if not needed. heh I hate frameworks so this is easy as pie for me... this is what I coded for my students during my lectures few years back: http://ulozto