/** * @see CreateBufferHelloWorld * * @alsymbols * @alutfunref{CreateBufferFromFile} */ Buffer CreateBufferFromFile(const StrCRef& file_path) const { assert(_initialized); ALuint name = OALPLUS_ALUTFUNC(CreateBufferFromFile)( file_path.is_nts() ? file_path.c_str() : file_path.str().c_str()); OALPLUS_VERIFY_SIMPLE_ALUT(CreateBufferFromFile); return Buffer::FromRawName(BufferName(name)); }
BufferName BufferBinding(GLuint index) const { return BufferName(GetIntParam( GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, index )); }
/** * @glsymbols * @glfunref{FlushMappedNamedBufferRange} * * @pre Mapped() * * @throws Error */ void FlushRange(BufferSize offset, BufferSize length) { OGLPLUS_GLFUNC(FlushMappedNamedBufferRange)( _name, GLintptr(offset.Get()), GLsizeiptr(length.Get()) ); OGLPLUS_CHECK( FlushMappedNamedBufferRange, ObjectError, Object(BufferName(_name)) ); }
static GLsizeiptr _get_size(GLuint buf_name) { GLint value = 0; OGLPLUS_GLFUNC(GetNamedBufferParameterivEXT)( buf_name, GL_BUFFER_SIZE, &value ); OGLPLUS_CHECK( GetNamedBufferParameterivEXT, ObjectError, Object(BufferName(buf_name)) ); return GLsizeiptr(value); }
/** * @see CreateBufferFromFile * * @alsymbols * @alutfunref{CreateBufferHelloWorld} */ Buffer CreateBufferHelloWorld() const { assert(_initialized); ALuint name = OALPLUS_ALUTFUNC(CreateBufferHelloWorld)(); OALPLUS_VERIFY_SIMPLE_ALUT(CreateBufferHelloWorld); return Buffer::FromRawName(BufferName(name)); }