0

Can OpenGL ES be used to render geometry to texture only? If so then how does one go about this?

All code I've seen has dependencies on windows, X, SDL, or drivers, all of which are undesirable but causing headaches when removed.

I need to render images to write directly to framebuffer console (/dev/fb0 and fb1). So blitting a texture will work great.

This is for a preboot environment, so need to minimize dependencies/libs, while trying to avoid having to write own rasterization code.

1 Answer 1

0

You need to use a FBO (Frame Buffer Object) with a color texture attachment in order to "render geometry to a texture", you can do this without needing to display anything on screen ... but you will still need to initialize OpenGLES (create a GLES context etc.) so this is still rather complex if you want to do it "by hand" without using a library like SDL (actually what you could do is copy paste the relevant sections from SDL or any other lib which provides GLES initialization code).

Once your geometry is rendered to the FBO you can then "glRead()" the texture attached to the FBO to get the pixels in RAM and then do whatever you want with those (blit to framebuffer console for example)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.