List of usage examples for org.lwjgl.opengl GL20 glIsProgram
@NativeType("GLboolean") public static boolean glIsProgram(@NativeType("GLuint") int program)
From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java
License:Apache License
public boolean glIsProgram(int program) { return GL20.glIsProgram(program); }
From source file:fr.ign.cogit.geoxygene.appli.gl.GLContext.java
License:Open Source License
/** * set the given program as the current program in use (glUse) If the * requested program is already the current one: do nothing * /*from ww w . jav a 2 s . c om*/ * @param program * program instance * @return false on error */ public GLProgram setCurrentProgram(GLProgram program) throws GLException { if (program == null) { GL20.glUseProgram(0); RenderingStatistics.switchProgram(); this.currentProgram = null; return null; } // check if the current program is already the requested one if (program == this.getCurrentProgram()) { return program; } if (GL20.glIsProgram(program.getProgramId()) == false) { logger.error("Program Id " + program.getProgramId() + " (" + program.getName() + ") is not a valid GL program"); Thread.dumpStack(); GL20.glUseProgram(0); this.currentProgram = null; return null; } GL20.glUseProgram(program.getProgramId()); if (!GLTools.glCheckError("Use program '" + program.getName() + "' id = " + program.getProgramId())) { GL20.glUseProgram(0); this.currentProgram = null; return null; } RenderingStatistics.switchProgram(); this.currentProgram = program; // check correctness if (GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM) != this.getCurrentProgram().getProgramId() || program.getProgramId() != this.getCurrentProgram().getProgramId()) { logger.info("Set program id to " + program.getProgramId()); logger.info("Current program id to " + this.getCurrentProgram().getProgramId()); logger.info("GL Current program id " + GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM)); throw new GLException("Unable to set program id " + program.getProgramId() + " as current"); } return program; }
From source file:io.root.gfx.glutils.GL.java
License:Apache License
public static boolean glIsProgram(int program) { return GL20.glIsProgram(program); }
From source file:org.jogamp.glg2d.impl.shader.AbstractShaderPipeline.java
License:Apache License
protected void createProgramAndAttach() { if (GL20.glIsProgram(programId)) { delete();/* www . j av a 2 s . c o m*/ } programId = GL20.glCreateProgram(); attachShaders(); GL20.glLinkProgram(programId); checkProgramThrowException(programId, GL20.GL_LINK_STATUS); }
From source file:org.oscim.gdx.LwjglGL20.java
License:Apache License
public boolean isProgram(int program) { return GL20.glIsProgram(program); }
From source file:playn.java.JavaGL20.java
License:Apache License
@Override public boolean glIsProgram(int program) { return GL20.glIsProgram(program); }
From source file:processing.opengl.PLWJGL.java
License:Open Source License
@Override public boolean isProgram(int program) { return GL20.glIsProgram(program); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static boolean glIsProgram(int a) { return GL20.glIsProgram(a); }