Java Code Examples for com.jogamp.opengl.GL3#glPointParameteri()

The following examples show how to use com.jogamp.opengl.GL3#glPointParameteri() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Gl_320_primitive_point_quad.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean begin(GL gl) {

    GL3 gl3 = (GL3) gl;
    //caps Caps(caps::CORE);

    boolean validated = true;

    if (validated) {
        validated = initProgram(gl3);
    }
    if (validated) {
        validated = initBuffer(gl3);
    }
    if (validated) {
        validated = initVertexArray(gl3);
    }

    gl3.glEnable(GL_DEPTH_TEST);
    gl3.glDepthFunc(GL_LESS);
    gl3.glEnable(GL_PROGRAM_POINT_SIZE);
    //glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
    gl3.glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT);

    return validated && checkError(gl3, "begin");
}
 
Example 2
Source File: Gl_320_primitive_point.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean begin(GL gl) {

    GL3 gl3 = (GL3) gl;

    boolean validated = true;

    if (validated) {
        validated = initProgram(gl3);
    }
    if (validated) {
        validated = initBuffer(gl3);
    }
    if (validated) {
        validated = initVertexArray(gl3);
    }

    gl3.glEnable(GL_DEPTH_TEST);
    gl3.glDepthFunc(GL_LESS);
    gl3.glEnable(GL_PROGRAM_POINT_SIZE);
    //glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
    gl3.glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT);

    return validated && checkError(gl3, "begin");
}
 
Example 3
Source File: Gl_320_primitive_point_clip.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean begin(GL gl) {

    GL3 gl3 = (GL3) gl;
    //caps Caps(caps::CORE);

    boolean validated = true;

    if (validated) {
        validated = initProgram(gl3);
    }
    if (validated) {
        validated = initBuffer(gl3);
    }
    if (validated) {
        validated = initVertexArray(gl3);
    }

    gl3.glEnable(GL_DEPTH_TEST);
    gl3.glDepthFunc(GL_LESS);
    gl3.glEnable(GL_PROGRAM_POINT_SIZE);
    //glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
    gl3.glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT);

    return validated && checkError(gl3, "begin");
}
 
Example 4
Source File: Gl_320_primitive_sprite.java    From jogl-samples with MIT License 5 votes vote down vote up
@Override
protected boolean begin(GL gl) {

    GL3 gl3 = (GL3) gl;

    boolean validated = true;

    if (validated) {
        validated = initTexture(gl3);
    }
    if (validated) {
        validated = initProgram(gl3);
    }
    if (validated) {
        validated = initBuffer(gl3);
    }
    if (validated) {
        validated = initVertexArray(gl3);
    }

    gl3.glEnable(GL_DEPTH_TEST);
    gl3.glDepthFunc(GL_LESS);
    gl3.glEnable(GL_PROGRAM_POINT_SIZE);
    //glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
    gl3.glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT);

    return validated;
}
 
Example 5
Source File: Gl_320_fbo_blend_points.java    From jogl-samples with MIT License 4 votes vote down vote up
@Override
    protected boolean begin(GL gl) {

        GL3 gl3 = (GL3) gl;

        boolean validated = true;

        gl3.glEnable(GL_PROGRAM_POINT_SIZE);
        /**
         * Strange, I remember I had to enable it to get it working, but if I do it now I get
         *
         * type Error
         * severity High: dangerous undefined behavior
         * source GL API
         * msg GL_INVALID_ENUM error generated. Cannot enable <cap> in the current profile.
         */
//        gl3.glEnable(GL_POINT_SPRITE);
        gl3.glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);

        float[] pointSizeProperties = new float[3];
        gl3.glGetFloatv(GL2GL3.GL_POINT_SIZE_RANGE, pointSizeProperties, 0);
        gl3.glGetFloatv(GL2GL3.GL_POINT_SIZE_GRANULARITY, pointSizeProperties, 2);
        System.out.println("pointSizeRange: (" + pointSizeProperties[0] + ", " + pointSizeProperties[1] + ") "
                + "granularity: " + pointSizeProperties[2]);

        if (validated) {
            validated = initProgram(gl3);
        }
        if (validated) {
            validated = initBuffer(gl3);
        }
        if (validated) {
            validated = initVertexArray(gl3);
        }
        if (validated) {
            validated = initTexture(gl3);
        }
        if (validated) {
            validated = initFramebuffer(gl3);
        }

        return validated;
    }