framebuffer

How to rotate a Qt5 application using the linux framebuffer?

落爺英雄遲暮 提交于 2020-01-03 12:58:41
问题 I have an embedded linux application running directly on the linux framebuffer (no x-Windows). We now have to physically rotate the display 180 degrees. How do I get my Qt application to rotate so it doesn't appear upside down? I saw reference to using the following option: -platform linuxfb:fb=/dev/fb0:rotation:180 However, the rotation option seems to be ignored. Using Qt 5.9.2 on Ubuntu server 16.04.6 回答1: You could handle it on application level. With QML thats easy, but with QWidgets the

Stenciling using OpenGl ES 2.0

ε祈祈猫儿з 提交于 2020-01-01 12:08:09
问题 I am trying to figure out a way to cut out a certain region of a background texture such that a certain custom pattern is not rendered on the screen for that background. For example: This square can be any pattern. I am using Frame Buffer Object and Stencil Buffer to achieve this kind of effect. Here is the code: fbo.begin(); //Disables ColorMask and DepthMask so that all the rendering is done on the Stencil Buffer Gdx.gl20.glColorMask(false, false, false, false); Gdx.gl20.glDepthMask(false);

Taking a Screen Shot of an Embedded Linux Framebuffer

假如想象 提交于 2020-01-01 11:50:36
问题 I'm running Embedded Linux on an evaluation kit (Zoom OMAP35x Torpedo Development Kit). The board has an LCD and I would like to be able to take screen shots convert them into a gif or png. I can get the raw data by doing the following: "cp /dev/fb0 screen.raw", but I am stumped on how to convert the image into a gif or png format. I played around with convert from ImageMagick (example: "convert -depth 8 -size 240x320 rgb:./screen.raw -swap 0,2 -separate -combine screen.png"), but have been

OpenGL invalid framebuffer operation after glClear(GL_COLOR_BUFFER_BIT);

℡╲_俬逩灬. 提交于 2019-12-30 08:36:30
问题 Every time after I call glClear(GL_COLOR_BUFFER_BIT); , I get the OpenGL error "invalid framebuffer operation". The call seems to work just fine, and nothing seems wrong. I call glClear(GL_COLOR_BUFFER_BIT); first thing in the ::paintGL() method. Huh? Should I just disregard this error? 回答1: My best guess is that your framebuffer is not complete and calling glClear on an incomplete framebuffer is throwing the error. Check the status of the framebuffer using glCheckFramebufferStatus and make

Reading the pixels values from the Frame Buffer Object (FBO) using Pixel Buffer Object (PBO)

ぃ、小莉子 提交于 2019-12-29 04:42:07
问题 Can I use Pixel Buffer Object (PBO) to directly read the pixels values (i.e. using glReadPixels) from the FBO (i.e. while FBO is still attached)? If yes, What are the advantages and disadvantages of using PBO with FBO? What is the problem with following code { //DATA_SIZE = WIDTH * HEIGHT * 3 (BECAUSE I AM USING 3 CHANNELS ONLY) // FBO and PBO status is good . . glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId); //Draw the objects Following glReadPixels works fine glReadPixels(0, 0, screenWidth

pygame initialize framebuffer or x server

女生的网名这么多〃 提交于 2019-12-25 11:55:33
问题 I have a class that checks for suitable framebuffer, and it works fine. One a couple of computers (mostly embedded older boards) there is no framebuffer, so I remove the init (self): function and manually set it to run under X. Both ways work on their respective systems, I'm just tired of porting it every time I make a change. Here is the working framebuffer code: class wxdisplay : screen = None; def __init__(self): "Ininitializes a new pygame screen using the framebuffer" # Based on "Python

Writing to an Android display from ndk

眉间皱痕 提交于 2019-12-25 04:42:37
问题 Writing directly to the framebuffer no longer works. Is there anyway to write to the display in the NDK? I might use ANativeWindow but that requires an existing surface. Is there a better way? Or is the only way to create a surface, natively, and then use ANativeWindow? 回答1: The display is owned by SurfaceFlinger and Hardware Composer, so unless you're planning to halt the Android framework you will need to work through them. (See the graphics architecture doc for more details.) If you're

Using sRGB colour in QGLFramebufferObject with multisampling

别说谁变了你拦得住时间么 提交于 2019-12-25 03:25:48
问题 For performance reasons I have separated my 2D and 3D rendering. I have two QGLFramebufferObjects for each type because QGLFramebuffer does not support multisampling with GL_TEXTURE_2D as a target, so once drawing is done into the multisampled buffer, it is blitted into a 'normal' QGLFramebufferObject where the pixel values are resolved. Once this has been done for one/both of the render types, the buffers are used as texture inputs to a shader that blends the 2D 'layer' onto the 3D one. I

How to screen capture screenshots or movies on the Linux framebuffer

▼魔方 西西 提交于 2019-12-24 13:28:44
问题 How can the linux frame buffer, on Cell Linux, be captured to obtain either screen shots or movies? Is there a tool to do this for a running program, or must the program writing to, and presumably controlling, the frame buffer also handle capture and recording? If so, how would the program do so? 回答1: Many tools for doing so, for example FBGrab and fbdump; look at the sources for those two, it would be pretty easy to extend either one or write your own which captures video instead of just