fbo

FBO lwjgl bigger than Screen Size - What I'm doing wrong?

吃可爱长大的小学妹 提交于 2019-12-08 04:00:23
问题 I need your help again. I wanna use Frame Buffer Object bigger than the Screen size. When I do it as below FBO size 1024 x 1024 is cut off from the top in resolution 1024 x 768. I couldn't find the solution on my own - that's why I'm asking. First part of code is the way I create FBO, I do the rendering between activate, and deactivate. Later I use texture. What am I doing wrong? What is the fastest way to clear Frame Buffer Object for reuse? public FrameBufferObject(int width, int height) {

With OpenGL ES 2.0 on Android, is there a way preserve multisampling when rendering on a framebuffer?

故事扮演 提交于 2019-12-07 20:14:28
I am developing a 2d game on Android ICS using OpenGL es 2.0 and java. I am trying to use a lighting system and to do that I render all the lights on a framebuffer and the scene on another, with the intent to blend them using the fragment shader to recreate photoshop overlay effect. I encountered a problem though, it seems that the fbo doesn't work with multisampling, so if I draw on the fbo I get jagged lines. I noticed that there is a solution for people using ios, but I didn't find anything on Android. Is there a better way to achieve what I am trying to do than the way I am approching this

Rendering multiple depth information with FBOs

旧时模样 提交于 2019-12-07 15:05:20
问题 I am trying to implement a shader computing the light refraction through two surfaces: the back and front of the object. To do so, I need to render the refractive geometry with the normal depth test (GL_LESS), and the reversed depth test (GL_GREATER). It would allow me to compute the distance from the back face to the front face. Unfortunately, I only manage to render one of those at a time, and I can't figure out how to pass both depth information as textures to the shader. The shader itself

FBO lwjgl bigger than Screen Size - What I'm doing wrong?

旧时模样 提交于 2019-12-07 13:15:28
I need your help again. I wanna use Frame Buffer Object bigger than the Screen size. When I do it as below FBO size 1024 x 1024 is cut off from the top in resolution 1024 x 768. I couldn't find the solution on my own - that's why I'm asking. First part of code is the way I create FBO, I do the rendering between activate, and deactivate. Later I use texture. What am I doing wrong? What is the fastest way to clear Frame Buffer Object for reuse? public FrameBufferObject(int width, int height) { this.width = width; this.height = height; texture = glGenTextures(); frameBufferObject = GL30

Ping-pong rendering between two FBOs fails after first frame.

戏子无情 提交于 2019-12-07 09:32:16
问题 I am trying to create two FBOs and implement a ping-pong render. But, I only get the first frame to work properly. I am trying to simulate a game-of-life and, after the first frame, I only get a black screen. Could you help me check it? I have spent hours on this issue. Edit Maybe I didn't describe clearly. Actually, I want to use the textureB as the texture and render it to textureA, then use the textureA to render to screen, then vice versa. Edit I can see the first frame, which is the

How to render Framebuffer Objects on multi-sampled textures?

﹥>﹥吖頭↗ 提交于 2019-12-07 06:32:23
问题 I currently have a rendering engine using multiple passes in which various parts of the image are rendered on textures, and then combined using shaders. It works, and now I would like to activate multi-sampling. I read here ( http://www.opengl.org/wiki/Framebuffer_Object_Examples#MSAA ) that, with OpenGL, you can't attach a GL_TEXTURE2D_MULTISAMPLE to a framebuffer object. It seems one way to use multi-sampling and still have access to the result as texture is to use a multi-sampled render

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

FBO offscreen rendering slow

百般思念 提交于 2019-12-06 13:47:08
问题 I want to use offscreen rendering using openGL es 2.0 and GLSL shader I setup FBO and it seems working except there are two problems 1) The program goes about 30 fps but all the sudden, it drops to 20fps and then come back to 30 fps again, then few secs later, drops to 20fps again then come back to 30fps and so on...(keeps going on like that) and I don't know what cause this random pause/delay 2) When I close the application, it does not respond for awhile. In other words, it seems like there

Rendering multiple depth information with FBOs

喜欢而已 提交于 2019-12-06 01:54:29
I am trying to implement a shader computing the light refraction through two surfaces: the back and front of the object. To do so, I need to render the refractive geometry with the normal depth test (GL_LESS), and the reversed depth test (GL_GREATER). It would allow me to compute the distance from the back face to the front face. Unfortunately, I only manage to render one of those at a time, and I can't figure out how to pass both depth information as textures to the shader. The shader itself shouldn't be a problem, but I'm struggling with setting up opengl so that it gives everything needed

Android OpenGL ES 2.0 : Can a GL_FLOAT texture be assigned to a FBO as a COLOR attachment?

你说的曾经没有我的故事 提交于 2019-12-06 01:20:18
I want to get the value using GL_FLOAT texture by glReadPixels. My Android device support OES_texture_float . but, it became an error to attach GL_FLOAT texture. In OpenGL ES 2.0 in Android, to attach GL_FLOAT texture to FBO is impossible? Or depend on hardware? Part of my code is: Init: glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D,texture); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,texWidth,texHeight,0,GL_RGB,GL_FLOAT,NULL); FBO Attach: glBindFramebuffer(GL_FRAMEBUFFER,framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,texture,0); checkGlError("FBO