diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 7 | ||||
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 4 | ||||
-rw-r--r-- | drivers/wasapi/audio_driver_wasapi.cpp | 26 |
3 files changed, 36 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 9def9d27e7..c02eeaa0ee 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1028,6 +1028,11 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra for (int i = 0; i < 6; i++) { glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], sky->radiance, lod); + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) { + break; //may be too small + } + glViewport(0, 0, size, size); bind_quad_array(); @@ -2209,6 +2214,8 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id); glBufferData(GL_ELEMENT_ARRAY_BUFFER, index_array_size, ir.ptr(), GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } else { + surface->index_id = 0; } // TODO generate wireframes diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 6f86152598..faf88cf33d 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -904,6 +904,8 @@ uniform float ambient_energy; #ifdef USE_LIGHTING +uniform highp vec4 shadow_color; + #ifdef USE_VERTEX_LIGHTING //get from vertex @@ -916,7 +918,7 @@ uniform highp vec3 light_direction; //may be used by fog, so leave here //done in fragment // general for all lights uniform highp vec4 light_color; -uniform highp vec4 shadow_color; + uniform highp float light_specular; // directional diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 685e821389..c97849ef07 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -238,6 +238,32 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c hr = p_device->audio_client->GetMixFormat(&pwfex); ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + print_verbose("WASAPI: wFormatTag = " + itos(pwfex->wFormatTag)); + print_verbose("WASAPI: nChannels = " + itos(pwfex->nChannels)); + print_verbose("WASAPI: nSamplesPerSec = " + itos(pwfex->nSamplesPerSec)); + print_verbose("WASAPI: nAvgBytesPerSec = " + itos(pwfex->nAvgBytesPerSec)); + print_verbose("WASAPI: nBlockAlign = " + itos(pwfex->nBlockAlign)); + print_verbose("WASAPI: wBitsPerSample = " + itos(pwfex->wBitsPerSample)); + print_verbose("WASAPI: cbSize = " + itos(pwfex->cbSize)); + + WAVEFORMATEX *closest = NULL; + hr = p_device->audio_client->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, pwfex, &closest); + if (hr == S_FALSE) { + WARN_PRINT("WASAPI: Mix format is not supported by the Device"); + if (closest) { + print_verbose("WASAPI: closest->wFormatTag = " + itos(closest->wFormatTag)); + print_verbose("WASAPI: closest->nChannels = " + itos(closest->nChannels)); + print_verbose("WASAPI: closest->nSamplesPerSec = " + itos(closest->nSamplesPerSec)); + print_verbose("WASAPI: closest->nAvgBytesPerSec = " + itos(closest->nAvgBytesPerSec)); + print_verbose("WASAPI: closest->nBlockAlign = " + itos(closest->nBlockAlign)); + print_verbose("WASAPI: closest->wBitsPerSample = " + itos(closest->wBitsPerSample)); + print_verbose("WASAPI: closest->cbSize = " + itos(closest->cbSize)); + + WARN_PRINT("WASAPI: Using closest match instead"); + pwfex = closest; + } + } + // Since we're using WASAPI Shared Mode we can't control any of these, we just tag along p_device->channels = pwfex->nChannels; p_device->format_tag = pwfex->wFormatTag; |