コード例 #1
0
 private void initialize() {
   Tessellator tessellator = new Tessellator();
   TessellatorHelper.addBlockMesh(
       tessellator,
       new Vector4f(1, 1, 1, 1f),
       textureRegion.min(),
       textureRegion.size(),
       1.001f,
       1.0f,
       1.0f,
       0.0f,
       0.0f,
       0.0f);
   overlayMesh = tessellator.generateMesh();
   tessellator = new Tessellator();
   TessellatorHelper.addBlockMesh(
       tessellator,
       new Vector4f(1, 1, 1, .2f),
       textureRegion.min(),
       textureRegion.size(),
       1.001f,
       1.0f,
       1.0f,
       0.0f,
       0.0f,
       0.0f);
   overlayMesh2 = tessellator.generateMesh();
   defaultTextured = Assets.getMaterial("engine:prog.defaultTextured").get();
 }
コード例 #2
0
 public UITransparentOverlay() {
   if (_mesh == null) {
     Tessellator tessellator = new Tessellator();
     TessellatorHelper.addGUIQuadMesh(
         tessellator, new Vector4f(0.0f, 0.0f, 0.0f, 0.25f), 1.0f, 1.0f);
     _mesh = tessellator.generateMesh();
   }
 }