Skip to content

Commit

Permalink
Merge pull request godotengine#16687 from karroffel/gles2-2d-pr
Browse files Browse the repository at this point in the history
add GLES 2 renderer for 2D
  • Loading branch information
akien-mga authored Mar 1, 2018
2 parents 7f3024d + eac4c98 commit 29215b2
Show file tree
Hide file tree
Showing 41 changed files with 12,286 additions and 719 deletions.
12 changes: 7 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ opts = Variables(customs, ARGUMENTS)

# Target build options
opts.Add('arch', "Platform-dependent architecture (arm/arm64/x86/x64/mips/etc)", '')
opts.Add(EnumVariable('bits', "Target platform bits", 'default', ('default', '32', '64')))
opts.Add(EnumVariable('bits', "Target platform bits", 'default', ('default', '32', '64', 'fat')))
opts.Add('p', "Platform (alias for 'platform')", '')
opts.Add('platform', "Target platform (%s)" % ('|'.join(platform_list), ), '')
opts.Add(EnumVariable('target', "Compilation target", 'debug', ('debug', 'release_debug', 'release')))
Expand All @@ -161,11 +161,11 @@ opts.Add(BoolVariable('xml', "XML format support for resources", True))

# Advanced options
opts.Add(BoolVariable('disable_3d', "Disable 3D nodes for smaller executable", False))
opts.Add(BoolVariable('disable_advanced_gui', "Disable advanced 3D gui nodes and behaviors", False))
opts.Add(BoolVariable('disable_advanced_gui', "Disable advance 3D gui nodes and behaviors", False))
opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '')
opts.Add('unix_global_settings_path', "UNIX-specific path to system-wide settings. Currently only used for templates", '')
opts.Add(BoolVariable('verbose', "Enable verbose output for the compilation", False))
opts.Add(BoolVariable('vsproj', "Generate Visual Studio Project", False))
opts.Add(BoolVariable('vsproj', "Generate Visual Studio Project.", False))
opts.Add(EnumVariable('warnings', "Set the level of warnings emitted during compilation", 'no', ('extra', 'all', 'moderate', 'no')))
opts.Add(BoolVariable('progress', "Show a progress indicator during build", True))
opts.Add(BoolVariable('dev', "If yes, alias for verbose=yes warnings=all", False))
Expand Down Expand Up @@ -353,7 +353,6 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['-Wall', '-Wno-unused'])
else: # 'no'
env.Append(CCFLAGS=['-w'])
env.Append(CCFLAGS=['-Werror=return-type'])

#env['platform_libsuffix'] = env['LIBSUFFIX']

Expand Down Expand Up @@ -383,6 +382,8 @@ if selected_platform in platform_list:
suffix += ".32"
elif (env["bits"] == "64"):
suffix += ".64"
elif (env["bits"] == "fat"):
suffix += ".fat"

suffix += env.extra_suffix

Expand Down Expand Up @@ -445,7 +446,8 @@ if selected_platform in platform_list:
methods.no_verbose(sys, env)

if (not env["platform"] == "server"): # FIXME: detect GLES3
env.Append( BUILDERS = { 'GLES3_GLSL' : env.Builder(action = methods.build_gles3_headers, suffix = 'glsl.gen.h',src_suffix = '.glsl') } )
env.Append( BUILDERS = { 'GLES3_GLSL' : env.Builder(action = methods.build_gles3_headers, suffix = 'glsl.gen.h', src_suffix = '.glsl') } )
env.Append( BUILDERS = { 'GLES2_GLSL' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.gen.h', src_suffix = '.glsl') } )

scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
Expand Down
1 change: 1 addition & 0 deletions drivers/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if env['xaudio2']:
# Graphics drivers
if (env["platform"] != "server"):
SConscript('gles3/SCsub')
SConscript('gles2/SCsub')
SConscript('gl_context/SCsub')
else:
SConscript('dummy/SCsub')
Expand Down
7 changes: 7 additions & 0 deletions drivers/gles2/SCsub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python

Import('env')

env.add_source_files(env.drivers_sources,"*.cpp")

SConscript("shaders/SCsub")
Loading

0 comments on commit 29215b2

Please sign in to comment.