38#include "ImguiRenderer.h"
39#include "ShapeRenderer.h"
40#include "FrameCapture.h"
42#include "NvFlowArray.h"
43#include "NvFlowString.h"
45#include "NvFlowUploadBuffer.h"
50#include "NvFlowDatabase.h"
52#include "NvFlowStringHash.h"
60void editorFlow_definePrim(
EditorFlow* ptr,
const char* type,
const char* path,
const char* name);
62void editorFlow_setAttribute(
EditorFlow* ptr,
const char* primPath,
const char* name,
const void* data, NvFlowUint64 sizeInBytes);
63void editorFlow_setAttributeFloat(
EditorFlow* ptr,
const char* primPath,
const char* name,
float value);
64void editorFlow_setAttributeInt(
EditorFlow* ptr,
const char* primPath,
const char* name,
int value);
65void editorFlow_setAttributeUint(
EditorFlow* ptr,
const char* primPath,
const char* name, NvFlowUint value);
66void editorFlow_setAttributeBool(
EditorFlow* ptr,
const char* primPath,
const char* name, NvFlowBool32 value);
67void editorFlow_setAttributeFloat3(
EditorFlow* ptr,
const char* primPath,
const char* name, NvFlowFloat3 value);
68void editorFlow_setAttributeFloat3Array(
EditorFlow* ptr,
const char* primPath,
const char* name,
const NvFlowFloat3* values, NvFlowUint64 elementCount);
69void editorFlow_setAttributeFloat4Array(
EditorFlow* ptr,
const char* primPath,
const char* name,
const NvFlowFloat4* values, NvFlowUint64 elementCount);
70void editorFlow_setAttributeIntArray(
EditorFlow* ptr,
const char* primPath,
const char* name,
const int* values, NvFlowUint64 elementCount);
76 const char* stageName;
78 void(*update)(
EditorFlow* ptr,
void* userdata,
double time,
float deltaTime);
79 void(*destroy)(
EditorFlow* ptr,
void* userdata);
82void editorFlowStage_getBuiltinStages(
const EditorFlowStage*** pStages, NvFlowUint64* pStageCount);
84void editorFlowStage_applyOverrides(
EditorFlow* ptr,
float cellsizeOverride, NvFlowBool32 smallBlocksOverride);
90void printError(
const char* str,
void* userdata);
95 NvFlowContextApi contextApi = eNvFlowContextApi_vulkan;
96 NvFlowUint threadCount = 0u;
97 NvFlowBool32 headless = NV_FLOW_FALSE;
98 NvFlowBool32 vsync = NV_FLOW_TRUE;
101 void* nvFlowModule =
nullptr;
102 void* nvFlowExtModule =
nullptr;
105 NvFlowDeviceManager* deviceManager =
nullptr;
106 NvFlowDevice* device =
nullptr;
107 NvFlowDeviceQueue* deviceQueue =
nullptr;
108 NvFlowSwapchain* swapchain =
nullptr;
111 FILE* perflog =
nullptr;
123 const char* outputFilename =
"benchmark.csv";
124 FILE* outputFile =
nullptr;
125 NvFlowUint benchmarkFrameCount = 0u;
126 NvFlowUint benchmarkFrameID = 0u;
127 bool benchmarkShouldRun =
true;
128 NvFlowUint benchmarkActiveBlockCount = 0u;
133void editorCompute_init(
EditorCompute* ptr,
const NvFlowSwapchainDesc* swapchainDesc, NvFlowBool32 headless);
135void editorCompute_reportEntries(
void* userdata, NvFlowUint64 captureID, NvFlowUint numEntries,
NvFlowProfilerEntry* entries);
136void editorCompute_logPrint(NvFlowLogLevel level,
const char* format, ...);
144 const NvFlowUint8* data;
145 NvFlowUint64 dataSize;
151 NvFlowUint maxLocations = 4096u;
152 NvFlowUint targetMaxLocations = 4096u;
153 NvFlowBool32 simonly = NV_FLOW_FALSE;
154 NvFlowBool32 smallBlocksOverride = NV_FLOW_FALSE;
155 float cellsizeOverride = 0.f;
157 const char* cmdStage =
nullptr;
159 NvFlowUint64 targetStageIdx = 0llu;
161 void* stageUserdata =
nullptr;
164 double absoluteSimTime = 0.0;
165 double animationTime = 0.0;
166 NvFlowUint activeBlockCount = 0u;
167 NvFlowUint3 activeBlockDim = { 0u, 0u, 0u };
168 NvFlowUint activeBlockCountIsosurface = 0u;
169 NvFlowUint3 activeBlockDimIsosurface = { 32u, 16u, 16u };
172 NvFlowGrid* grid =
nullptr;
173 NvFlowGridParamsNamed* gridParamsServer =
nullptr;
174 NvFlowGridParamsNamed* gridParamsClient =
nullptr;
175 NvFlowGridParams* gridParams =
nullptr;
185 NvFlowGridParams* clientGridParams =
nullptr;
186 NvFlowGridParamsSnapshot* paramsSnapshot =
nullptr;
198 NvFlowTextureTransient** colorFrontTransient,
199 NvFlowTextureTransient* offscreenDepthTransient,
200 NvFlowUint windowWidth,
201 NvFlowUint windowHeight,
202 const NvFlowFloat4x4* view,
203 const NvFlowFloat4x4* projection
211 NvFlowImguiRenderer* imguiRenderer =
nullptr;
215void editorImgui_update(
221void editorImgui_render(
224 NvFlowTextureTransient* colorIn,
225 NvFlowTextureTransient* colorOut,
226 NvFlowUint windowWidth,
227 NvFlowUint windowHeight
233 NvFlowUint windowWidth = 1280u;
234 NvFlowUint windowHeight = 800u;
235 NvFlowUint windowWidthOld = 1280u;
236 NvFlowUint windowHeightOld = 800u;
238 GLFWwindow* window =
nullptr;
239 NvFlowBool32 headless = NV_FLOW_FALSE;
240 NvFlowBool32 isPaused = NV_FLOW_FALSE;
241 NvFlowBool32 overlayEnabled = NV_FLOW_FALSE;
242 NvFlowBool32 editorEnabled = NV_FLOW_TRUE;
243 NvFlowBool32 sphereEnabled = NV_FLOW_FALSE;
244 NvFlowBool32 captureEnabled = NV_FLOW_FALSE;
246 int fullscreenState = 0;
247 NvFlowBool32 shouldRun = NV_FLOW_TRUE;
251 NvFlowBool32 mouseJustPressed[5u];
254 NvFlowShapeRenderer* shapeRenderer =
nullptr;
257 NvFlowFrameCapture* frameCapture =
nullptr;
271int editorGlfw_init(
App* ptr);
272void editorGlfw_getSwapchainDesc(
App* ptr, NvFlowSwapchainDesc* outDesc);
273void editorGlfw_newFrame(
App* ptr,
float deltaTime);
274int editorGlfw_processEvents(
App* ptr);
275void editorGlfw_destroy(
App* ptr);
278NV_FLOW_INLINE
void fopen_s(FILE** streamptr,
const char* filename,
const char* mode)
280 *streamptr = fopen(filename, mode);
Definition EditorCommon.h:232
Definition EditorCommon.h:93
Definition EditorCommon.h:139
Definition EditorCommon.h:75
Definition EditorCommon.h:149
Definition EditorCommon.h:209
Definition NvFlowArray.h:36
Definition NvFlowContext.h:362
Definition NvFlowDatabase.h:582
Definition FrameCapture.h:34
Definition NvFlowExt.h:2646
Definition ImguiRenderer.h:32
Definition NvFlowLoader.h:81
Definition NvFlowExt.h:3024
Definition ShapeRenderer.h:38
Definition NvFlowStringHash.h:50
Definition NvFlowString.cpp:35