Important: Please read the Qt Code of Conduct -

Custom mesh, but QQuickShaderEffectMesh is defined private

  • I am playing ShaderEffect in QtQuick 2.0, and there is a mesh property. The document said:
    "This property defines the mesh used to draw the ShaderEffect. It can hold any mesh object deriving from QQuickShaderEffectMesh, such as GridMesh."
    But it seems the QQuickShaderEffectMesh is defined in a private header file inside Qt, so I cannot derived from it. How can I make a custom mesh in ShaderEffect?

  • Hi,

    It sounds like the documentation needs to be updated (I'd suggest filing a bug at ). Have you looked at using GridMesh to define your mesh? Can you give any information about what sort of custom mesh you are looking to produce?


  • Hi,
    Yes, I have looked at GridMesh, but it seems that it can define the resolution only, right?
    In my case, I want to get an distorted texture without vertex shader, such as the vector deformation example (

  • Yes, as far as I know GridMesh only defines a resolution, and is meant to be used with a custom vertex shader.

Log in to reply