aboutsummaryrefslogtreecommitdiff
path: root/demo/d3d11/imguiGraphD3D11.h
diff options
context:
space:
mode:
authorMiles Macklin <[email protected]>2017-03-10 14:51:31 +1300
committerMiles Macklin <[email protected]>2017-03-10 14:51:31 +1300
commitad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f (patch)
tree4cc6f3288363889d7342f7f8407c0251e6904819 /demo/d3d11/imguiGraphD3D11.h
downloadflex-ad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f.tar.xz
flex-ad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f.zip
Initial 1.1.0 binary release
Diffstat (limited to 'demo/d3d11/imguiGraphD3D11.h')
-rw-r--r--demo/d3d11/imguiGraphD3D11.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/demo/d3d11/imguiGraphD3D11.h b/demo/d3d11/imguiGraphD3D11.h
new file mode 100644
index 0000000..be9c88b
--- /dev/null
+++ b/demo/d3d11/imguiGraphD3D11.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#ifndef IMGUI_GRAPH_D3D11_H
+#define IMGUI_GRAPH_D3D11_H
+
+#include <stdint.h>
+
+#include "imguiGraph.h"
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+struct ImguiGraphDesc
+{
+ ID3D11Device* device = nullptr;
+ ID3D11DeviceContext* deviceContext = nullptr;
+ int winW;
+ int winH;
+
+ uint32_t maxVertices = 64 * 4096u;
+
+ ImguiGraphDesc() {}
+};
+
+// Below are the functions that must be implemented per graphics API
+
+void imguiGraphContextInit(const ImguiGraphDesc* desc);
+
+void imguiGraphContextUpdate(const ImguiGraphDesc* desc);
+
+void imguiGraphContextDestroy();
+
+void imguiGraphRecordBegin();
+
+void imguiGraphRecordEnd();
+
+void imguiGraphVertex2f(float x, float y);
+
+void imguiGraphVertex2fv(const float* v);
+
+void imguiGraphTexCoord2f(float u, float v);
+
+void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
+
+void imguiGraphColor4ubv(const uint8_t* v);
+
+void imguiGraphFontTextureEnable();
+
+void imguiGraphFontTextureDisable();
+
+void imguiGraphEnableScissor(int x, int y, int width, int height);
+
+void imguiGraphDisableScissor();
+
+void imguiGraphFontTextureInit(unsigned char* data);
+
+void imguiGraphFontTextureRelease();
+
+#endif \ No newline at end of file