예제 #1
0
	/**
	 *  @alsymbols
	 *  @alcfunref{MakeContextCurrent}
	 *  @alcfunref{DestroyContext}
	 */
	~Context(void)
	{
		if(_context)
		{
			OALPLUS_ALCFUNC(MakeContextCurrent)(nullptr);
			OALPLUS_ALCFUNC(DestroyContext)(_context);
		}
	}
예제 #2
0
	/**
	 *  @alsymbols
	 *  @alcfunref{CloseDevice}
	 */
	~Device(void)
	{
		if(_device)
		{
			OALPLUS_ALCFUNC(CloseDevice)(_device);
		}
	}
예제 #3
0
	/**
	 *  @alsymbols
	 *  @alcfunref{CreateContext}
	 */
	Context(const Device& device)
	 : ContextOps(
		device._device,
		OALPLUS_ALCFUNC(CreateContext)(device._device, nullptr)
	)
	{
		OALPLUS_CHECK_SIMPLE_ALC(_device, CreateContext);
	}
예제 #4
0
	/**
	 *  @alsymbols
	 *  @alcfunref{GetString}
	 *  @alcdefref{DEVICE_SPECIFIER}
	 */
	static DeviceSpecRange Specifiers(void)
	{
		const ALchar* ptr = OALPLUS_ALCFUNC(GetString)(
			nullptr,
			ALC_DEVICE_SPECIFIER
		);
		return DeviceSpecRange(ptr);
	}
예제 #5
0
	/**
	 *  @alsymbols
	 *  @alcfunref{CreateContext}
	 */
	Context(
		const Device& device,
		const FinishedContextAttribs& attribs
	): ContextOps(
		device._device,
		OALPLUS_ALCFUNC(CreateContext)(
			device._device,
			attribs.Get()
		)
	)
	{
		OALPLUS_CHECK_SIMPLE_ALC(_device, CreateContext);
	}
예제 #6
0
	/**
	 *  @alsymbols
	 *  @alcfunref{SuspendContext}
	 */
	void Suspend(void)
	{
		OALPLUS_ALCFUNC(SuspendContext)(_context);
		OALPLUS_VERIFY_SIMPLE_ALC(_device, SuspendContext);
	}
예제 #7
0
	/**
	 *  @alsymbols
	 *  @alcfunref{ProcessContext}
	 */
	void Process(void)
	{
		OALPLUS_ALCFUNC(ProcessContext)(_context);
		OALPLUS_VERIFY_SIMPLE_ALC(_device, ProcessContext);
	}
예제 #8
0
	/**
	 *  @alsymbols
	 *  @alcfunref{MakeContextCurrent}
	 */
	bool MakeCurrent(void)
	{
		bool result = OALPLUS_ALCFUNC(MakeContextCurrent)(_context);
		OALPLUS_VERIFY_SIMPLE_ALC(_device, MakeContextCurrent);
		return result;
	}
예제 #9
0
	/**
	 *  @alsymbols
	 *  @alcfunref{OpenDevice}
	 */
	Device(const ALchar* dev_spec)
	 : DeviceOps(OALPLUS_ALCFUNC(OpenDevice)(dev_spec))
	{
		OALPLUS_CHECK_SIMPLE_ALC(_device,OpenDevice);
	}
예제 #10
0
	/**
	 *  @alsymbols
	 *  @alcfunref{OpenDevice}
	 */
	Device(void)
	 : DeviceOps(OALPLUS_ALCFUNC(OpenDevice)(nullptr))
	{
		OALPLUS_CHECK_SIMPLE_ALC(_device,OpenDevice);
	}