Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Custom mesh, but QQuickShaderEffectMesh is defined private

    QML and Qt Quick
    2
    4
    1567
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      diro last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • M
        mbrasser last edited by

        Hi,

        It sounds like the documentation needs to be updated (I'd suggest filing a bug at http://bugreports.qt-project.org ). 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?

        Regards,
        Michael

        1 Reply Last reply Reply Quote 0
        • D
          diro last edited by

          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 (http://qt-project.org/doc/qt-4.8/demos-deform.html)

          1 Reply Last reply Reply Quote 0
          • M
            mbrasser last edited by

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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post