예제 #1
0
 /**
  *  @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));
 }
예제 #2
0
	BufferName BufferBinding(GLuint index) const
	{
		return BufferName(GetIntParam(
			GL_TRANSFORM_FEEDBACK_BUFFER_BINDING,
			index
		));
	}
예제 #3
0
	/**
	 *  @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))
		);
	}
예제 #4
0
	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);
	}
예제 #5
0
 /**
  *  @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));
 }