framebuffer

Frame Buffer Object (FBO) and Render & Depth Buffers Relation

断了今生、忘了曾经 提交于 2019-12-12 16:24:35
问题 I saw many examples on the web (for example) which do the following Create and Bind FBO Create and Bind BUFFERS (texture, render, depth, stencil) Then, UnBind BUFFERS To work with FBO- Bind FBO, do the work then UnBind FBO However, also Bind texture BUFFER for read, write etc. with texture BUFFER BUT NEVER EVER SEEN re-Bind of other BUFFERS (render, depth, stencil), Why? Example of BUFFERS creation and bind/unbind (Below code is just for example only to show what I explained and works

OpenGL render-to-texture-via-FBO — incorrect display vs. normal Texture

孤街醉人 提交于 2019-12-12 08:44:42
问题 off-screen rendering to a texture-bound offscreen framebuffer object should be so trivial but I'm having a problem I cannot wrap my head around. My full sample program (2D only for now!) is here: http://pastebin.com/hSvXzhJT See below for some descriptions. I'm creating an rgba texture object 512x512, bind it to an FBO. No depth or other render buffers are needed at this point, strictly 2D. The following extremely simple shaders render to this texture: Vertex shader: varying vec2 vPos;

Python: text overlay on top of all windows including fullscreen in Linux

别等时光非礼了梦想. 提交于 2019-12-12 02:28:26
问题 I am trying to write a simple script in python that outputs text on top of all windows and fullscreen apps. The purpose of this script is to output load average and free memory (and other useful stats) in similar fashion that Steam FPS counter works. So far I tried pygame but as far as I can see it can only write into its own window. As I understand I need to write directly to frame buffer? The target OS is Linux with Nvidia card and Xorg, but I would prefer it to be hardware agnostic. Thanks

ioctl to block operation

蓝咒 提交于 2019-12-12 02:28:19
问题 I am using ioctl function to access framebuffer The problem is that for each frame, I am writing framebuffer three times For instance, each frame, I first fill frame with Red color, do some computation, fill Green, then do another computation, then fill Blue. In other words, each frame, I have three layers, Red as the bottom, Green, then Blue as the top. Therefore, Red and Green is invisible and all I can see is the Blue. Now, my question is that when I use ioctl call, it seems like it can't

how to show an image without surfaceflinger on android

China☆狼群 提交于 2019-12-12 01:45:49
问题 How to draw some stuff before surfacefligner start on android? In this situation, it's some kind of traditional Linux with framebuffer device, so directly access framebuffer should be OK. How about to use HWComposer directly and how about to use egl directly? 回答1: If SurfaceFlinger isn't running, you can just open the framebuffer device and write to it (assuming you're on a device that has a framebuffer device). For an example of this, see the implementation of the "recovery" UI. The key file

Fragment shader rendering to off-screen frame buffer

左心房为你撑大大i 提交于 2019-12-11 18:30:14
问题 In a Qt based application I want to execute a fragment shader on two textures (both 1000x1000 pixels). I draw a rectangle and the fragment shader works fine. But, now I want to renderer the output into GL_AUX0 frame buffer to let the result read back and save to a file . Unfortunately if the window size is less than 1000x1000 pixels the output is not correct. Just the window size area is rendered onto the frame buffer. How can I execute the frame buffer for the whole texture? 回答1: The

How to keep coordination between particles and which texture pixel contains each one’s information?

别等时光非礼了梦想. 提交于 2019-12-11 15:59:18
问题 Using a 4x4x4 grid as an example, I have 64 vertices (which I’ll call particles) which start with specific positions relative to each other. These 64 particles will move in the x, y and z directions, losing their initial positions relative to each other. However each cycle, the new particle positions and velocities need to be calculated based upon the original starting relationships between a particle and its original neighbors. I’ve learned that I need to use textures, and consequently

mediaMetadataRetriever.setDataSource(getBaseContext(),uri) throws illegal argument exception

杀马特。学长 韩版系。学妹 提交于 2019-12-11 13:42:02
问题 Hello developers I have a piece of that grabs the frames of a video...It seems it will work fine except a part of it where I am getting illegal argument exception...As I set the path of the video it crashes..Here is my code it crashes at the line mediaMetadataRetriever.setDataSource(getBaseContext(),uri) Here is the full code: import java.io.IOException; import android.graphics.Bitmap; import android.media.MediaMetadataRetriever; import android.media.MediaPlayer; import android.net.Uri;

GLX Vsync event

断了今生、忘了曾经 提交于 2019-12-11 13:30:54
问题 I'm wondering if I could catch the screen vsync event by any file descriptor and [select | poll | epoll]ing it. Normally, if I'm right, glXSwapBuffers() doesn't block the process so I could do something like : int init() { create epollfd; add Xconnection number to it; add some other fd like socket timer tty etc... possibly add a vsync fd like dri/card0 or fb0 or other??? return epollfd; } main() { int run = 1; int epollfd = init(); while(run) { epoll_wait(epollfd, ...) { if(trigedfd = socket)

How to save fbset setting?

流过昼夜 提交于 2019-12-11 12:06:59
问题 I am working on a embedded Linux project using Qt, when the Qt program runs, it does not sit on the middle of the 7" LCD,so I used "fbset -move -step" to move it,then it is ok. But when the board is switched off and on again, the setting is lost, the Qt program still not sit on the middle of the LCD. I checked the etc/fb.modes, and I also modified it, but the problem still remains. Can anyone help me? 回答1: Very lucky this time, I solved the question by myself. After "fbset -move -step", I