Search in sources :

Example 1 with TIntIntIterator

use of gnu.trove.iterator.TIntIntIterator in project Terasology by MovingBlocks.

the class GLSLMaterial method setMatrix3.

@Override
public void setMatrix3(String desc, FloatBuffer value, boolean currentOnly) {
    if (isDisposed()) {
        return;
    }
    if (currentOnly) {
        enable();
        int id = getUniformLocation(getActiveShaderProgramId(), desc);
        GL20.glUniformMatrix3(id, false, value);
    } else {
        TIntIntIterator it = disposalAction.shaderPrograms.iterator();
        while (it.hasNext()) {
            it.advance();
            GL20.glUseProgram(it.value());
            int id = getUniformLocation(it.value(), desc);
            GL20.glUniformMatrix3(id, false, value);
        }
        restoreStateAfterUniformsSet();
    }
}
Also used : TIntIntIterator(gnu.trove.iterator.TIntIntIterator)

Example 2 with TIntIntIterator

use of gnu.trove.iterator.TIntIntIterator in project Terasology by MovingBlocks.

the class GLSLMaterial method setFloat2.

@Override
public void setFloat2(String desc, FloatBuffer buffer, boolean currentOnly) {
    if (isDisposed()) {
        return;
    }
    if (currentOnly) {
        enable();
        int id = getUniformLocation(getActiveShaderProgramId(), desc);
        GL20.glUniform2(id, buffer);
    } else {
        TIntIntIterator it = disposalAction.shaderPrograms.iterator();
        while (it.hasNext()) {
            it.advance();
            GL20.glUseProgram(it.value());
            int id = getUniformLocation(it.value(), desc);
            GL20.glUniform2(id, buffer);
        }
        restoreStateAfterUniformsSet();
    }
}
Also used : TIntIntIterator(gnu.trove.iterator.TIntIntIterator)

Example 3 with TIntIntIterator

use of gnu.trove.iterator.TIntIntIterator in project Terasology by MovingBlocks.

the class GLSLMaterial method setFloat1.

@Override
public void setFloat1(String desc, FloatBuffer buffer, boolean currentOnly) {
    if (isDisposed()) {
        return;
    }
    if (currentOnly) {
        enable();
        int id = getUniformLocation(getActiveShaderProgramId(), desc);
        GL20.glUniform1(id, buffer);
    } else {
        TIntIntIterator it = disposalAction.shaderPrograms.iterator();
        while (it.hasNext()) {
            it.advance();
            GL20.glUseProgram(it.value());
            int id = getUniformLocation(it.value(), desc);
            GL20.glUniform1(id, buffer);
        }
        restoreStateAfterUniformsSet();
    }
}
Also used : TIntIntIterator(gnu.trove.iterator.TIntIntIterator)

Example 4 with TIntIntIterator

use of gnu.trove.iterator.TIntIntIterator in project Terasology by MovingBlocks.

the class GLSLMaterial method setFloat3.

@Override
public void setFloat3(String desc, float f1, float f2, float f3, boolean currentOnly) {
    if (isDisposed()) {
        return;
    }
    if (currentOnly) {
        enable();
        int id = getUniformLocation(getActiveShaderProgramId(), desc);
        GL20.glUniform3f(id, f1, f2, f3);
    } else {
        TIntIntIterator it = disposalAction.shaderPrograms.iterator();
        while (it.hasNext()) {
            it.advance();
            GL20.glUseProgram(it.value());
            int id = getUniformLocation(it.value(), desc);
            GL20.glUniform3f(id, f1, f2, f3);
        }
        restoreStateAfterUniformsSet();
    }
}
Also used : TIntIntIterator(gnu.trove.iterator.TIntIntIterator)

Example 5 with TIntIntIterator

use of gnu.trove.iterator.TIntIntIterator in project Terasology by MovingBlocks.

the class GLSLMaterial method setBoolean.

@Override
public void setBoolean(String desc, boolean value, boolean currentOnly) {
    if (isDisposed()) {
        return;
    }
    if (currentOnly) {
        enable();
        int id = getUniformLocation(getActiveShaderProgramId(), desc);
        GL20.glUniform1i(id, value ? 1 : 0);
    } else {
        TIntIntIterator it = disposalAction.shaderPrograms.iterator();
        while (it.hasNext()) {
            it.advance();
            GL20.glUseProgram(it.value());
            int id = getUniformLocation(it.value(), desc);
            GL20.glUniform1i(id, value ? 1 : 0);
        }
        restoreStateAfterUniformsSet();
    }
}
Also used : TIntIntIterator(gnu.trove.iterator.TIntIntIterator)

Aggregations

TIntIntIterator (gnu.trove.iterator.TIntIntIterator)22 TIntIntMap (gnu.trove.map.TIntIntMap)3 TIntIntHashMap (gnu.trove.map.hash.TIntIntHashMap)2 LocalDate (org.joda.time.LocalDate)2 Test (org.junit.Test)2 TaskStatistics (org.opentripplanner.analyst.cluster.TaskStatistics)2 QualifiedModeSet (org.opentripplanner.api.parameter.QualifiedModeSet)2 FakeGraph (org.opentripplanner.graph_builder.module.FakeGraph)2 ProfileRequest (org.opentripplanner.profile.ProfileRequest)2 RaptorWorkerData (org.opentripplanner.profile.RaptorWorkerData)2 RepeatedRaptorProfileRouter (org.opentripplanner.profile.RepeatedRaptorProfileRouter)2 TraverseModeSet (org.opentripplanner.routing.core.TraverseModeSet)2 Graph (org.opentripplanner.routing.graph.Graph)2 DefaultStreetVertexIndexFactory (org.opentripplanner.routing.impl.DefaultStreetVertexIndexFactory)2 CUtils (cc.redberry.pipe.CUtils)1 OutputPort (cc.redberry.pipe.OutputPort)1 Range (com.milaboratory.core.Range)1 com.milaboratory.core.alignment (com.milaboratory.core.alignment)1 MutationsBuilder (com.milaboratory.core.mutations.MutationsBuilder)1 com.milaboratory.core.sequence (com.milaboratory.core.sequence)1