Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create and apply texture to object in C++ or Python?(Qt 3D)
Forum Updated to NodeBB v4.3 + New Features

How to create and apply texture to object in C++ or Python?(Qt 3D)

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 172 Views
  • 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.
  • RayterexR Offline
    RayterexR Offline
    Rayterex
    wrote on last edited by
    #1

    I am struggling to create and apply basic texture in Qt. I suppose it should be one line of code, but for some reason it is very complicated and poorly documented. I am trying to use QDiffuseSpecularMaterial Class but its maps are of QVariant type. I suppose I should use QAbstractTexture Class to load the textures and then convert them to QVariant somehow. Problem is that QAbstractTexture Class doesn't have any method that loads the texture. There is an addTextureImage method but its argument is QAbstractTextureImage Class that still doesn't have any load method. Even if I could load the texture somehow I have no idea how to convert them to QVariant. Does anyone know how to create and apply any basic image to the any basic 3D object? Is it possible to use QImage or QPixmap and conver them to Textures or QVariant somehow?

    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