The ability to use a texture as a target image for rendering.
Questions tagged [render-to-texture]
367 questions
44
votes
2 answers
ffmpeg video to opengl texture
I'm trying to render frames grabbed and converted from a video using ffmpeg to an OpenGL texture to be put on a quad. I've pretty much exhausted google and not found an answer, well I've found answers but none of them seem to have worked.
Basically,…

Infiniti Fizz
- 1,726
- 4
- 24
- 40
34
votes
2 answers
OpenGL ES Render to Texture
I have been having trouble finding straightforward code to render a scene to a texture in OpenGL ES (specifically for the iPhone, if that matters). I am interested in knowing the following:
How do you render a scene to a texture in OpenGL ES?
What…

Andrew Garrison
- 6,977
- 11
- 50
- 77
20
votes
3 answers
opengl - blending with previous contents of framebuffer
I am rendering to a texture through a framebuffer object, and when I draw transparent primitives, the primitives are blended properly with other primitives drawn in that single draw step, but they are not blended properly with the previous contents…

staticfloat
- 6,752
- 4
- 37
- 51
17
votes
4 answers
Share OpenGL frame buffer / render buffer between two applications
Let's say I have an application A which is responsible for painting stuff on-screen via OpenGL library. For tight integration purposes I would like to let this application A do its job, but render in a FBO or directly in a render buffer and allow an…

Thomas Vincent
- 2,214
- 4
- 17
- 25
17
votes
1 answer
How to render to a GL_TEXTURE_EXTERNAL_OES?
I need a way to render to a GL_TEXTURE_EXTERNAL_OES texture. I tried binding the texture to a framebuffer but I got GL_INVALID_ENUM error. Here is some sample code:
glEnable(GL_TEXTURE_EXTERNAL_OES);
glGenFramebuffersOES(1,…

georgiana_444
- 171
- 1
- 4
14
votes
4 answers
Opengl Render To Texture With Partial Transparancy (Translucency) And Then Rendering That To The Screen
I've found a few places where this has been asked, but I've not yet found a good answer.
The problem: I want to render to texture, and then I want to draw that rendered texture to the screen IDENTICALLY to how It would appear if I skipped the render…

M2tM
- 4,415
- 1
- 34
- 43
13
votes
1 answer
Rendering to multiple textures with one pass in directx 11
I'm trying to render to two textures with one pass using C++ directx 11 SDK. I want one texture to contain the color of each pixel of the result image (what I normally see on the screen when rendering a 3D scene), and another texture to contain the…

l3utterfly
- 2,106
- 4
- 32
- 58
12
votes
2 answers
Rendering to non-power-of-two texture on iPhone
Is it possible to render to texture with OpenGL ES 1.1 on the iPhone (2G and older)? If I bind a texture as a render buffer, it has to be the size of the render buffer, which isn't POT-sized. But OpenGL ES 1.1 requires textures to be POT.
Maybe it…

GhassanPL
- 2,679
- 5
- 32
- 40
11
votes
0 answers
OpenGL matrices - cannot figure correct ones
Edit: Summarizing what I want to do, more concise:
Render a texture of size wi,hi to an output texture wo,ho, so that the aspect ratio of input texture is maintained, and it fits inside the output texture, eventually with black borders if aspect…

user1592546
- 1,480
- 1
- 14
- 30
10
votes
1 answer
Writing to then reading from an offscreen FBO on iPhone; works on simulator but not on device?
I'm trying to do some image manipulation on the iPhone, basing things on the GLImageProcessing example from Apple.
Ultimately what I'd like to do is to load an image into a texture, perform one or more of the operations in the example code (hue,…

Andrew
- 235
- 2
- 10
9
votes
1 answer
Rendering to texture on iOS OpenGL ES—works on simulator, but not on device
In order to improve the performance of my OpenGL ES application for the iPad, I was planning to draw a rarely updated but rendertime-heavy element to a texture, so I can just use the texture unless the element has to be redrawn. However, while the…

Daniel Saner
- 382
- 2
- 14
9
votes
3 answers
After Writing to a RenderTarget, How to Efficiently Clone the Output?
XNA noob here, learning every day. I just worked out how to composite multiple textures into one using a RenderTarget2D. However, while I can use the RenderTarget2D as a Texture2D for most purposes, there's a critical difference: these rendered…
user565869
8
votes
0 answers
Android Bitmap to WebRtc I420 Frame corrupted
Trying to stream bitmaps over WebRtc.
My Capturer class looks approximately like this:
public class BitmapCapturer implements VideoCapturer, VideoSink {
private Capturer capturer;
private int width;
private int height;
private SurfaceTextureHelper…

Serhii Petrenko
- 320
- 2
- 12
8
votes
2 answers
iOS: How to Render-To-1-channel-Texture in GLES2
I'm pretty sure now after hours of bashing that this cannot be done.
This is my code so far (BELOW) for rendering to a texture; it does the job, but is very wasteful. I only want a single 8-bit channel, possibly 16-bit greyscale. I don't want a…

P i
- 29,020
- 36
- 159
- 267
7
votes
1 answer
OpenGL render-to-texture-via-FBO -- incorrect display vs. normal Texture
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…

metaleap
- 2,132
- 2
- 22
- 40