Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to dynamically change the diffuse map of one object?
Forum Updated to NodeBB v4.3 + New Features

How to dynamically change the diffuse map of one object?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 466 Views 2 Watching
  • 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.
  • small_birdS Offline
    small_birdS Offline
    small_bird
    wrote on last edited by
    #1

    Hello everyone, my question is as the title.Below is the sample code:

        RenderableEntity {
            id: barrel
            source: "assets/metalbarrel/metal_barrel.obj"
            scale: 0.03 * root.scale
            position: Qt.vector3d(root.x, root.y, root.z)
    
            material: NormalDiffuseSpecularMapMaterial {
                id: material
                ambient: "black"
                diffuse: TextureLoader {
                    id:logo;
    
                    source: "...";
                }
    
                shininess: 5.0
            }
        }
    

    It seems like to change the source property so that the diffuse image could be changed, however, the result seems to be not like that:

    [Qt3DRender::GLTexture] No QTextureData generated from Texture Generator yet. Texture will be invalid for this frame
    class QOpenGLTexture *__cdecl Qt3DRender::Render::GLTexture::buildGLTexture(void) something went wrong, target shouldn't be automatic at this point
    class QOpenGLTexture *__cdecl Qt3DRender::Render::GLTexture::buildGLTexture(void) something went wrong, target shouldn't be automatic at this point
    class QOpenGLTexture *__cdecl Qt3DRender::Render::GLTexture::buildGLTexture(void) something went wrong, target shouldn't be automatic at this point
    class QOpenGLTexture *__cdecl Qt3DRender::Render::GLTexture::buildGLTexture(void) something went wrong, target shouldn't be automatic at this point
    

    Could anyone help me? Thanks in advance!

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      How to dynamically change the diffuse map of one object?
      ...
      however, the result seems to be not like that

      Hi! It's a bug / not supported. You can't do it right now.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved