All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jme3.renderer.lwjgl.LwjglRender Maven / Gradle / Ivy

There is a newer version: 3.7.0-stable
Show newest version
package com.jme3.renderer.lwjgl;

import com.jme3.renderer.RendererException;

import java.nio.Buffer;

/**
 * The base class of LWJGL implementations.
 *
 * @author JavaSaBr
 */
public class LwjglRender {

    protected static void checkLimit(final Buffer buffer) {
        if (buffer == null) {
            return;
        }
        if (buffer.limit() == 0) {
            throw new RendererException("Attempting to upload empty buffer (limit = 0), that's an error");
        }
        if (buffer.remaining() == 0) {
            throw new RendererException("Attempting to upload empty buffer (remaining = 0), that's an error");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy