summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp7
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp12
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp1
-rw-r--r--drivers/gles3/shaders/particles.glsl12
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp1
-rw-r--r--drivers/unix/os_unix.h2
6 files changed, 14 insertions, 21 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 9cb44349bf..a7996b09d3 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -125,14 +125,13 @@ void RasterizerSceneGLES3::shadow_atlas_set_size(RID p_atlas, int p_size) {
if (p_size == shadow_atlas->size)
return;
+ // erasing atlas
if (shadow_atlas->fbo) {
glDeleteTextures(1, &shadow_atlas->depth);
glDeleteFramebuffers(1, &shadow_atlas->fbo);
shadow_atlas->depth = 0;
shadow_atlas->fbo = 0;
-
- print_line("erasing atlas");
}
for (int i = 0; i < 4; i++) {
//clear subdivisions
@@ -4678,7 +4677,7 @@ void RasterizerSceneGLES3::initialize() {
const int ubo_light_size = 160;
state.ubo_light_size = ubo_light_size;
state.max_ubo_lights = MIN(RenderList::MAX_LIGHTS, max_ubo_size / ubo_light_size);
- print_line("max ubo light: " + itos(state.max_ubo_lights));
+ print_line("GLES3: max ubo light: " + itos(state.max_ubo_lights));
state.spot_array_tmp = (uint8_t *)memalloc(ubo_light_size * state.max_ubo_lights);
state.omni_array_tmp = (uint8_t *)memalloc(ubo_light_size * state.max_ubo_lights);
@@ -4704,7 +4703,7 @@ void RasterizerSceneGLES3::initialize() {
state.scene_shader.add_custom_define("#define MAX_FORWARD_LIGHTS " + itos(state.max_forward_lights_per_object) + "\n");
state.max_ubo_reflections = MIN(RenderList::MAX_REFLECTIONS, max_ubo_size / sizeof(ReflectionProbeDataUBO));
- print_line("max ubo reflections: " + itos(state.max_ubo_reflections) + " ubo size: " + itos(sizeof(ReflectionProbeDataUBO)));
+ print_line("GLES3: max ubo reflections: " + itos(state.max_ubo_reflections) + ", ubo size: " + itos(sizeof(ReflectionProbeDataUBO)));
state.reflection_array_tmp = (uint8_t *)memalloc(sizeof(ReflectionProbeDataUBO) * state.max_ubo_reflections);
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index beed923a58..73547b5a16 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -825,7 +825,6 @@ Image RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSide p_
if (!texture->images[p_cube_side].empty()) {
return texture->images[p_cube_side];
}
- print_line("GETTING FROM GL ");
#ifdef GLES_OVER_GL
@@ -842,7 +841,7 @@ Image RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSide p_
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
- print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps));
+ //print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps));
for (int i = 0; i < texture->mipmaps; i++) {
@@ -4777,7 +4776,6 @@ RID RasterizerStorageGLES3::gi_probe_dynamic_data_create(int p_width, int p_heig
min_size = 4;
}
- print_line("dyndata create");
while (true) {
if (gipd->compression == GI_PROBE_S3TC) {
@@ -5534,7 +5532,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenTextures(1, &rt->depth);
glBindTexture(GL_TEXTURE_2D, rt->depth);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, rt->width, rt->height, 0,
- GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+ GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -6270,7 +6268,6 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
// delete the texture
GIProbeData *gi_probe_data = gi_probe_data_owner.get(p_rid);
- print_line("dyndata delete");
glDeleteTextures(1, &gi_probe_data->tex_id);
gi_probe_owner.free(p_rid);
memdelete(gi_probe_data);
@@ -6333,9 +6330,8 @@ void RasterizerStorageGLES3::initialize() {
{
int max_extensions = 0;
- print_line("getting extensions");
glGetIntegerv(GL_NUM_EXTENSIONS, &max_extensions);
- print_line("total " + itos(max_extensions));
+ print_line("GLES3: max extensions: " + itos(max_extensions));
for (int i = 0; i < max_extensions; i++) {
const GLubyte *s = glGetStringi(GL_EXTENSIONS, i);
if (!s)
@@ -6500,7 +6496,7 @@ void RasterizerStorageGLES3::initialize() {
frame.count = 0;
frame.prev_tick = 0;
frame.delta = 0;
- frame.current_rt=NULL;
+ frame.current_rt = NULL;
config.keep_original_textures = false;
}
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 6aeb3af2cd..89b056df84 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -410,7 +410,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
if (fnode->name == "vertex") {
- print_line("vertex uses functions: " + itos(pnode->functions[i].uses_function.size()));
_dump_function_deps(pnode, fnode->name, function_code, r_gen_code.vertex_global, added_vtx);
r_gen_code.vertex = function_code["vertex"];
}
diff --git a/drivers/gles3/shaders/particles.glsl b/drivers/gles3/shaders/particles.glsl
index f789be24cf..fa12dd7408 100644
--- a/drivers/gles3/shaders/particles.glsl
+++ b/drivers/gles3/shaders/particles.glsl
@@ -101,7 +101,7 @@ void main() {
restart_phase*= (1.0-explosiveness);
bool restart=false;
- bool active = velocity_active.a > 0.5;
+ bool shader_active = velocity_active.a > 0.5;
if (system_phase > prev_system_phase) {
if (prev_system_phase < restart_phase && system_phase >= restart_phase) {
@@ -134,7 +134,7 @@ void main() {
uint particle_number = current_cycle * uint(total_particles) + uint(gl_VertexID);
if (restart) {
- active=emitting;
+ shader_active=emitting;
}
mat4 xform;
@@ -148,7 +148,7 @@ void main() {
out_velocity_active=vec4(0.0);
out_custom=vec4(0.0);
if (!restart)
- active=false;
+ shader_active=false;
xform = mat4(
vec4(1.0,0.0,0.0,0.0),
@@ -163,7 +163,7 @@ void main() {
xform = transpose(mat4(xform_1,xform_2,xform_3,vec4(vec3(0.0),1.0)));
}
- if (active) {
+ if (shader_active) {
//execute shader
{
@@ -178,7 +178,7 @@ VERTEX_SHADER_CODE
for(int i=0;i<attractor_count;i++) {
vec3 rel_vec = xform[3].xyz - attractors[i].pos;
- float dist = rel_vec.length();
+ float dist = length(rel_vec);
if (attractors[i].radius < dist)
continue;
if (attractors[i].eat_radius>0 && attractors[i].eat_radius > dist) {
@@ -215,7 +215,7 @@ VERTEX_SHADER_CODE
xform = transpose(xform);
- out_velocity_active.a = mix(0.0,1.0,active);
+ out_velocity_active.a = mix(0.0,1.0,shader_active);
out_xform_1 = xform[0];
out_xform_2 = xform[1];
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 9aaf5c129b..45827ee4f7 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -102,7 +102,6 @@ float AudioDriverPulseAudio::get_latency() {
void AudioDriverPulseAudio::thread_func(void *p_udata) {
- print_line("thread");
AudioDriverPulseAudio *ad = (AudioDriverPulseAudio *)p_udata;
while (!ad->exit_thread) {
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 206559ab3d..67eb5cefdf 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -76,7 +76,7 @@ public:
//virtual void set_mouse_show(bool p_show);
//virtual void set_mouse_grab(bool p_grab);
//virtual bool is_mouse_grab_enabled() const = 0;
- //virtual void get_mouse_pos(int &x, int &y) const;
+ //virtual void get_mouse_position(int &x, int &y) const;
//virtual void set_window_title(const String& p_title);
//virtual void set_video_mode(const VideoMode& p_video_mode);