aboutsummaryrefslogtreecommitdiff
path: root/demo/d3d11/imguiGraphD3D11.h
diff options
context:
space:
mode:
authorMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
committerMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
commit688b5f42e9bfe498d7af7075d4d8f4429867f3a3 (patch)
tree7e0d0e7c95298f0418723abd92f61ac6e16b055e /demo/d3d11/imguiGraphD3D11.h
parentUpdate README.md (diff)
downloadflex-1.2.0.beta.1.tar.xz
flex-1.2.0.beta.1.zip
1.2.0.beta.11.2.0.beta.1
Diffstat (limited to 'demo/d3d11/imguiGraphD3D11.h')
-rw-r--r--demo/d3d11/imguiGraphD3D11.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/demo/d3d11/imguiGraphD3D11.h b/demo/d3d11/imguiGraphD3D11.h
index be9c88b..8f521a9 100644
--- a/demo/d3d11/imguiGraphD3D11.h
+++ b/demo/d3d11/imguiGraphD3D11.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-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
@@ -13,12 +13,12 @@
#include <stdint.h>
-#include "imguiGraph.h"
+#include "../d3d/imguiGraph.h"
struct ID3D11Device;
struct ID3D11DeviceContext;
-struct ImguiGraphDesc
+struct ImguiGraphDescD3D11
{
ID3D11Device* device = nullptr;
ID3D11DeviceContext* deviceContext = nullptr;
@@ -27,41 +27,49 @@ struct ImguiGraphDesc
uint32_t maxVertices = 64 * 4096u;
- ImguiGraphDesc() {}
+ ImguiGraphDescD3D11() {}
};
-// Below are the functions that must be implemented per graphics API
+inline const ImguiGraphDescD3D11* cast_to_imguiGraphDescD3D11(const ImguiGraphDesc* desc)
+{
+ return (const ImguiGraphDescD3D11*)(desc);
+}
+
+inline ImguiGraphDesc* cast_from_imguiGraphDescD3D11(ImguiGraphDescD3D11* desc)
+{
+ return (ImguiGraphDesc*)(desc);
+}
-void imguiGraphContextInit(const ImguiGraphDesc* desc);
+IMGUI_GRAPH_API void imguiGraphContextInitD3D11(const ImguiGraphDesc* desc);
-void imguiGraphContextUpdate(const ImguiGraphDesc* desc);
+IMGUI_GRAPH_API void imguiGraphContextUpdateD3D11(const ImguiGraphDesc* desc);
-void imguiGraphContextDestroy();
+IMGUI_GRAPH_API void imguiGraphContextDestroyD3D11();
-void imguiGraphRecordBegin();
+IMGUI_GRAPH_API void imguiGraphRecordBeginD3D11();
-void imguiGraphRecordEnd();
+IMGUI_GRAPH_API void imguiGraphRecordEndD3D11();
-void imguiGraphVertex2f(float x, float y);
+IMGUI_GRAPH_API void imguiGraphVertex2fD3D11(float x, float y);
-void imguiGraphVertex2fv(const float* v);
+IMGUI_GRAPH_API void imguiGraphVertex2fvD3D11(const float* v);
-void imguiGraphTexCoord2f(float u, float v);
+IMGUI_GRAPH_API void imguiGraphTexCoord2fD3D11(float u, float v);
-void imguiGraphColor4ub(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
+IMGUI_GRAPH_API void imguiGraphColor4ubD3D11(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
-void imguiGraphColor4ubv(const uint8_t* v);
+IMGUI_GRAPH_API void imguiGraphColor4ubvD3D11(const uint8_t* v);
-void imguiGraphFontTextureEnable();
+IMGUI_GRAPH_API void imguiGraphFontTextureEnableD3D11();
-void imguiGraphFontTextureDisable();
+IMGUI_GRAPH_API void imguiGraphFontTextureDisableD3D11();
-void imguiGraphEnableScissor(int x, int y, int width, int height);
+IMGUI_GRAPH_API void imguiGraphEnableScissorD3D11(int x, int y, int width, int height);
-void imguiGraphDisableScissor();
+IMGUI_GRAPH_API void imguiGraphDisableScissorD3D11();
-void imguiGraphFontTextureInit(unsigned char* data);
+IMGUI_GRAPH_API void imguiGraphFontTextureInitD3D11(unsigned char* data);
-void imguiGraphFontTextureRelease();
+IMGUI_GRAPH_API void imguiGraphFontTextureReleaseD3D11();
#endif \ No newline at end of file