You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
-the new shader language seems to work
-shader editor plugin can edit shaders -code completion in shader editor plugin
This commit is contained in:
@@ -38,33 +38,34 @@
|
||||
#include "scene/resources/shader.h"
|
||||
#include "servers/visual/shader_language.h"
|
||||
|
||||
#if 0
|
||||
class ShaderTextEditor : public CodeTextEditor {
|
||||
|
||||
OBJ_TYPE( ShaderTextEditor, CodeTextEditor );
|
||||
|
||||
Ref<Shader> shader;
|
||||
ShaderLanguage::ShaderType type;
|
||||
|
||||
protected:
|
||||
|
||||
static void _bind_methods();
|
||||
virtual void _load_theme_settings();
|
||||
|
||||
virtual void _code_complete_script(const String& p_code, List<String>* r_options);
|
||||
|
||||
public:
|
||||
|
||||
virtual void _validate_script();
|
||||
|
||||
|
||||
Ref<Shader> get_edited_shader() const;
|
||||
void set_edited_shader(const Ref<Shader>& p_shader,ShaderLanguage::ShaderType p_type);
|
||||
void set_edited_shader(const Ref<Shader>& p_shader);
|
||||
ShaderTextEditor();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class ShaderEditor : public Control {
|
||||
class ShaderEditor : public VBoxContainer {
|
||||
|
||||
OBJ_TYPE(ShaderEditor, Control );
|
||||
OBJ_TYPE(ShaderEditor, VBoxContainer );
|
||||
|
||||
enum {
|
||||
|
||||
@@ -88,22 +89,17 @@ class ShaderEditor : public Control {
|
||||
MenuButton *settings_menu;
|
||||
uint64_t idle;
|
||||
|
||||
TabContainer *tab_container;
|
||||
GotoLineDialog *goto_line_dialog;
|
||||
ConfirmationDialog *erase_tab_confirm;
|
||||
|
||||
TextureButton *close;
|
||||
|
||||
ShaderTextEditor *vertex_editor;
|
||||
ShaderTextEditor *fragment_editor;
|
||||
ShaderTextEditor *light_editor;
|
||||
ShaderTextEditor *shader_editor;
|
||||
|
||||
|
||||
void _tab_changed(int p_which);
|
||||
void _menu_option(int p_optin);
|
||||
void _params_changed();
|
||||
mutable Ref<Shader> shader;
|
||||
|
||||
void _close_callback();
|
||||
|
||||
void _editor_settings_changed();
|
||||
|
||||
@@ -134,6 +130,8 @@ class ShaderEditorPlugin : public EditorPlugin {
|
||||
bool _2d;
|
||||
ShaderEditor *shader_editor;
|
||||
EditorNode *editor;
|
||||
Button *button;
|
||||
|
||||
public:
|
||||
|
||||
virtual String get_name() const { return "Shader"; }
|
||||
@@ -150,10 +148,9 @@ public:
|
||||
virtual void save_external_data();
|
||||
virtual void apply_changes();
|
||||
|
||||
ShaderEditorPlugin(EditorNode *p_node,bool p_2d);
|
||||
ShaderEditorPlugin(EditorNode *p_node);
|
||||
~ShaderEditorPlugin();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user