[Bf-python] Reading Pixel Data From bgl FrameBuffer

Dalai Felinto dfelinto at gmail.com
Thu Oct 23 18:31:57 CEST 2014


Hi Khalifa,

See if this sample file helps:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/gameengine_visual/lampRGB.blend

The code runs in the BGE (Blender Game Engine), but the BGE works the
same for Blender and for the BGE.

Apart from that BGL is simply a wrapper of OpenGL functions, so I
presume the error is in your OpenGL (bgl) code.

Regards,
Dalai
--
blendernetwork.org/dalai-felinto
www.dalaifelinto.com


2014-10-23 16:38 GMT+02:00 Khalifa Lame <khalibloo at gmail.com>:
> glReadPixels() returns None. I'm sure it shouldn't be empty, I did some
> clearing and drawing beforehand.
> I even tried specifying the buffer to draw to using glDrawBuffer() and
> glReadBuffer. Tried with GL_BACK and GL_AUX_BUFFERS. Both turn up empty.
>
> Is there something i'm missing?
> Another weird thing, the preview window shows some colored dots when in
> fact, the data fed to it was the empty result from glReadPixels().
>
> I'm new to openGL programming and even newer to bgl.
>
> --
> khalibloo®
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



More information about the Bf-python mailing list