Exemple #1
0
	/**
	 *  @see Data
	 *  @see CopySubData
	 *  @throws Error
	 */
	void SubData(
		BufferSize offset,
		const BufferData& data
	) const
	{
		OGLPLUS_GLFUNC(NamedBufferSubData)(
			_name,
			GLintptr(offset.Get()),
			GLsizei(data.Size()),
			data.Data()
		);
		OGLPLUS_CHECK(
			NamedBufferSubData,
			ObjectError,
			Object(*this)
		);
	}
Exemple #2
0
	void Storage(
		const BufferData& data,
		Bitfield<BufferStorageBit> flags
	) const
	{
		OGLPLUS_GLFUNC(NamedBufferStorage)(
			_name,
			GLsizeiptr(data.Size()),
			data.Data(),
			GLbitfield(flags)
		);
		OGLPLUS_CHECK(
			NamedBufferStorage,
			ObjectError,
			Object(*this)
		);
	}
Exemple #3
0
	/** This member function uploads the specified @data to this buffer
	 *  using the @p usage as hint.
	 *
	 *  @see SubData
	 *  @see CopySubData
	 *  @throws Error
	 */
	void Data(
		const BufferData& data,
		BufferUsage usage = BufferUsage::StaticDraw
	) const
	{
		OGLPLUS_GLFUNC(NamedBufferData)(
			_name,
			GLsizei(data.Size()),
			data.Data(),
			GLenum(usage)
		);
		OGLPLUS_CHECK(
			NamedBufferData,
			ObjectError,
			Object(*this).
			EnumParam(usage)
		);
	}