net.betabears.the2dlibrary.graphics.shader.Uniform1i.java Source code

Java tutorial

Introduction

Here is the source code for net.betabears.the2dlibrary.graphics.shader.Uniform1i.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.betabears.the2dlibrary.graphics.shader;

import org.lwjgl.opengl.GL20;

public class Uniform1i implements Uniform {

    private int f0;

    private Uniform1i() {
    }

    public Uniform1i(int f0) {
        this.f0 = f0;
    }

    public int getF0() {
        return f0;
    }

    public void setF0(int f0) {
        this.f0 = f0;
    }

    @Override
    public void apply(int location) {
        GL20.glUniform1i(location, f0);
    }

    @Override
    public Class getType() {
        return Integer.class;
    }

    @Override
    public int getElementCount() {
        return 1;
    }
}