1 2 // 3 // GLBufferObjectTracker Redirects 4 // 5 6 /** 7 * Returns the {@link GLBufferStorage} instance as mapped via OpenGL's native {@link GL2#glMapNamedBufferEXT(int, int) glMapNamedBufferEXT(..)} implementation. 8 * <p> 9 * Throws a {@link GLException} if GL-function constraints are not met. 10 * </p> 11 * <p> 12 * Depends on <code>GL_EXT_direct_state_access</code>. 13 * </p> 14 * <p> 15 * {@link GL2#glMapNamedBufferEXT(int, int)} wrapper calls this method and returns {@link GLBufferStorage#getMappedBuffer()}. 16 * </p> 17 * @param bufferName denotes the buffer 18 * @param access the mapping access mode 19 * @throws GLException if buffer is not tracked 20 * @throws GLException if buffer is already mapped 21 * @throws GLException if buffer has invalid store size, i.e. less-than zero 22 */ mapNamedBufferEXT(int bufferName, int access)23 public GLBufferStorage mapNamedBufferEXT(int bufferName, int access) throws GLException; 24 25 /** 26 * Returns the {@link GLBufferStorage} instance as mapped via OpenGL's native {@link GL2#glMapNamedBufferRangeEXT(int, long, long, int) glMapNamedBufferRangeEXT(..)} implementation. 27 * <p> 28 * Throws a {@link GLException} if GL-function constraints are not met. 29 * </p> 30 * <p> 31 * Depends on <code>GL_EXT_direct_state_access</code>. 32 * </p> 33 * <p> 34 * {@link GL2#glMapNamedBufferRangeEXT(int, long, long, int)} wrapper calls this method and returns {@link GLBufferStorage#getMappedBuffer()}. 35 * </p> 36 * @param bufferName denotes the buffer 37 * @param offset offset of the mapped buffer's storage 38 * @param length length of the mapped buffer's storage 39 * @param access the mapping access mode 40 * @throws GLException if buffer is not tracked 41 * @throws GLException if buffer is already mapped 42 * @throws GLException if buffer has invalid store size, i.e. less-than zero 43 * @throws GLException if buffer mapping range does not fit, incl. offset 44 */ mapNamedBufferRangeEXT(final int bufferName, final long offset, final long length, final int access)45 public GLBufferStorage mapNamedBufferRangeEXT(final int bufferName, final long offset, final long length, final int access) throws GLException; 46 47