Jump to content

How to set wrap mode when I creating texture in C++ codes?


photo

Recommended Posts

I've created a mesh in Unigine's DynamicMesh object , and now need to create Texture and Material info for this object .

Is there any sample codes or demo related to create texture and set its parameter  I can refer to  > thanks. 

BTW , no idea a little bit difficult to search it in online doc with keywords "Create Textures" 

Link to comment

Answer my questions. 

There is a emun in UnigineTexture object when create texture 

        // wrapping
        WRAP_CLAMP_X = 1 << 5,
        WRAP_CLAMP_Y = 1 << 6,
        WRAP_CLAMP_Z = 1 << 7,
        WRAP_CLAMP = (WRAP_CLAMP_X | WRAP_CLAMP_Y | WRAP_CLAMP_Z),
        WRAP_BORDER_X = 1 << 8,
        WRAP_BORDER_Y = 1 << 9,
        WRAP_BORDER_Z = 1 << 10,
        WRAP_BORDER_W = 1 << 11,
        WRAP_BORDER = (WRAP_BORDER_X | WRAP_BORDER_Y | WRAP_BORDER_Z),

 

 

Sample codes:

mat->setImageTextureFlags(texId, Texture::WRAP_CLAMP);

 

  • Like 1
Link to comment
×
×
  • Create New...