diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | drivers/gl_context/glad/glad.h | 14 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_gles3.cpp | 4 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 5 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 35 | ||||
-rw-r--r-- | platform/osx/platform_config.h | 5 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 8 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 60 | ||||
-rw-r--r-- | scene/gui/color_picker.h | 5 | ||||
-rw-r--r-- | scene/resources/default_theme/color_picker_hue.png | bin | 132 -> 146 bytes | |||
-rw-r--r-- | scene/resources/default_theme/color_picker_main.png | bin | 310 -> 0 bytes | |||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | scene/resources/default_theme/make_header.py | 0 | ||||
-rw-r--r-- | scene/resources/default_theme/theme_data.h | 43 | ||||
-rw-r--r-- | scene/resources/default_theme/uv_editor.gsl | 19 | ||||
-rw-r--r-- | scene/resources/default_theme/w_editor.gsl | 11 | ||||
-rw-r--r-- | servers/visual/shader_language.h | 5 |
17 files changed, 93 insertions, 129 deletions
diff --git a/.travis.yml b/.travis.yml index f95df46a2b..12b49f4c07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ os: env: #- GODOT_TARGET=iphone - #- GODOT_TARGET=osx + - GODOT_TARGET=osx - GODOT_TARGET=x11 #- GODOT_TARGET=android - GODOT_TARGET=windows diff --git a/drivers/gl_context/glad/glad.h b/drivers/gl_context/glad/glad.h index 7bb465f0ec..3653abe71a 100644 --- a/drivers/gl_context/glad/glad.h +++ b/drivers/gl_context/glad/glad.h @@ -150,12 +150,26 @@ typedef unsigned int GLhandleARB; typedef unsigned short GLhalfARB; typedef unsigned short GLhalf; typedef GLint GLfixed; +// Temporary work around for upstream issue: https://github.com/Dav1dde/glad/issues/70 +// Originally fixed by Algorithmus, reapplied in master +#if defined(__APPLE__) +typedef long GLintptr; +typedef long GLsizeiptr; +#else typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; +#endif typedef int64_t GLint64; typedef uint64_t GLuint64; +// Temporary work around for upstream issue: https://github.com/Dav1dde/glad/issues/70 +// Originally fixed by Algorithmus, reapplied in master +#if defined(__APPLE__) +typedef long GLintptrARB; +typedef long GLsizeiptrARB; +#else typedef ptrdiff_t GLintptrARB; typedef ptrdiff_t GLsizeiptrARB; +#endif typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; typedef struct __GLsync *GLsync; diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index 7d5f488edc..efad6c7e55 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -136,9 +136,13 @@ void RasterizerGLES3::initialize() { ERR_PRINT("Error initializing GLAD"); } +#ifdef __APPLE__ + // FIXME glDebugMessageCallbackARB does not seem to work on Mac OS X and opengl 3, this may be an issue with our opengl canvas.. +#else glEnable(_EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB); glDebugMessageCallbackARB(_gl_debug_print, NULL); glEnable(_EXT_DEBUG_OUTPUT); +#endif #endif diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 8c4eb28ff0..a547e318c8 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -35,7 +35,7 @@ #include "drivers/unix/os_unix.h" #include "main/input_default.h" #include "servers/visual_server.h" -#include "servers/visual/visual_server_wrap_mt.h" +// #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual/rasterizer.h" #include "servers/physics_server.h" #include "servers/audio/audio_server_sw.h" @@ -58,7 +58,8 @@ class OS_OSX : public OS_Unix { public: bool force_quit; - Rasterizer *rasterizer; +// rasterizer seems to no longer be given to visual server, its using GLES3 directly? +// Rasterizer *rasterizer; VisualServer *visual_server; List<String> args; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index d5b870bc7d..f27eb98764 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -38,13 +38,14 @@ #include "servers/visual/visual_server_raster.h" //#include "drivers/opengl/rasterizer_gl.h" //#include "drivers/gles2/rasterizer_gles2.h" +#include "drivers/gles3/rasterizer_gles3.h" #include "os_osx.h" #include <stdio.h> #include <stdlib.h> #include "print_string.h" #include "servers/physics/physics_server_sw.h" -#include "drivers/gles2/rasterizer_instance_gles2.h" -#include "servers/visual/visual_server_wrap_mt.h" +// #include "drivers/gles2/rasterizer_instance_gles2.h" +// #include "servers/visual/visual_server_wrap_mt.h" #include "main/main.h" #include "os/keyboard.h" #include "dir_access_osx.h" @@ -986,13 +987,11 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi window_size.width = p_desired.width; window_size.height = p_desired.height; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale>1) { [window_view setWantsBestResolutionOpenGLSurface:YES]; //if (current_videomode.resizable) [window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; } -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ // [window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]]; [window_object setContentView:window_view]; @@ -1000,10 +999,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi [window_object setAcceptsMouseMovedEvents:YES]; [window_object center]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) [window_object setRestorable:NO]; -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ unsigned int attributeCount = 0; @@ -1022,10 +1019,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi ADD_ATTR(NSOpenGLPFADoubleBuffer); ADD_ATTR(NSOpenGLPFAClosestPolicy); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if (false/* use gl3*/) - ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ +// we now need OpenGL 3 or better, maybe even change this to 3_3Core ? + ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); ADD_ATTR2(NSOpenGLPFAColorSize, colorBits); @@ -1084,15 +1079,19 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi AudioDriverManagerSW::add_driver(&audio_driver_osx); + // only opengl support here... + RasterizerGLES3::register_config(); + RasterizerGLES3::make_current(); - rasterizer = instance_RasterizerGLES2(); - - visual_server = memnew( VisualServerRaster(rasterizer) ); - - if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { +// rasterizer = instance_RasterizerGLES2(); +// visual_server = memnew( VisualServerRaster(rasterizer) ); - visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); - } + visual_server = memnew( VisualServerRaster ); + // FIXME: Reimplement threaded rendering? Or remove? +// if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { +// +// visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); +// } visual_server->init(); visual_server->cursor_set_visible(false, 0); @@ -1176,7 +1175,7 @@ void OS_OSX::finalize() { visual_server->finish(); memdelete(visual_server); - memdelete(rasterizer); +// memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index e3c1ee031c..e661b3da73 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -28,6 +28,7 @@ /*************************************************************************/ #include <alloca.h> -#define GLES2_INCLUDE_H "GL/glew.h" -#define GLES3_INCLUDE_H "GL/glew.h" +//#define GLES2_INCLUDE_H "GL/glew.h" +//#define GLES3_INCLUDE_H "GL/glew.h" +#define GLES3_INCLUDE_H "gl_context/glad/glad.h" #define PTHREAD_RENAME_SELF diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 11e5fd1387..84db94db23 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1087,13 +1087,15 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ RasterizerGLES3::make_current(); #else - #ifdef DX9_ENABLED + // FIXME: Does DX support still work now that rasterizer is no longer used? +#ifdef DX9_ENABLED rasterizer = memnew( RasterizerDX9(hWnd) ); - #endif +#endif #endif visual_server = memnew( VisualServerRaster ); - //if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { + // FIXME: Reimplement threaded rendering? Or remove? +// if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { // // visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); // } diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 8000b5b110..bd0ee2d420 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -40,9 +40,7 @@ void ColorPicker::_notification(int p_what) { switch(p_what) { case NOTIFICATION_THEME_CHANGED: { - uv_edit->set_texture(get_icon("color_main")); - w_edit->set_texture(get_icon("color_hue")); - sample->set_texture(get_icon("color_sample")); + //sample->set_texture(get_icon("color_sample")); _update_controls(); } break; @@ -50,8 +48,6 @@ void ColorPicker::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { btn_pick->set_icon(get_icon("screen_picker", "ColorPicker")); - uv_edit->get_child(0)->cast_to<Control>()->update(); - w_edit->get_child(0)->cast_to<Control>()->update(); _update_color(); } @@ -273,14 +269,39 @@ void ColorPicker::_hsv_draw(int p_wich,Control* c) if (!c) return; if (p_wich==0) { + Vector<Point2> points; + points.push_back(Vector2()); + points.push_back(Vector2(c->get_size().x,0)); + points.push_back(c->get_size()); + points.push_back(Vector2(0,c->get_size().y)); + Vector<Color> colors; + colors.push_back(Color(1,1,1)); + colors.push_back(Color(1,1,1)); + colors.push_back(Color()); + colors.push_back(Color()); + c->draw_polygon(points,colors); + Vector<Color> colors2; + Color col = color; + col.set_hsv(color.get_h(),1,1); + col.a = 0; + colors2.push_back(col); + col.a = 1; + colors2.push_back(col); + col.set_hsv(color.get_h(),1,0); + colors2.push_back(col); + col.a = 0; + colors2.push_back(col); + c->draw_polygon(points,colors); int x = CLAMP(c->get_size().x * s, 0, c->get_size().x); int y = CLAMP(c->get_size().y-c->get_size().y * v, 0, c->get_size().y); - Color col = color; + col = color; col.a=1; c->draw_line(Point2(x,0),Point2(x,c->get_size().y),col.inverted()); c->draw_line(Point2(0, y),Point2(c->get_size().x, y),col.inverted()); c->draw_line(Point2(x,y),Point2(x,y),Color(1,1,1),2); } else if (p_wich==1) { + Ref<Texture> hue = get_icon("color_hue","ColorPicker"); + c->draw_texture_rect(hue,Rect2(Point2(),c->get_size())); int y=c->get_size().y-c->get_size().y*h; Color col=Color(); col.set_hsv(h,1,1); @@ -476,35 +497,30 @@ ColorPicker::ColorPicker() : HBoxContainer *hb_edit = memnew( HBoxContainer ); - uv_edit= memnew ( TextureFrame ); + uv_edit= memnew ( Control ); uv_edit->set_ignore_mouse(false); uv_edit->connect("input_event", this, "_uv_input"); - Control *c= memnew( Control ); - uv_edit->add_child(c); - c->set_area_as_parent_rect(); - c->set_stop_mouse(false); + uv_edit->set_stop_mouse(false); + uv_edit->set_custom_minimum_size(Size2 (256,256)); Vector<Variant> args=Vector<Variant>(); args.push_back(0); - args.push_back(c); - c->connect("draw",this,"_hsv_draw",args); + args.push_back(uv_edit); + uv_edit->connect("draw",this,"_hsv_draw",args); add_child(hb_edit); - w_edit= memnew( TextureFrame ); - - w_edit->set_ignore_mouse(false); + w_edit= memnew( Control ); + w_edit->set_ignore_mouse(false); + w_edit->set_custom_minimum_size(Size2(30,256)); w_edit->connect("input_event", this, "_w_input"); - c= memnew( Control ); - w_edit->add_child(c); - c->set_area_as_parent_rect(); - c->set_stop_mouse(false); args.clear(); args.push_back(1); - args.push_back(c); - c->connect("draw",this,"_hsv_draw",args); + args.push_back(w_edit); + w_edit->connect("draw",this,"_hsv_draw",args); + hb_edit->add_child(uv_edit); hb_edit->add_child(memnew( VSeparator )); diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h index 557635ec4a..c6a8ef7725 100644 --- a/scene/gui/color_picker.h +++ b/scene/gui/color_picker.h @@ -39,7 +39,6 @@ #include "scene/gui/texture_frame.h" #include "scene/gui/tool_button.h" #include "scene/gui/check_button.h" -#include "scene/resources/material.h" class ColorPicker : public BoxContainer { @@ -49,8 +48,8 @@ private: Control *screen; Image last_capture; - TextureFrame *uv_edit; - TextureFrame *w_edit; + Control *uv_edit; + Control *w_edit; TextureFrame *sample; TextureFrame *preset; Button *bt_add_preset; diff --git a/scene/resources/default_theme/color_picker_hue.png b/scene/resources/default_theme/color_picker_hue.png Binary files differindex 9bdd24f4fe..de2cd0c2bf 100644 --- a/scene/resources/default_theme/color_picker_hue.png +++ b/scene/resources/default_theme/color_picker_hue.png diff --git a/scene/resources/default_theme/color_picker_main.png b/scene/resources/default_theme/color_picker_main.png Binary files differdeleted file mode 100644 index 0498628180..0000000000 --- a/scene/resources/default_theme/color_picker_main.png +++ /dev/null diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 4c6cf1c7c0..3c6e65bf41 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -835,15 +835,9 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref t->set_icon("screen_picker","ColorPicker", make_icon( icon_color_pick_png ) ); t->set_icon("add_preset","ColorPicker", make_icon( icon_add_png ) ); - t->set_icon("color_area", "ColorPicker", make_icon( color_picker_main_png)); t->set_icon("color_hue", "ColorPicker", make_icon( color_picker_hue_png)); t->set_icon("color_sample", "ColorPicker", make_icon( color_picker_sample_png)); - t->set_shader("uv_editor", "ColorPicker", make_shader("", uv_editor_shader_code, "")); - t->set_shader("w_editor", "ColorPicker", make_shader("", w_editor_shader_code, "")); - - - // TooltipPanel Ref<StyleBoxTexture> style_tt = make_stylebox( tooltip_bg_png,4,4,4,4); diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py index 68c9e92527..68c9e92527 100644..100755 --- a/scene/resources/default_theme/make_header.py +++ b/scene/resources/default_theme/make_header.py diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h index 913ea9b5e9..46fd770a27 100644 --- a/scene/resources/default_theme/theme_data.h +++ b/scene/resources/default_theme/theme_data.h @@ -70,12 +70,7 @@ static const unsigned char close_hl_png[]={ static const unsigned char color_picker_hue_png[]={ -0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x1,0x0,0x8,0x2,0x0,0x0,0x0,0x35,0x30,0x61,0x19,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xe0,0x9,0x18,0xc,0x24,0x18,0xa9,0xb3,0x2c,0xb7,0x0,0x0,0x0,0x23,0x49,0x44,0x41,0x54,0x68,0xde,0xed,0xc1,0x31,0x1,0x0,0x0,0x0,0xc2,0xa0,0xf5,0x4f,0x6d,0xd,0xf,0xa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbe,0xd,0x31,0x0,0x0,0x1,0x35,0x84,0x14,0xe2,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 -}; - - -static const unsigned char color_picker_main_png[]={ -0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x8,0x2,0x0,0x0,0x0,0xd3,0x10,0x3f,0x31,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xe0,0x9,0x18,0xc,0x23,0x22,0x20,0xfe,0x63,0xc2,0x0,0x0,0x0,0xd5,0x49,0x44,0x41,0x54,0x78,0xda,0xed,0xc1,0x31,0x1,0x0,0x0,0x0,0xc2,0xa0,0xf5,0x4f,0xed,0x65,0xb,0xa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x1b,0x1,0x2d,0x0,0x1,0x9e,0xcb,0xc2,0xed,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 +0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x8,0x2,0x0,0x0,0x0,0xfd,0x5c,0x8b,0xcf,0x0,0x0,0x0,0x59,0x49,0x44,0x41,0x54,0x28,0x91,0xcd,0xd0,0x31,0xa,0x3,0x31,0x10,0x43,0xd1,0x87,0xc0,0xf6,0xfd,0x8f,0x1b,0xdb,0x30,0x69,0x76,0x21,0x65,0xd8,0x14,0x71,0xf1,0xf9,0x8c,0x84,0x9a,0x51,0x44,0x13,0xfd,0x21,0xe3,0x87,0xed,0xf7,0xa8,0xcd,0x2a,0x99,0x8e,0x46,0x2b,0x94,0xd0,0x43,0xb,0xe3,0x64,0xb3,0x2a,0xa6,0x93,0xb9,0x9f,0x9a,0x4e,0x3a,0x69,0x97,0xc7,0xe5,0x3b,0x1b,0xff,0xef,0x6d,0xa5,0xec,0x30,0xc3,0xeb,0xf2,0xc,0xeb,0xe3,0x5e,0x27,0xf4,0x8a,0x37,0x75,0x7b,0x8a,0xe5,0x90,0x9a,0xab,0x81,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 }; @@ -577,39 +572,3 @@ static const unsigned char window_resizer_png[]={ -static const char *uv_editor_shader_code= - "vec3 nd1sl2=vec3(UV,0);" - "uniform float H=0;" - "float nd4sl0=H;" - "float nd7sl0=nd1sl2.x;" - "float nd7sl1=nd1sl2.y;" - "float nd7sl2=nd1sl2.z;" - "float nd2sl1def=-1;" - "float nd2sl0=nd7sl1*nd2sl1def;" - "float nd6sl1def=1;" - "float nd6sl0=nd2sl0+nd6sl1def;" - "vec3 nd3sl0=vec3(nd4sl0,nd7sl0,nd6sl0);" - "vec3 nd5sl0;" - "{" - " vec3 c = nd3sl0;" - " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);" - " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);" - " nd5sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);" - "}" - "COLOR.rgb=nd5sl0;"; - - -static const char *w_editor_shader_code= - "vec3 nd1sl2=vec3(UV,0);" - "float nd2sl1=1-nd1sl2.y;" - "vec3 nd3sl0=vec3(nd2sl1,1,1);" - "vec3 nd6sl0;" - "{" - " vec3 c = nd3sl0;" - " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);" - " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);" - " nd6sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);" - "}" - "COLOR.rgb=nd6sl0;"; - - diff --git a/scene/resources/default_theme/uv_editor.gsl b/scene/resources/default_theme/uv_editor.gsl deleted file mode 100644 index 8c24e76dd5..0000000000 --- a/scene/resources/default_theme/uv_editor.gsl +++ /dev/null @@ -1,19 +0,0 @@ -vec3 nd1sl2=vec3(UV,0);
-uniform float H=0;
-float nd4sl0=H;
-float nd7sl0=nd1sl2.x;
-float nd7sl1=nd1sl2.y;
-float nd7sl2=nd1sl2.z;
-float nd2sl1def=-1;
-float nd2sl0=nd7sl1*nd2sl1def;
-float nd6sl1def=1;
-float nd6sl0=nd2sl0+nd6sl1def;
-vec3 nd3sl0=vec3(nd4sl0,nd7sl0,nd6sl0);
-vec3 nd5sl0;
-{
- vec3 c = nd3sl0;
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
- nd5sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
-}
-COLOR.rgb=nd5sl0;
\ No newline at end of file diff --git a/scene/resources/default_theme/w_editor.gsl b/scene/resources/default_theme/w_editor.gsl deleted file mode 100644 index 6d2dd9a0bb..0000000000 --- a/scene/resources/default_theme/w_editor.gsl +++ /dev/null @@ -1,11 +0,0 @@ -vec3 nd1sl2=vec3(UV,0);
-float nd2sl1=1-nd1sl2.y;
-vec3 nd3sl0=vec3(nd2sl1,1,1);
-vec3 nd6sl0;
-{
- vec3 c = nd3sl0;
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
- nd6sl0=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
-}
-COLOR.rgb=nd6sl0;
\ No newline at end of file diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index 6326b5089e..b5f843c114 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -151,6 +151,11 @@ public: /* COMPILER */ + // lame work around to Apple defining this as a macro in 10.12 SDK + #ifdef TYPE_BOOL + #undef TYPE_BOOL + #endif + enum DataType { TYPE_VOID, TYPE_BOOL, |