Check that the texture is of a depth+stencil-renderable format.

@param t The texture

@throws JCGLExceptionFormatError If the texture is not of the correct
format
186532
public static void checkDepthStencilRenderableTexture2D(
    final JCGLTextureFormat t)
    throws JCGLExceptionFormatError
  {
    if (isDepthRenderable(t)
      && isStencilRenderable(t)) {
      return;
    }

    final String m =
      String.format("Format %s is not depth+stencil-renderable", t);
    assert m != null;
    throw new JCGLExceptionFormatError(m);
  }
1144791
protected void repaint(int t)
    {
        if (container != null)
        {
            Rectangle bounds = owner.getAbsoluteBounds();
            container.repaint(t, bounds.x, bounds.y, bounds.width, bounds.height);
        }
    }
1110958
public void propagateAsErrorIfCancelException(final Throwable t) {
    if ((t instanceof OperationCanceledError)) {
      throw ((OperationCanceledError)t);
    }
    final RuntimeException opCanceledException = this.getPlatformOperationCanceledException(t);
    if ((opCanceledException != null)) {
      throw new OperationCanceledError(opCanceledException);
    }
  }
67366
private static void setDerivedFont(JTable t, float size)
    {
        t.setFont(t.getFont().deriveFont(size));
        t.getTableHeader().setFont(
            t.getTableHeader().getFont().deriveFont(size));
    }
74816
private void checkTree(int t) {
    int head = -1;
    int u = t;
    int tindex = index(t);
    int tsize = chunkSize(t);
    int index = treeBinIndex(tsize);

    if (tindex != index) 
      throw new AssertionError("Tree node " + u + " has incorrect index [" + index(u) + "!=" + tindex + "]");
    if (tsize < MIN_LARGE_SIZE)
      throw new AssertionError("Tree node " + u + " is too small to be in a tree [" + tsize + "<" + MIN_LARGE_SIZE + "]");
    if (tsize < minSizeForTreeIndex(index))
      throw new AssertionError("Tree node " + u + " is too small to be in this tree [" + tsize + "<" + minSizeForTreeIndex(index) + "]");
    if (index != NTREEBINS-1 && tsize >= minSizeForTreeIndex(index + 1))
      throw new AssertionError("Tree node " + u + " is too large to be in this tree [" + tsize + ">=" + minSizeForTreeIndex(index + 1) + "]");

    do { /* traverse through chain of same-sized nodes */
      checkAnyChunk(u);
      if (index(u) != tindex)
        throw new AssertionError("Tree node " + u + " has incorrect index [" + index(u) + "!=" + tindex + "]");
      if (chunkSize(u) != tsize)
        throw new AssertionError("Tree node " + u + " has an mismatching size [" + chunkSize(u) + "!=" + tsize + "]");
      if (isInUse(u))
        throw new AssertionError("Tree node " + u + " is in use");
      if (nextPreviousInUse(u))
        throw new AssertionError("Tree node " + u + " is marked as in use in the next chunk");
      if (backward(forward(u)) != u)
        throw new AssertionError("Tree node " + u + " has incorrect chain links");
      if (forward(backward(u)) != u)
        throw new AssertionError("Tree node " + u + " has incorrect chain links");
      if (parent(u) == -1 && u != treeBins[index]) {
        if (child(u, 0) != -1)
          throw new AssertionError("Tree node " + u + " is chained from the tree but has a child " + child(u, 0));
        if (child(u, 1) != -1)
          throw new AssertionError("Tree node " + u + " is chained from the tree but has a child" + child(u, 1));
      } else {
        if (head != -1)
          throw new AssertionError("Tree node " + u + " is the second node in this chain with a parent [first was " + head + "]");
        head = u;
        
        if (treeBins[index] == u) {
          if (parent(u) != -1)
            throw new AssertionError("Tree node " + u + " is the head of the tree but has a parent " + parent(u));
        } else {
          if (parent(u) == u)
            throw new AssertionError("Tree node " + u + " is its own parent");
          if (child(parent(u), 0) != u && child(parent(u), 1) != u)
            throw new AssertionError("Tree node " + u + " is not a child of its parent");
        }
        
        if (child(u, 0) != -1) {
          if (parent(child(u, 0)) != u)
            throw new AssertionError("Tree node " + u + " is not the parent of its left child");
          if (child(u, 0) == u)
            throw new AssertionError("Tree node " + u + " is its own left child");
          checkTree(child(u, 0));
        }
        if (child(u, 1) != -1) {
          if (parent(child(u, 1)) != u)
            throw new AssertionError("Tree node " + u + " is not the parent of its right child");
          if (child(u, 1) == u)
            throw new AssertionError("Tree node " + u + " is its own right child");
          checkTree(child(u, 1));
        }
        if (child(u, 0) != -1 && child(u, 1) != -1 && chunkSize(child(u, 0)) >= chunkSize(child(u, 1))) {
          throw new AssertionError("Tree node " + u + " has it's left child bigger than it's right child");
        }
      }
      u = forward(u);
    } while (u != t);
    
    if (head == -1)
      throw new AssertionError("This tree level has no nodes with a parent");
  }
1322039
public static JCGLDepthFunction depthFunctionFromGL(
    final int d)
  {
    switch (d) {
      case GL.GL_ALWAYS:
        return JCGLDepthFunction.DEPTH_ALWAYS;
      case GL.GL_EQUAL:
        return JCGLDepthFunction.DEPTH_EQUAL;
      case GL.GL_GREATER:
        return JCGLDepthFunction.DEPTH_GREATER_THAN;
      case GL.GL_GEQUAL:
        return JCGLDepthFunction.DEPTH_GREATER_THAN_OR_EQUAL;
      case GL.GL_LESS:
        return JCGLDepthFunction.DEPTH_LESS_THAN;
      case GL.GL_LEQUAL:
        return JCGLDepthFunction.DEPTH_LESS_THAN_OR_EQUAL;
      case GL.GL_NEVER:
        return JCGLDepthFunction.DEPTH_NEVER;
      case GL.GL_NOTEQUAL:
        return JCGLDepthFunction.DEPTH_NOT_EQUAL;
      default:
        throw new UnreachableCodeException();
    }
  }
241079
public static JCGLTexture2DUpdateType newUpdateReplacingAll2D(
    final JCGLTexture2DUsableType t)
  {
    NullCheck.notNull(t, "Texture");
    return newUpdateReplacingArea2D(t, AreaSizesL.area(t.size()));
  }
252937
function( gl, v, renderer ) {

			var n = v.length,
				units = allocTexUnits( renderer, n );

			gl.uniform1iv( this.addr, units );

			for ( var i = 0; i !== n; ++ i ) {

				renderer.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );

			}

		}
1218449
public void javacError(String message, Throwable t) {
		messager.printMessage(Diagnostic.Kind.ERROR, message + (t == null ? "" : (": " + t)));
		if (t != null) t.printStackTrace();
	}
546821
@Override
    public void paint(Graphics g, Shape allocation)
    {
        if (view != null)
        {
            view.paint(g, allocation);
        }
    }
238354
@Override
    public void render(Graphic g, Handlables featurables)
    {
        for (final Integer layer : indexs)
        {
            for (final Displayable displayable : layers.get(layer))
            {
                displayable.render(g);
            }
        }
    }
1083985
private static void onGlInitialization() {
        if (glUninitialized) {
            glGetError(); // reset any previous error
            int[] size = new int[] { -1 };
            glGetIntegerv(GL_MAX_TEXTURE_SIZE, size, 0);

            int errorCode = glGetError();
            if (errorCode != GL_NO_ERROR) {
                throw Exceptions.RuntimeAssertion(
                        "Error %d getting max texture size", errorCode);
            }

            int maxTextureSize = size[0];
            if (maxTextureSize <= 0) {
                throw Exceptions.RuntimeAssertion(
                        "Invalid max texture size %d", maxTextureSize);
            }

            glMaxTextureSize = maxTextureSize;
            Log.d(TAG, "Actual GL_MAX_TEXTURE_SIZE = %d", glMaxTextureSize);

            glUninitialized = false;
        }
    }
1370337
function( gl, v, renderer ) {

			var unit = renderer.allocTextureUnit();
			gl.uniform1i( this.addr, unit );
			renderer.setTexture2D( v || emptyTexture, unit );

		}
1366827
function( format, type, internal ){
    var t = new Texture( this.gl, format, type, internal );
    return this.attach( 0x8CE0, t );
  }
397747
private static void parseStencil(JSONObject modelJSON,
                                     Shape current) throws JSONException {
        // get stencil type
        if (modelJSON.has("stencil")) {
            JSONObject stencil = modelJSON.getJSONObject("stencil");
            // TODO other attributes of stencil
            String stencilString = "";
            if (stencil.has("id")) {
                stencilString = stencil.getString("id");
            }
            current.setStencil(new StencilType(stencilString));
        }
    }
346655
public static void checkColorRenderableTexture2D(
    final JCGLTextureFormat t)
    throws JCGLExceptionFormatError
  {
    if (!isColorRenderable2D(t)) {
      final String m = String.format(
        "Format %s is not color-renderable for 2D textures", t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }
  }
1175995
@Override
    public void setCursorDepth(float depth)
    {
        super.setCursorDepth(depth);
        if (mRayModel != null)
        {
            mRayModel.getTransform().setScaleZ(mCursorDepth);
        }
    }