Skip to main content

All Questions

0 votes
1 answer
771 views

WebGL - Rendering to framebuffer instead of to canvas example extended

The Goal I am trying to extend the WebGL Render to Texture Tutorial to learn WebGL better. So far, I've been able to adjust it so that it renders an image textured-cube instead: Now, what I'm trying ...
Joe's user avatar
  • 1,888
0 votes
1 answer
214 views

Using glTexImage2D to render to texture, blank result. (Dreamcast GLdc)

I am trying to create a quick render to texture example using GLdc, a OpenGL implementation for the Sega Dreamcast. I have verified that both my Texture and Framebuffer Object are complete, yet the ...
B. Morris's user avatar
2 votes
0 answers
336 views

How to correctly work with the range of depth data obtained from render-to-texture?

I'm doing some customized 2D rendering to depth buffer that connects to a texture of internal format GL_DEPTH_STENCIL. In fragment shader, the normalized Z value (only 0.0 to 1.0 is used, I'm lazy) is ...
jiandingzhe's user avatar
  • 2,017
0 votes
1 answer
1k views

Rendering to custom FrameBuffer using same texture both as input and output

Some Fragment shaders in ShaderToy (e.g. fluid dynamics, https://www.shadertoy.com/view/4tGfDW ) use same buffer as both input and output. But when I try to do this in my C/C++ code it does not work (...
Prokop Hapala's user avatar
1 vote
1 answer
2k views

read and write to different textures within same framebuffer

Is it possible to read from texture A and write to texture B that both use the same FBO? I don't believe this has been covered here already. Someone asked the question about OpenGL, but not about ...
Dante Hoyte's user avatar
0 votes
1 answer
2k views

Webgl - Rendering depth to texture returns gl.INVALID_FRAMEBUFFER_OPERATION in Safari

If you look at the following snippet in Safari (taken from https://webglfundamentals.org/webgl/lessons/webgl-shadows.html), you will notice it looks different than in other browsers, because the depth ...
cboe's user avatar
  • 477
3 votes
1 answer
597 views

Rendering viewport to texture produces overlaps viewports?

I'm creating a 2D Engine and I want to implement docking, so I need to create a viewport and render the screen to a texture. To render the viewport I'm saving the framebuffer into a FrameBufferObject ...
Roger Tello's user avatar
1 vote
1 answer
670 views

How to render anti-aliased image to a texture (and then write to PNG)?

I'd like to use the "render to texture" paradigm to write a .png screenshot of my OpenGL 3D rendering. I have it working without multi-sampling, but I'm struggling to get an anti-aliased image. ...
Alec Jacobson's user avatar
1 vote
0 answers
408 views

OpenGL rendering to texture produces empty Texture

I am trying to render and orhto projection of my scenes depth values to a texture inorder to use the texture in a later render cylce to determine what fragments are in shadow. Basically a Shadow Map. ...
Alexander W's user avatar
2 votes
0 answers
1k views

WebGL render to texture with framebuffer

I am new in webgl and trying to learn it. I am trying to learn framebuffer and rendering to texture but I am stuck. What I am trying to do is to copy the colors (pixel data) of a texture to another ...
Arka Roy's user avatar
  • 180
0 votes
1 answer
4k views

OpenGL MSAA in 2 different ways. What are the differences?

I have been looking for OpenGL Multi Sample Anti Aliasing tutorials and I found many but I'll take 2. They use a different way to do this. I have tested both ways and both work for my project so I ...
Tino Tano's user avatar
  • 169
0 votes
1 answer
139 views

OpenGLES + Framebuffer artifacts

Using OpenGLES 1.1 (don't have a choice at this time). Target OS is Android. I'm having some inconsistency when rendering to the main framebuffer, and when rendering to a texture. When I render to ...
Raptisoft's user avatar
  • 203
1 vote
1 answer
966 views

OpenGL Framebuffer only writing to one face of cubemap

I only seem to be able to render my scene into only one side of the cubemap. At the moment everything is hard-coded, I'm only trying to render the same view of the scene into each of the 6 faces of ...
HelloWorldCpp's user avatar
0 votes
1 answer
584 views

Android GLES3.0 framebuffer incomplete

Could you help me figure out why the following code is generating GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT mBitmap = BitmapFactory.decodeFile(imagePath); int[] handles = { 0 }; GLES30.glGenTextures(1, ...
Saeid Farivar's user avatar
1 vote
1 answer
1k views

Texture does not fit in the square - OpenGL

I am trying to create a square and put a red circle middle of it. As you can see in the simple vert I map (-1, 1) range to (0,1) range: coord = position.xy*0.5 + vec2(0.5,0.5); If you look at the ...
Simon Müller's user avatar

15 30 50 per page