Java 类org.lwjgl.opengl.InputImplementation 实例源码

项目:PhET    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:PhET    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:Wolf_game    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:Wolf_game    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:GPVM    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:GPVM    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:GPVM    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:GPVM    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:SpaceStationAlpha    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:SpaceStationAlpha    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:TeacherSmash    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:TeacherSmash    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:3d-Demo    文件:Mouse.java   
/**
 * "Create" the mouse with the given custom implementation. This is used
 * reflectively by AWTInputAdapter.
 *
 * @throws LWJGLException if the mouse could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createMouse();
    hasWheel = implementation.hasWheel();
    created = true;

    // set mouse buttons
    buttonCount = implementation.getButtonCount();
    buttons = BufferUtils.createByteBuffer(buttonCount);
    coord_buffer = BufferUtils.createIntBuffer(3);
    if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0)
        setNativeCursor(currentCursor);
    readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE);
    readBuffer.limit(0);
    setGrabbed(isGrabbed);
}
项目:3d-Demo    文件:OpenGLPackageAccess.java   
static InputImplementation createImplementation() {
    /* Use reflection since we can't make Display.getImplementation
     * public
     */
    try {
        return AccessController.doPrivileged(new PrivilegedExceptionAction<InputImplementation>() {
            public InputImplementation run() throws Exception {
                Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation");
                getImplementation_method.setAccessible(true);
                return (InputImplementation)getImplementation_method.invoke(null);
            }
        });
    } catch (PrivilegedActionException e) {
        throw new Error(e);
    }
}
项目:PhET    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:Wolf_game    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:GPVM    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:GPVM    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:SpaceStationAlpha    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:TeacherSmash    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:3d-Demo    文件:Keyboard.java   
/**
 * "Create" the keyboard with the given implementation. This is used
 * reflectively from AWTInputAdapter.
 *
 * @throws LWJGLException if the keyboard could not be created for any reason
 */
private static void create(InputImplementation impl) throws LWJGLException {
    if (created)
        return;
    if (!initialized)
        initialize();
    implementation = impl;
    implementation.createKeyboard();
    created = true;
    readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE);
    reset();
}
项目:PhET    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:Wolf_game    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:GPVM    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:GPVM    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:SpaceStationAlpha    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:TeacherSmash    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}
项目:3d-Demo    文件:Mouse.java   
static InputImplementation getImplementation() {
    return implementation;
}