Example usage for org.lwjgl.opengl GL11 glLightf

List of usage examples for org.lwjgl.opengl GL11 glLightf

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glLightf.

Prototype

public static native void glLightf(@NativeType("GLenum") int light, @NativeType("GLenum") int pname,
        @NativeType("GLfloat") float param);

Source Link

Document

Float version of #glLighti Lighti .

Usage

From source file:com.ardor3d.scene.state.lwjgl.LwjglLightStateUtil.java

License:Open Source License

private static void setConstant(final int index, final float constant, final LightRecord lr,
        final boolean force) {
    if (force || constant != lr.getConstant()) {
        GL11.glLightf(GL11.GL_LIGHT0 + index, GL11.GL_CONSTANT_ATTENUATION, constant);
        lr.setConstant(constant);/*from  www  .ja v  a2 s.  c o m*/
    }
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglLightStateUtil.java

License:Open Source License

private static void setLinear(final int index, final float linear, final LightRecord lr, final boolean force) {
    if (force || linear != lr.getLinear()) {
        GL11.glLightf(GL11.GL_LIGHT0 + index, GL11.GL_LINEAR_ATTENUATION, linear);
        lr.setLinear(linear);/*from  ww  w . ja  v  a 2  s  .  com*/
    }
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglLightStateUtil.java

License:Open Source License

private static void setQuadratic(final int index, final float quad, final LightRecord lr, final boolean force) {
    if (force || quad != lr.getQuadratic()) {
        GL11.glLightf(GL11.GL_LIGHT0 + index, GL11.GL_QUADRATIC_ATTENUATION, quad);
        lr.setQuadratic(quad);//from   w  w  w  .j  av  a 2s.c  o m
    }
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglLightStateUtil.java

License:Open Source License

private static void setSpotExponent(final int index, final LightStateRecord record, final float exponent,
        final LightRecord lr) {
    if (!record.isValid() || lr.getSpotExponent() != exponent) {
        GL11.glLightf(GL11.GL_LIGHT0 + index, GL11.GL_SPOT_EXPONENT, exponent);
        lr.setSpotExponent(exponent);/*  w w  w  .jav  a 2  s . co m*/
    }
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglLightStateUtil.java

License:Open Source License

private static void setSpotCutoff(final int index, final LightStateRecord record, final float cutoff,
        final LightRecord lr) {
    if (!record.isValid() || lr.getSpotCutoff() != cutoff) {
        GL11.glLightf(GL11.GL_LIGHT0 + index, GL11.GL_SPOT_CUTOFF, cutoff);
        lr.setSpotCutoff(cutoff);// w ww . j  a v a 2 s  .  co  m
    }
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java

License:Apache License

public final void glLightf(int light, int pname, float param) {
    GL11.glLightf(light, pname, param);
}

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public void setLightConstantAttenuation(int light, float constant) {
    GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_CONSTANT_ATTENUATION, constant);
}

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public void setLightLinearAttenuation(int light, float linear) {
    GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_LINEAR_ATTENUATION, linear);
}

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public void setLightQuadraticAttenuation(int light, float quadratic) {
    GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_QUADRATIC_ATTENUATION, quadratic);
}

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public void setLightSpotCutoff(int light, float cutoff) {
    GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_SPOT_CUTOFF, cutoff);
}