framebuffer

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

/dev/graphics/fb0 Device not found

对着背影说爱祢 提交于 2019-12-11 11:09:31
问题 I found a lot about /dev/graphics/fb0. It is fast. But It doesn't seems to be working. If i do manually. Neither programmatically. But I am sure that this feature works on my mobile as i have an application that works using same method. I have tried to change permission. i have root access. chmod 666 /dev/graphics/fb0 Permission is changed. But when i try to run command adb pull /dev/graphics/fb0 /mnt/sdcard/tmp I tried to redirect input using cat /dev/graphics/fb0 > /sdcard/frame.raw I get

Bitmap texture does not show up in framebuffer surface on Android

让人想犯罪 __ 提交于 2019-12-11 09:42:52
问题 I'm trying to use the new EffectFactory/Effect to add effects to images off screen (i.e. framebuffer). I've looked at the HelloEffects.java example provided in the SDK and I've tried it out and it works. Except it obviously uses a GLSurfaceView and that isn't what I want. So I've taken tests/effect/src/android/effect/cts/GLEnv.java to setup the EGL stuff and I've also grabbed TextureRenderer.java and GLToolbox from the HelloEffects example. Mashed them all up and I've got the code below. (On

OpenGL - How to draw to a multisample framebuffer and then use the result as a normal texture?

北城以北 提交于 2019-12-11 08:05:50
问题 I'm developing a little gamedev library. One of the elements of this library is a Canvas (offscreen drawing area), which is implemented through an OpenGL framebuffer. So far, everything's been good, I generate a texture, attach it to a framebuffer, render to it, then use the framebuffer's texture as Texture2D. Now, I'd like to add antialiasing to my library, so I'd like to be able to set multisampling on a Canvas. Now I'm confused because I've found that you need to alter shaders to use

How can I get X11 screen buffer (or how can I get X11 to write to /dev/fb0)

限于喜欢 提交于 2019-12-11 07:48:43
问题 I'm trying to get pixel data from my X11 instance, I've seen this thread (How do take a screenshot correctly with xlib?) and the double for loop is taking just too long for me (over a million loops, as the system I'm building requires the highest amount of efficiency possible, sitting around for 600 miliseconds is just not an option). Is there no way to just get a raw array of pixels to avoid the for loop? I know the XImage class has a "data" member which is supposed to contain all of the

Blend negative value into framebuffer 0 opengl

不想你离开。 提交于 2019-12-11 06:45:34
问题 The program renders a bunch of things into an intermediate framebuffer that uses an unsigned normalized texture to store the data. The intermediate framebuffer is blended with the default framebuffer. The pixel shader used to render the intermediate for the blend with framebuffer 0 is the following: #version 300 es precision mediump float; out vec4 fragColor; in vec2 texCoords; uniform sampler2D textureToDraw; void main() { vec4 sampleColor = texture(textureToDraw, texCoords); fragColor =

工具导航Map