1
1
#pragma once
2
- #include " PluginData.h"
2
+ #include < PluginAPI/ PluginData.h>
3
3
#include < stddef.h>
4
4
5
5
namespace ed {
@@ -64,6 +64,7 @@ namespace ed {
64
64
typedef void (*GetMousePositionFn)(float & x, float & y);
65
65
typedef int (*GetFrameIndexFn)();
66
66
typedef float (*GetTimeFn)();
67
+ typedef void (*SetTimeFn)(float time);
67
68
typedef void (*SetGeometryTransformFn)(void * item, float scale[3 ], float rota[3 ], float pos[3 ]);
68
69
typedef void (*SetMousePositionFn)(float x, float y);
69
70
typedef void (*SetKeysWASDFn)(bool w, bool a, bool s, bool d);
@@ -81,6 +82,10 @@ namespace ed {
81
82
typedef unsigned int (*GetFlippedTextureFn)(void * objects, const char * name);
82
83
typedef void (*GetTextureSizeFn)(void * objects, const char * name, int & w, int & h);
83
84
85
+ typedef bool (*IsRenderTextureFn)(void * objects, const char * name);
86
+ typedef void (*GetRenderTextureSizeFn)(void * objects, const char * name, int & w, int & h);
87
+ typedef unsigned int (*GetDepthTextureFn)(void * objects, const char * name);
88
+
84
89
typedef void (*BindDefaultStateFn)();
85
90
typedef void (*OpenInCodeEditorFn)(void * UI, void * item, const char * filename, int id);
86
91
@@ -114,6 +119,17 @@ namespace ed {
114
119
typedef bool (*IsInPerformanceModeFn)(void * UI);
115
120
116
121
typedef void (*PushNotificationFn)(void * UI, void * plugin, int id, const char * text, const char * buttonText);
122
+
123
+ typedef void (*DebuggerJumpFn)(void * Debugger, void * TextEditor, int line);
124
+ typedef void (*DebuggerContinueFn)(void * Debugger, void * TextEditor);
125
+ typedef void (*DebuggerStepFn)(void * Debugger, void * TextEditor);
126
+ typedef void (*DebuggerStepIntoFn)(void * Debugger, void * TextEditor);
127
+ typedef void (*DebuggerStepOutFn)(void * Debugger, void * TextEditor);
128
+ typedef bool (*DebuggerCheckBreakpointFn)(void * Debugger, void * TextEditor, int line);
129
+ typedef bool (*DebuggerIsDebuggingFn)(void * Debugger, void * TextEditor);
130
+ typedef int (*DebuggerGetCurrentLineFn)(void * Debugger);
131
+
132
+ typedef float (*ScaleSizeFn)(float size);
117
133
}
118
134
119
135
// CreatePlugin(), DestroyPlugin(ptr), GetPluginAPIVersion(), GetPluginVersion(), GetPluginName()
@@ -184,37 +200,55 @@ namespace ed {
184
200
virtual void Object_ShowContext (const char * type, void * data) = 0;
185
201
186
202
// pipeline item stuff
187
- virtual bool PipelineItem_HasProperties (const char * type) = 0;
203
+ virtual bool PipelineItem_HasProperties (const char * type, void * data ) = 0;
188
204
virtual void PipelineItem_ShowProperties (const char * type, void * data) = 0;
189
- virtual bool PipelineItem_IsPickable (const char * type) = 0;
190
- virtual bool PipelineItem_HasShaders (const char * type) = 0; // so that they can be opened in the shader editor
191
- virtual void PipelineItem_OpenInEditor (void * ui, const char * type, void * data) = 0;
192
- virtual bool PipelineItem_CanHaveChild (const char * type, plugin::PipelineItemType itemType) = 0;
193
- virtual int PipelineItem_GetInputLayoutSize (const char * itemName ) = 0; // this must be supported if this item can have geometry as child..
194
- virtual void PipelineItem_GetInputLayoutItem (const char * itemName , int index, plugin::InputLayoutItem& out) = 0;
205
+ virtual bool PipelineItem_IsPickable (const char * type, void * data ) = 0;
206
+ virtual bool PipelineItem_HasShaders (const char * type, void * data ) = 0; // so that they can be opened in the shader editor
207
+ virtual void PipelineItem_OpenInEditor (const char * type, void * data) = 0;
208
+ virtual bool PipelineItem_CanHaveChild (const char * type, void * data, plugin::PipelineItemType itemType) = 0;
209
+ virtual int PipelineItem_GetInputLayoutSize (const char * type, void * data ) = 0; // this must be supported if this item can have geometry as child..
210
+ virtual void PipelineItem_GetInputLayoutItem (const char * type, void * data , int index, plugin::InputLayoutItem& out) = 0;
195
211
virtual void PipelineItem_Remove (const char * itemName, const char * type, void * data) = 0;
196
212
virtual void PipelineItem_Rename (const char * oldName, const char * newName) = 0;
197
213
virtual void PipelineItem_AddChild (const char * owner, const char * name, plugin::PipelineItemType type, void * data) = 0;
198
- virtual bool PipelineItem_CanHaveChildren (const char * type) = 0;
214
+ virtual bool PipelineItem_CanHaveChildren (const char * type, void * data ) = 0;
199
215
virtual void * PipelineItem_CopyData (const char * type, void * data) = 0;
200
216
virtual void PipelineItem_Execute (void * Owner, plugin::PipelineItemType OwnerType, const char * type, void * data) = 0;
201
217
virtual void PipelineItem_Execute (const char * type, void * data, void * children, int count) = 0;
202
- virtual void PipelineItem_GetWorldMatrix (void * data, float (&pMat)[16]) = 0; // must be implemented if item is pickable
218
+ virtual void PipelineItem_GetWorldMatrix (const char * type, void * data, float (&pMat)[16]) = 0; // must be implemented if item is pickable
203
219
virtual bool PipelineItem_Intersect (const char * type, void * data, const float * rayOrigin, const float * rayDir, float & hitDist) = 0;
204
- virtual void PipelineItem_GetBoundingBox (void * data, float (&minPos)[3], float (&maxPos)[3]) = 0;
205
- virtual bool PipelineItem_HasContext (const char * type) = 0;
220
+ virtual void PipelineItem_GetBoundingBox (const char * type, void * data, float (&minPos)[3], float (&maxPos)[3]) = 0;
221
+ virtual bool PipelineItem_HasContext (const char * type, void * data ) = 0;
206
222
virtual void PipelineItem_ShowContext (const char * type, void * data) = 0;
207
223
virtual const char * PipelineItem_Export (const char * type, void * data) = 0;
208
224
virtual void * PipelineItem_Import (const char * ownerName, const char * name, const char * type, const char * argsString) = 0;
209
225
virtual void PipelineItem_MoveDown (void * ownerData, const char * ownerType, const char * itemName) = 0;
210
226
virtual void PipelineItem_MoveUp (void * ownerData, const char * ownerType, const char * itemName) = 0;
211
- virtual void PipelineItem_ApplyGizmoTransform (void * data, float * transl, float * scale, float * rota) = 0;
212
- virtual void PipelineItem_GetTransform (void * data, float * transl, float * scale, float * rota) = 0;
227
+ virtual void PipelineItem_ApplyGizmoTransform (const char * type, void * data, float * transl, float * scale, float * rota) = 0;
228
+ virtual void PipelineItem_GetTransform (const char * type, void * data, float * transl, float * scale, float * rota) = 0;
213
229
virtual void PipelineItem_DebugVertexExecute (void * Owner, plugin::PipelineItemType OwnerType, const char * type, void * data, unsigned int colorVarLoc) = 0;
230
+ virtual int PipelineItem_DebugVertexExecute (const char * type, void * data, const char * childName, float rx, float ry, int vertexGroup) = 0;
214
231
virtual void PipelineItem_DebugInstanceExecute (void * Owner, plugin::PipelineItemType OwnerType, const char * type, void * data, unsigned int colorVarLoc) = 0;
215
- virtual unsigned int PipelineItem_GetVBO (void * data) = 0;
216
- virtual unsigned int PipelineItem_GetVBOStride (void * data) = 0;
217
- virtual bool PipelineItem_CanChangeVariables (void * data) = 0;
232
+ virtual int PipelineItem_DebugInstanceExecute (const char * type, void * data, const char * childName, float rx, float ry, int vertexGroup) = 0;
233
+ virtual unsigned int PipelineItem_GetVBO (const char * type, void * data) = 0;
234
+ virtual unsigned int PipelineItem_GetVBOStride (const char * type, void * data) = 0;
235
+ virtual bool PipelineItem_CanChangeVariables (const char * type, void * data) = 0;
236
+ virtual bool PipelineItem_IsDebuggable (const char * type, void * data) = 0;
237
+ virtual bool PipelineItem_IsStageDebuggable (const char * type, void * data, ed::plugin::ShaderStage stage) = 0;
238
+ virtual void PipelineItem_DebugExecute (const char * type, void * data, void * children, int count, int * debugID) = 0;
239
+ virtual unsigned int PipelineItem_GetTopology (const char * type, void * data) = 0;
240
+ virtual unsigned int PipelineItem_GetVariableCount (const char * type, void * data) = 0;
241
+ virtual const char * PipelineItem_GetVariableName (const char * type, void * data, unsigned int variable) = 0;
242
+ virtual ed::plugin::VariableType PipelineItem_GetVariableType (const char * type, void * data, unsigned int variable) = 0;
243
+ virtual float PipelineItem_GetVariableValueFloat (const char * type, void * data, unsigned int variable, int col, int row) = 0;
244
+ virtual int PipelineItem_GetVariableValueInteger (const char * type, void * data, unsigned int variable, int col) = 0;
245
+ virtual bool PipelineItem_GetVariableValueBoolean (const char * type, void * data, unsigned int variable, int col) = 0;
246
+ virtual unsigned int PipelineItem_GetSPIRVSize (const char * type, void * data, ed::plugin::ShaderStage stage) = 0;
247
+ virtual unsigned int * PipelineItem_GetSPIRV (const char * type, void * data, ed::plugin::ShaderStage stage) = 0;
248
+ virtual void PipelineItem_DebugPrepareVariables (const char * type, void * data, const char * name) = 0;
249
+ virtual bool PipelineItem_DebugUsesCustomTextures (const char * type, void * data) = 0;
250
+ virtual unsigned int PipelineItem_DebugGetTexture (const char * type, void * data, int loc, const char * variableName) = 0;
251
+ virtual void PipelineItem_DebugGetTextureSize (const char * type, void * data, int loc, const char * variableName, int & x, int & y, int & z) = 0;
218
252
219
253
// options
220
254
virtual bool Options_HasSection () = 0;
@@ -230,6 +264,8 @@ namespace ed {
230
264
virtual const unsigned int * CustomLanguage_CompileToSPIRV (int langID, const char * src, size_t src_len, plugin::ShaderStage stage, const char * entry, plugin::ShaderMacro* macros, size_t macroCount, size_t * spv_length, bool * compiled) = 0;
231
265
virtual const char * CustomLanguage_ProcessGeneratedGLSL (int langID, const char * src) = 0;
232
266
virtual bool CustomLanguage_SupportsAutoUniforms (int langID) = 0;
267
+ virtual bool CustomLanguage_IsDebuggable (int langID) = 0;
268
+ virtual const char * CustomLanguage_GetDefaultExtension (int langID) = 0;
233
269
234
270
// language text editor
235
271
virtual bool ShaderEditor_Supports (int langID) = 0;
@@ -290,7 +326,7 @@ namespace ed {
290
326
virtual void HandleNotification (int id) = 0;
291
327
292
328
// host functions
293
- void *Renderer, *Messages, *Project, *UI, *ObjectManager, *PipelineManager, *Plugins;
329
+ void *Renderer, *Messages, *Project, *UI, *ObjectManager, *PipelineManager, *Plugins, *Debugger ;
294
330
pluginfn::AddObjectFn AddObject;
295
331
pluginfn::AddCustomPipelineItemFn AddCustomPipelineItem;
296
332
pluginfn::AddMessageFn AddMessage;
@@ -326,6 +362,7 @@ namespace ed {
326
362
pluginfn::GetMousePositionFn GetMousePosition;
327
363
pluginfn::GetFrameIndexFn GetFrameIndex;
328
364
pluginfn::GetTimeFn GetTime;
365
+ pluginfn::SetTimeFn SetTime;
329
366
pluginfn::SetGeometryTransformFn SetGeometryTransform;
330
367
pluginfn::SetMousePositionFn SetMousePosition;
331
368
pluginfn::SetKeysWASDFn SetKeysWASD;
@@ -384,5 +421,17 @@ namespace ed {
384
421
pluginfn::TogglePerformanceModeFn TogglePerformanceMode;
385
422
pluginfn::IsInPerformanceModeFn IsInPerformanceMode;
386
423
pluginfn::PushNotificationFn PushNotification;
424
+ pluginfn::DebuggerJumpFn DebuggerJump;
425
+ pluginfn::DebuggerContinueFn DebuggerContinue;
426
+ pluginfn::DebuggerStepFn DebuggerStep;
427
+ pluginfn::DebuggerStepIntoFn DebuggerStepInto;
428
+ pluginfn::DebuggerStepOutFn DebuggerStepOut;
429
+ pluginfn::DebuggerCheckBreakpointFn DebuggerCheckBreakpoint;
430
+ pluginfn::DebuggerIsDebuggingFn DebuggerIsDebugging;
431
+ pluginfn::DebuggerGetCurrentLineFn DebuggerGetCurrentLine;
432
+ pluginfn::IsRenderTextureFn IsRenderTexture;
433
+ pluginfn::GetRenderTextureSizeFn GetRenderTextureSize;
434
+ pluginfn::GetDepthTextureFn GetDepthTexture;
435
+ pluginfn::ScaleSizeFn ScaleSize;
387
436
};
388
437
}
0 commit comments