Jump to content

Search the Community

Showing results for tags 'addColor'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hello, I use unigine sim 2.0, when i use addColor() function of ObjectMeshDynamic class it can not work,the code like below: int init() { ObjectMeshDynamic mesh = new ObjectMeshDynamic(); // Create a dynamic mesh and add it into the editor. engine.editor.addNode(node_remove(mesh)); mesh.setWorldTransform(translate(Vec3(0.0f,0.0f,2.0f))); mesh.setMaterial("mesh_base","*"); mesh.setProperty("surface_base","*"); mesh.addTriangleQuads(1); // Allocate space in a vertex buffer and create vertex indices. mesh.addVertex(vec3(-1.0f,-1.0f,0.0f)); // Add vertices and assign texture coordinates, if necessary. mesh.addColor(vec4(1,0,0,1)); mesh.addVertex(vec3(1.0f,-1.0f,0.0f)); mesh.addColor(vec4(1,1,0,1)); mesh.addVertex(vec3(1.0f,1.0f,0.0f)); mesh.addColor(vec4(1,1,1,1)); mesh.addVertex(vec3(-1.0f,1.0f,0.0f)); mesh.addColor(vec4(0,0,0,1)); mesh.updateTangents(); // Calculate tangent vectors. mesh.updateIndices(); // Optimize vertex and index buffers, if necessary. mesh.updateBounds(); // Calculate a mesh bounding box. return 1;} How can i use it for work? Thanks.
×
×
  • Create New...