Example usage for org.lwjgl.opengl GL20 GL_LOWER_LEFT

List of usage examples for org.lwjgl.opengl GL20 GL_LOWER_LEFT

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL20 GL_LOWER_LEFT.

Prototype

int GL_LOWER_LEFT

To view the source code for org.lwjgl.opengl GL20 GL_LOWER_LEFT.

Click Source Link

Document

Accepted by the param parameter of PointParameter{if}v.

Usage

From source file:espresso3d.engine.renderer.particle.E3DParticleRendererARBPointSprite.java

License:Open Source License

private void setupPointSpriteParameters(double spriteSize) {
    particleDistanceScalarBuffer.clear();
    //        particleDistanceScalarBuffer.put(0.0f);//1.0f);
    particleDistanceScalarBuffer.put(0.0f);//1.0f);
    particleDistanceScalarBuffer.put(0.0f);
    particleDistanceScalarBuffer.put((float) (1.0
            / (getEngine().getCurrentViewport().getWidth() * getEngine().getCurrentViewport().getHeight())));//0.1f);
    particleDistanceScalarBuffer.rewind();

    ARBPointParameters.glPointParameterARB(ARBPointParameters.GL_POINT_DISTANCE_ATTENUATION_ARB,
            particleDistanceScalarBuffer);
    ARBPointParameters.glPointParameterfARB(ARBPointParameters.GL_POINT_SIZE_MIN_ARB, 1f);//(float)particle.getSize());//1f );
    ARBPointParameters.glPointParameterfARB(ARBPointParameters.GL_POINT_SIZE_MAX_ARB, maxPointSpriteSize);
    ARBPointParameters.glPointParameterfARB(ARBPointParameters.GL_POINT_FADE_THRESHOLD_SIZE_ARB, 100f);
    /*        GL14.glPointParameter(GL14.GL_POINT_DISTANCE_ATTENUATION, particleDistanceScalarBuffer);
            GL14.glPointParameterf( GL14.GL_POINT_SIZE_MIN, 1f);//(float)particle.getSize());//1f );
            GL14.glPointParameterf( GL14.GL_POINT_SIZE_MAX, maxPointSpriteSize);
            GL14.glPointParameterf(GL14.GL_POINT_FADE_THRESHOLD_SIZE, 100f);
    *///from   w w  w.  j  a v a2 s.  c  om

    GL14.glPointParameterf(GL20.GL_POINT_SPRITE_COORD_ORIGIN, GL20.GL_LOWER_LEFT);
    GL11.glTexEnvf(ARBPointSprite.GL_POINT_SPRITE_ARB, ARBPointSprite.GL_COORD_REPLACE_ARB, GL11.GL_TRUE);
    //        GL11.glTexEnvf(  GL20.GL_POINT_SPRITE, GL20.GL_COORD_REPLACE, GL11.GL_TRUE );

    GL11.glPointSize((float) spriteSize); //POINT_SIZE_WORLD_COORD_SCALAR);
}