當前位置: 首頁>>代碼示例>>Java>>正文


Java GL20.glDeleteProgram方法代碼示例

本文整理匯總了Java中org.lwjgl.opengl.GL20.glDeleteProgram方法的典型用法代碼示例。如果您正苦於以下問題:Java GL20.glDeleteProgram方法的具體用法?Java GL20.glDeleteProgram怎麽用?Java GL20.glDeleteProgram使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.lwjgl.opengl.GL20的用法示例。


在下文中一共展示了GL20.glDeleteProgram方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: validate

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public Program validate()
{
	GL20.glValidateProgram(this.handle);

	int status = GL20.glGetProgrami(this.handle, GL20.GL_VALIDATE_STATUS);
	if (status == GL11.GL_FALSE)
	{
		String infoLog = GL20.glGetProgramInfoLog(this.handle);
		GL20.glDeleteProgram(this.handle);
		this.handle = 0;

		throw new GLException(infoLog);
	}

	return this;
}
 
開發者ID:andykuo1,項目名稱:candlelight,代碼行數:17,代碼來源:Program.java

示例2: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
	stop();
	GL20.glDetachShader(programID, vertexShaderID);
	GL20.glDetachShader(programID,  fragmentShaderID);
	GL20.glDeleteShader(vertexShaderID);
	GL20.glDeleteShader(fragmentShaderID);
	GL20.glDeleteProgram(programID);
}
 
開發者ID:marcioz98,項目名稱:MRCEngine,代碼行數:9,代碼來源:ShaderProgram.java

示例3: deleteShaderProgram

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void deleteShaderProgram() {
	GL15.glDeleteBuffers(vbo);
	vbo = 0;
	GL15.glDeleteBuffers(worldChunkSsbo);
	worldChunkSsbo = 0;
	GL15.glDeleteBuffers(chunkSsbo);
	chunkSsbo = 0;
	GL20.glDeleteProgram(shaderProgram);
	shaderProgram = 0;
}
 
開發者ID:18107,項目名稱:MC-Ray-Tracer,代碼行數:11,代碼來源:Shader.java

示例4: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
    LOGGER.debug("Cleaning resources for program - {} vertex - {} fragment - {}", programId, vertShaderId, fragShaderId);
    stop();
    GL20.glDetachShader(programId, vertShaderId);
    GL20.glDetachShader(programId, fragShaderId);
    GL20.glDeleteShader(vertShaderId);
    GL20.glDeleteShader(fragShaderId);
    GL20.glDeleteProgram(programId);
}
 
開發者ID:Biacode,項目名稱:bia-engine,代碼行數:10,代碼來源:ShaderProgram.java

示例5: glDeleteProgram

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public static void glDeleteProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(program);
    }
    else
    {
        GL20.glDeleteProgram(program);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:12,代碼來源:OpenGlHelper.java

示例6: destroy

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
/**
 * Cleanup
 */
public void destroy() {
	GL20.glUseProgram(0);

	// Delete the shaders
	for (Shader shader : shaders) {
		GL20.glDetachShader(id, shader.id);
		shader.destroy();
	}

	// Delete the program
	GL20.glDeleteProgram(id);
}
 
開發者ID:tacocat,項目名稱:lambda,代碼行數:16,代碼來源:ShaderProgram.java

示例7: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
/**
 * Cleans up shader when exiting.
 */
public void cleanUp() {
    stop();
    GL20.glDetachShader(programID, vertexShaderID);
    GL20.glDetachShader(programID, fragmentShaderID);
    GL20.glDeleteShader(vertexShaderID);
    GL20.glDeleteShader(fragmentShaderID);
    GL20.glDeleteProgram(programID);
}
 
開發者ID:Essentria,項目名稱:Elgin-Plant-Game,代碼行數:12,代碼來源:ShaderProgram.java

示例8: close

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
@Override
public void close() throws Exception
{
	GL20.glDeleteProgram(this.handle);
	this.handle = 0;

	PROGRAMS.remove(this);
}
 
開發者ID:andykuo1,項目名稱:candlelight,代碼行數:9,代碼來源:Program.java

示例9: link

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public Program link(Shader... shaders)
{
	for (int i = 0; i < shaders.length; ++i)
	{
		GL20.glAttachShader(this.handle, shaders[i].handle());
	}
	GL20.glLinkProgram(this.handle);

	int status = GL20.glGetProgrami(this.handle, GL20.GL_LINK_STATUS);
	if (status == GL11.GL_FALSE)
	{
		String infolog = GL20.glGetProgramInfoLog(this.handle);
		GL20.glDeleteProgram(this.handle);
		this.handle = 0;

		throw new GLException(infolog);
	}

	for (int i = 0; i < shaders.length; ++i)
	{
		GL20.glDetachShader(this.handle, shaders[i].handle());
	}

	this.attribs = this.fetchAttribs();
	Uniform[] uniforms = this.fetchUniforms();
	for(Uniform uniform : uniforms)
	{
		this.uniforms.put(uniform.name, uniform);
	}

	return this;
}
 
開發者ID:andykuo1,項目名稱:candlelight,代碼行數:33,代碼來源:Program.java

示例10: deleteShaderProgram

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void deleteShaderProgram() {
	GL15.glDeleteBuffers(vbo);
	GL20.glDetachShader(shaderProgram, vshader);
	GL20.glDetachShader(shaderProgram, fshader);
	GL20.glDeleteShader(vshader);
	vshader = 0;
	GL20.glDeleteShader(fshader);
	fshader = 0;
	GL20.glDeleteProgram(shaderProgram);
	shaderProgram = 0;
}
 
開發者ID:shaunlebron,項目名稱:flex-fov,代碼行數:12,代碼來源:Shader.java

示例11: dispose

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void dispose()
{
	unbind();
	GL20.glDetachShader(program, vertex);
	GL20.glDetachShader(program, fragment);
	GL20.glDeleteShader(vertex);
	GL20.glDeleteShader(fragment);
	GL20.glDeleteProgram(program);
}
 
開發者ID:ComunityEngine,項目名稱:CommunityEngine-Java,代碼行數:10,代碼來源:Shader.java

示例12: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
	stop();
	GL20.glDetachShader(programID, vertexShaderID);
	GL20.glDetachShader(programID, fragmentShaderID);
	GL20.glDeleteShader(vertexShaderID);
	GL20.glDeleteShader(fragmentShaderID);
	GL20.glDeleteProgram(programID);
}
 
開發者ID:DevipriyaSarkar,項目名稱:Terrain,代碼行數:9,代碼來源:ShaderProgram.java

示例13: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
	GL20.glUseProgram(0);
	GL20.glDeleteProgram(programID);
}
 
開發者ID:TheThinMatrix,項目名稱:LowPolyWater,代碼行數:5,代碼來源:ShaderProgram.java

示例14: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
	stop();
	GL20.glDeleteProgram(programID);
}
 
開發者ID:TheThinMatrix,項目名稱:OpenGL-Animation,代碼行數:5,代碼來源:ShaderProgram.java

示例15: cleanUp

import org.lwjgl.opengl.GL20; //導入方法依賴的package包/類
public void cleanUp() {
    GL20.glUseProgram(0);
    GL20.glDeleteProgram(programID);
}
 
開發者ID:GryPLOfficial,項目名稱:EcoSystem-Official,代碼行數:5,代碼來源:ShaderProgram.java


注:本文中的org.lwjgl.opengl.GL20.glDeleteProgram方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。