Search in sources :

Example 1 with APIBuffer

use of com.jme3.lwjgl3.utils.APIBuffer in project jmonkeyengine by jMonkeyEngine.

the class InfoQueryInt method getLong.

/**
     * Returns the long value for the specified {@code param_name}.
     * <p/>
     * For integer parameters that may be 32 or 64 bits (e.g. {@code size_t}),
     * {@link #getPointer} should be used instead.
     *
     * @param object the object to query
     * @param arg an integer argument
     * @param param_name the parameter to query
     *
     * @return the parameter's long value
     */
long getLong(long object, int arg, int param_name) {
    APIBuffer __buffer = apiBuffer();
    int errcode = get(object, arg, param_name, 8L, __buffer.address(), NULL);
    if (DEBUG) {
        checkCLError(errcode);
    }
    return __buffer.longValue(0);
}
Also used : APIBuffer(com.jme3.lwjgl3.utils.APIBuffer)

Example 2 with APIBuffer

use of com.jme3.lwjgl3.utils.APIBuffer in project jmonkeyengine by jMonkeyEngine.

the class InfoQueryObject method getPointer.

/**
     * Returns the pointer value for the specified {@code param_name}.
     * <p/>
     * This method should also be used for integer parameters that may be 32 or
     * 64 bits (e.g. {@code size_t}).
     *
     * @param object the object to query
     * @param arg an object argument
     * @param param_name the parameter to query
     *
     * @return the parameter's pointer value
     */
long getPointer(long object, long arg, int param_name) {
    APIBuffer __buffer = apiBuffer();
    int errcode = get(object, arg, param_name, POINTER_SIZE, __buffer.address(), NULL);
    if (DEBUG) {
        checkCLError(errcode);
    }
    return __buffer.pointerValue(0);
}
Also used : APIBuffer(com.jme3.lwjgl3.utils.APIBuffer)

Example 3 with APIBuffer

use of com.jme3.lwjgl3.utils.APIBuffer in project jmonkeyengine by jMonkeyEngine.

the class InfoQueryObject method getInt.

/**
     * Returns the integer value for the specified {@code param_name}.
     * <p/>
     * For integer parameters that may be 32 or 64 bits (e.g. {@code size_t}),
     * {@link #getPointer} should be used instead.
     *
     * @param object the object to query
     * @param arg an object argument
     * @param param_name the parameter to query
     *
     * @return the parameter's int value
     */
int getInt(long object, long arg, int param_name) {
    APIBuffer __buffer = apiBuffer();
    int errcode = get(object, arg, param_name, 4L, __buffer.address(), NULL);
    if (DEBUG) {
        checkCLError(errcode);
    }
    return __buffer.intValue(0);
}
Also used : APIBuffer(com.jme3.lwjgl3.utils.APIBuffer)

Example 4 with APIBuffer

use of com.jme3.lwjgl3.utils.APIBuffer in project jmonkeyengine by jMonkeyEngine.

the class InfoQueryObject method getPointers.

/**
     * Writes the pointer list for the specified {@code param_name} into
     * {@code target}.
     * <p/>
     * This method should also be used for integer parameters that may be 32 or
     * 64 bits (e.g. {@code size_t}).
     *
     * @param object the object to query
     * @param arg an object argument
     * @param param_name the parameter to query
     * @param target the buffer in which to put the returned pointer list
     *
     * @return how many pointers were actually returned
     */
int getPointers(long object, long arg, int param_name, PointerBuffer target) {
    APIBuffer __buffer = apiBuffer();
    int errcode = get(object, arg, param_name, target.remaining() * POINTER_SIZE, memAddress(target), __buffer.address());
    if (DEBUG) {
        checkCLError(errcode);
    }
    return (int) (__buffer.pointerValue(0) >> POINTER_SHIFT);
}
Also used : APIBuffer(com.jme3.lwjgl3.utils.APIBuffer)

Example 5 with APIBuffer

use of com.jme3.lwjgl3.utils.APIBuffer in project jmonkeyengine by jMonkeyEngine.

the class InfoQuery method getPointer.

/**
     * Returns the pointer value for the specified {@code param_name}.
     * <p/>
     * This method should also be used for integer parameters that may be 32 or
     * 64 bits (e.g. {@code size_t}).
     *
     * @param object the object to query
     * @param param_name the parameter to query
     *
     * @return the parameter's pointer value
     */
long getPointer(long object, int param_name) {
    APIBuffer __buffer = apiBuffer();
    int errcode = get(object, param_name, POINTER_SIZE, __buffer.address(), NULL);
    if (DEBUG) {
        checkCLError(errcode);
    }
    return __buffer.pointerValue(0);
}
Also used : APIBuffer(com.jme3.lwjgl3.utils.APIBuffer)

Aggregations

APIBuffer (com.jme3.lwjgl3.utils.APIBuffer)18