Example usage for org.lwjgl.opengl GL32 GL_GEOMETRY_SHADER

List of usage examples for org.lwjgl.opengl GL32 GL_GEOMETRY_SHADER

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL32 GL_GEOMETRY_SHADER.

Prototype

int GL_GEOMETRY_SHADER

To view the source code for org.lwjgl.opengl GL32 GL_GEOMETRY_SHADER.

Click Source Link

Document

Accepted by the type parameter of CreateShader and returned by the params parameter of GetShaderiv.

Usage

From source file:com.grillecube.client.renderer.gui.ProgramColoredQuad.java

public ProgramColoredQuad() {
    super();//from   w  w w .  j a  v a2  s  .  c  o m
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadColored.fs"), GL20.GL_FRAGMENT_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadColored.gs"), GL32.GL_GEOMETRY_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadColored.vs"), GL20.GL_VERTEX_SHADER));
    this.link();
}

From source file:com.grillecube.client.renderer.gui.ProgramTexturedQuad.java

public ProgramTexturedQuad() {
    super();/* w w  w  .  j  a  va 2s  .c om*/
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadTextured.fs"), GL20.GL_FRAGMENT_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadTextured.gs"), GL32.GL_GEOMETRY_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quadTextured.vs"), GL20.GL_VERTEX_SHADER));
    this.link();
}

From source file:com.grillecube.client.renderer.particles.ProgramParticleBillboarded.java

public ProgramParticleBillboarded() {
    super();/*  w w w .  j av  a2s . c o m*/
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/billboards.gs"), GL32.GL_GEOMETRY_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/billboards.vs"), GL20.GL_VERTEX_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/billboards.fs"), GL20.GL_FRAGMENT_SHADER));
    this.link();
}

From source file:com.grillecube.engine.renderer.gui.ProgramQuad.java

public ProgramQuad() {
    super();//from  w  ww  .j  av  a2 s  .c o  m
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quad.fs"), GL20.GL_FRAGMENT_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quad.gs"), GL32.GL_GEOMETRY_SHADER));
    this.addShader(GLH.glhLoadShader(R.getResPath("shaders/gui/quad.vs"), GL20.GL_VERTEX_SHADER));
    this.link();
}

From source file:com.runescape.client.revised.client.lwjgl.Shader.java

License:Open Source License

public void addGeometryShader(final String text) {
    this.addProgram(text, GL32.GL_GEOMETRY_SHADER);
}

From source file:fr.ign.cogit.geoxygene.util.gl.GLProgram.java

License:Open Source License

/**
 * Try to create a compiled geometry shader
 * /*  w  w  w .j av  a 2 s.  co m*/
 * @param shaderContent
 *            shader content as a string
 * @param filename
 *            file containing the shader content. It can be null, it is used
 *            only to display the filename when an error occured
 * @return the shader id
 * @throws GLException
 *             on shader creation error
 */
public static final int createGeometryShader(String shaderContent, String filename) throws GLException {
    return GLTools.createShader(GL32.GL_GEOMETRY_SHADER, shaderContent, filename);
}

From source file:org.jogamp.glg2d.impl.shader.AbstractShaderPipeline.java

License:Apache License

protected void attachShaders() {
    if (vertexShaderFileName != null) {
        vertexShaderId = compileShader(GL20.GL_VERTEX_SHADER, getClass(), vertexShaderFileName);
        GL20.glAttachShader(programId, vertexShaderId);
    }//ww  w.  j  a va2s  .c  o  m

    if (geometryShaderFileName != null) {
        geometryShaderId = compileShader(GL32.GL_GEOMETRY_SHADER, getClass(), geometryShaderFileName);
        GL20.glAttachShader(programId, geometryShaderId);
    }

    if (fragmentShaderFileName != null) {
        fragmentShaderId = compileShader(GL20.GL_FRAGMENT_SHADER, getClass(), fragmentShaderFileName);
        GL20.glAttachShader(programId, fragmentShaderId);
    }
}

From source file:ovh.tgrhavoc.gameengine.core.Shader.java

License:Open Source License

public void addGeomertyShaderFromFile(String text) {
    addProgram(loadShaders(text), GL32.GL_GEOMETRY_SHADER);
}

From source file:ovh.tgrhavoc.gameengine.core.Shader.java

License:Open Source License

public void addGeomertyShader(String text) {
    addProgram(text, GL32.GL_GEOMETRY_SHADER);
}

From source file:se.angergard.engine.graphics.ShaderProgram.java

License:Apache License

private ShaderProgram addShader(String code, int type) {
    int shader = GL20.glCreateShader(type);
    GL20.glShaderSource(shader, code);//from   ww w . ja va2  s  .  c om
    GL20.glCompileShader(shader);

    if (type == GL20.GL_VERTEX_SHADER) {
        vertexShader = shader;
    }

    else if (type == GL20.GL_FRAGMENT_SHADER) {
        fragmentShader = shader;
    }

    else if (type == GL32.GL_GEOMETRY_SHADER) {
        geometryShader = shader;
    }

    String error = GL20.glGetShaderInfoLog(shader, GL20.GL_INFO_LOG_LENGTH);
    if (!error.equals("")) {
        System.out.println(error);
    }

    if (shader == -1) {
        System.err.println("Shader wasn't succsessfully created");
    }

    GL20.glAttachShader(program, shader);
    return this;
}