Check that the texture format is a color-renderable format.

@param t The texture format

@throws JCGLExceptionFormatError If the texture is not of the correct
format
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);
    }
  }
322350
protected JCExpression checkExprStat(JCExpression t) {
        if (!TreeInfo.isExpressionStatement(t)) {
            JCExpression ret = F.at(t.pos).Erroneous(List.<JCTree>of(t));
            error(ret, "not.stmt");
            return ret;
        } else {
            return t;
        }
    }
1366827
function( format, type, internal ){
    var t = new Texture( this.gl, format, type, internal );
    return this.attach( 0x8CE0, t );
  }
1339073
public static RenderTarget create (Graphics gfx, final Texture tex) {
    GL20 gl = gfx.gl;
    final int fb = gl.glGenFramebuffer();
    if (fb == 0) throw new RuntimeException("Failed to gen framebuffer: " + gl.glGetError());
    gl.glBindFramebuffer(GL_FRAMEBUFFER, fb);
    gl.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex.id, 0);
    gl.checkError("RenderTarget.create");
    return new RenderTarget (gfx) {
      public int id () { return fb; }
      public int width () { return tex.pixelWidth; }
      public int height () { return tex.pixelHeight; }
      public float xscale () { return tex.pixelWidth / tex.displayWidth; }
      public float yscale () { return tex.pixelHeight / tex.displayHeight; }
      public boolean flip () { return false; }
    };
  }
531254
public void propagateIfCancelException(final Throwable t) {
    final RuntimeException cancelException = this.getPlatformOperationCanceledException(t);
    if ((cancelException != null)) {
      throw cancelException;
    }
  }
257725
public void setTexture(GVRRenderTexture texture)
    {
        mTexture = texture;
        NativeRenderTarget.setTexture(getNative(), texture.getNative());
    }
546821
@Override
    public void paint(Graphics g, Shape allocation)
    {
        if (view != null)
        {
            view.paint(g, allocation);
        }
    }
120170
public static void throwRuntimeException(Throwable t)
    {
        // Unchecked? Can re-throw as is
        throwIfUnchecked(t);
        // Otherwise, let's just change its type:
        throw new RuntimeException("[was "+t.getClass()+"] "+t.getMessage(), t);
    }
1181611
public void setTexture(String key, GVRTexture texture)
    {
        checkStringNotNullOrEmpty("key", key);
        synchronized (textures)
        {
            textures.put(key, texture);
            NativeShaderData.setTexture(getNative(), key, texture != null ? texture.getNative() : 0);
        }
    }
1264794
function LGraphTextureColor() {
            this.addOutput("Texture", "Texture");

            this._tex_color = vec4.create();
            this.properties = {
                color: vec4.create(),
                precision: LGraphTexture.DEFAULT
            };
        }
762142
public static <R extends JCGLResourceUsableType> R checkNotDeleted(
    final R r)
    throws JCGLExceptionDeleted
  {
    NullCheck.notNull(r, "Resource");

    if (r.isDeleted()) {
      throw new JCGLExceptionDeleted(
        String.format(
          "Cannot perform operation: OpenGL object %s has been deleted.", r));
    }

    return r;
  }
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;
        }
    }
1374781
def texture_formats(self):
        """"""
        info = self._get_renderer_info()
        return {PixelFormat(info.texture_formats[i]) for i in range(info.num_texture_formats)}
953877
private boolean validate(TextInputControl tf) {
        boolean res = tf.getText().trim().length() == 0;
        ObservableList<String> styleClass = tf.getStyleClass();
        if (res) {
            if (!styleClass.contains("error")) {
                tf.setStyle("-text-area-background: " + errorColor + ";");
                styleClass.add("error");
            }
        } else {
            // remove all occurrences:
            tf.setStyle("-text-area-background: " + defaultColor + ";");
            styleClass.removeAll(Collections.singleton("error"));
        }

        return res;
    }
775806
public boolean acceptTemplate(String tpl)
	{

		if (isInWhiteList(tpl) && !isInBlackList(tpl)) {
			if (containsAllowedPrefix(tpl) && !containsRestrictedPrefix(tpl)) {
				return true;
			}
			else {
				return false;
			}
		}
		else {
			return false;
		}

	}
455922
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
	{
		try
		{
			Rectangle r = c.modelToView(c.getCaretPosition());
			g.setColor( color );
			g.fillRect(0, r.y, c.getWidth(), r.height);

			if (lastView == null)
				lastView = r;
		}
		catch(BadLocationException ble) {System.out.println(ble);}
	}
229258
public static void validateLambdaType(Class<?> baseClass, Type t) {
		if (!(t instanceof Class)) {
			return;
		}
		final Class<?> clazz = (Class<?>) t;

		if (clazz.getTypeParameters().length > 0) {
			throw new InvalidTypesException("The generic type parameters of '" + clazz.getSimpleName() + "' are missing. "
				+ "In many cases lambda methods don't provide enough information for automatic type extraction when Java generics are involved. "
				+ "An easy workaround is to use an (anonymous) class instead that implements the '" + baseClass.getName() + "' interface. "
				+ "Otherwise the type has to be specified explicitly using type information.");
		}
	}