Skip to content

Commit

Permalink
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
Browse files Browse the repository at this point in the history
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
  • Loading branch information
Calinou committed Oct 30, 2021
1 parent e3491a3 commit ce97ddb
Show file tree
Hide file tree
Showing 98 changed files with 4,526 additions and 12,614 deletions.
17 changes: 4 additions & 13 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ from collections import OrderedDict
# Local
import methods
import glsl_builders
import gles_builders
import opengl_builders
from platform_methods import run_in_subprocess

# Scan possible build platforms
Expand Down Expand Up @@ -708,20 +708,11 @@ if selected_platform in platform_list:
}
env.Append(BUILDERS=GLSL_BUILDERS)

if not env["platform"] == "server": # FIXME: detect GLES3
if not env["platform"] == "server":
env.Append(
BUILDERS={
"GLES3_GLSL": env.Builder(
action=run_in_subprocess(gles_builders.build_gles3_headers),
suffix="glsl.gen.h",
src_suffix=".glsl",
)
}
)
env.Append(
BUILDERS={
"GLES2_GLSL": env.Builder(
action=run_in_subprocess(gles_builders.build_gles2_headers),
"OpenGL_GLSL": env.Builder(
action=run_in_subprocess(opengl_builders.build_opengl_headers),
suffix="glsl.gen.h",
src_suffix=".glsl",
)
Expand Down
2 changes: 1 addition & 1 deletion core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ void OS::_bind_methods() {
ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode_sleep_usec", 6900);

BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES2);
BIND_ENUM_CONSTANT(VIDEO_DRIVER_VULKAN);
BIND_ENUM_CONSTANT(VIDEO_DRIVER_OPENGL);

BIND_ENUM_CONSTANT(DAY_SUNDAY);
BIND_ENUM_CONSTANT(DAY_MONDAY);
Expand Down
2 changes: 1 addition & 1 deletion core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class OS : public Object {

public:
enum VideoDriver {
VIDEO_DRIVER_GLES2,
VIDEO_DRIVER_VULKAN,
VIDEO_DRIVER_OPENGL,
};

enum Weekday {
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/Environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@
The bleed scale of the HDR glow.
</member>
<member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0">
The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case.
The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case.
</member>
<member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8">
The overall brightness multiplier of the glow effect. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
</member>
<member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0">
The intensity of the 1st level of glow. This is the most "local" level (least blurry).
Expand Down Expand Up @@ -160,7 +160,7 @@
If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code].
</member>
<member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0">
The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
</member>
<member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0">
</member>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/NinePatchRect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
</constant>
<constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode">
Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges.
[b]Note:[/b] Only supported when using the GLES3 renderer. When using the GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
[b]Note:[/b] Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
</constant>
<constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode">
Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than [constant AXIS_STRETCH_MODE_STRETCH]. The texture must be seamless for this to work without displaying artifacts between edges.
[b]Note:[/b] Only supported when using the GLES3 renderer. When using the GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
[b]Note:[/b] Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH].
</constant>
</constants>
</class>
8 changes: 4 additions & 4 deletions doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,12 @@
</member>
</members>
<constants>
<constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web.
</constant>
<constant name="VIDEO_DRIVER_VULKAN" value="1" enum="VideoDriver">
<constant name="VIDEO_DRIVER_VULKAN" value="0" enum="VideoDriver">
The Vulkan rendering backend.
</constant>
<constant name="VIDEO_DRIVER_OPENGL" value="1" enum="VideoDriver">
The OpenGL rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
</constant>
Expand Down
3 changes: 1 addition & 2 deletions drivers/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ SConscript("winmidi/SCsub")
# Graphics drivers
if env["vulkan"]:
SConscript("vulkan/SCsub")
SConscript("gles2/SCsub")
SConscript("gles_common/SCsub")
SConscript("opengl/SCsub")
SConscript("gl_context/SCsub")
else:
SConscript("dummy/SCsub")
Expand Down
Loading

0 comments on commit ce97ddb

Please sign in to comment.