/** * Makes the context current in the current thread and associates with the device/drawable given * by the {@code targetDraw} handle for draw operations and the device/drawable given by the * {@code targetRead} handle for read operations. This functionality is optional as it may not be * supported by the OpenGL implementation. The user must check the availability of the * corresponding OpenGL extension before calling this method. * * <p>The {@code targetDraw} and {@code targetRead} handles are OS-specific. * * @param targetDraw the device/drawable to associate the context with for draw operations * @param targetRead the device/drawable to associate the context with for read operations * @throws OpenGLException if separate associations are not supported */ public void makeCurrent(long targetDraw, long targetRead) { makeCurrentImpl(targetDraw, targetRead); GL.setCurrent(this); }
/** * Makes the context current in the current thread and associates with the device/drawable given * by the {@code target} handle for both draw and read operations. * * <p>The {@code target} handle is OS-specific. * * @param target the device/drawable to associate the context with * @see GL#setCurrent(GLContext) */ public void makeCurrent(long target) { makeCurrentImpl(target); GL.setCurrent(this); }