[Interest] [Qt3D] Get OpenGL texture data / Send preprocessor instructions to shaders
Léo Adam
adam.leo.contact at gmail.com
Tue Feb 25 15:15:25 CET 2020
Hi,
I am new to Qt3D and there's a few things I was wondering how to achieve:
- I need to read and write an opengl texture from C++.
For example, I am rendering a scene into a texture during a first render
pass, and then performing some postprocess effect before rendering that
texture in a fullscreen quad during a second render pass.
I would like to access that texture from C++, and can't manage to do that.
I've found the classes *QTextureImageData*/*QTextureData*/
*QTextureDataGenerator*, but I don't know if that's really what I'm looking
for and if it is, how to use it.
- I also would like to send preprocessor instructions to a shader from
C++/QML and I don't know if this is possible.
For example, if I want to use *#ifdef* in a shader with a value defined in
C++, I would need to send that value to the shader just like *QParameter*
do with uniforms.
I've searched in the documentation and on internet, but I didn't find
anything.
Any help would be highly appreciated :-)
Sincerely,
Léo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200225/d77631b6/attachment.html>
More information about the Interest
mailing list