mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 20:27:28 +01:00
feat(loading): optional background loading: sound files decoded by worker threads (sound.asyncload), data of dds textures read by worker threads (gfx.textures.streaming), gl textures of vehicles farther than a multiple of the draw range released (gfx.textures.releasedistance); all off by default
This commit is contained in:
@@ -305,6 +305,13 @@ openal_renderer::buffer( audio::buffer_handle const Buffer ) const {
|
||||
return m_buffers.buffer( Buffer );
|
||||
}
|
||||
|
||||
// makes buffers of all sound files still decoded in the background, waiting for them
|
||||
void
|
||||
openal_renderer::complete_buffers() {
|
||||
|
||||
m_buffers.update( true );
|
||||
}
|
||||
|
||||
// initializes the service
|
||||
bool
|
||||
openal_renderer::init() {
|
||||
@@ -350,6 +357,9 @@ openal_renderer::erase( sound_source const *Controller ) {
|
||||
void
|
||||
openal_renderer::update( double const Deltatime ) {
|
||||
|
||||
// buffers of sound files decoded in the background since the last update
|
||||
m_buffers.update();
|
||||
|
||||
ALenum err = alGetError();
|
||||
if (err != AL_NO_ERROR)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user