Time for action — using the border mode

  1. Create a new material called MyMaterial6, and just like the previous five times, base it on the material used previously.
  2. Change the texture mode to border:
    tex_address_mode border
    
  3. Also remember to change the used material in the code file:
    manual->begin("MyMaterial6", RenderOperation::OT_TRIANGLE_LIST);
    
  4. Compile and run the application. Surprisingly, this time we will only see one leaf.
    Time for action — using the border mode

What just happened?

Where did the other leaves go? The border mode doesn't create multiple copies of our texture through mirroring or wrapping. When texture coordinates are greater one, this mode paints everything in the defined border color the default obviously is black, as black can be seen as the zero value for colors.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.9.223