Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #55

Merged
merged 34 commits into from
Dec 30, 2023
Merged

Dev #55

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
74d0be3
Bugfix #37
sammyfreg Aug 20, 2022
b1abd6f
Merge branch 'master' into dev
sammyfreg Aug 20, 2022
9e3dc5d
Prevent Server from saving a imgui.ini file
sammyfreg Sep 3, 2022
c707101
Fixes for Linux build
sammyfreg Oct 30, 2022
4706b6b
Fix some textureid cast error on GCC
sammyfreg Oct 31, 2022
bb4fcda
Socket 'Force Listen' now optional
sammyfreg Nov 5, 2022
6010086
Updated for Dear ImGui 1.89 support
sammyfreg Nov 13, 2022
d882f57
OffsetPointer fix
sammyfreg Jan 14, 2023
59ccf66
Removed 'unused const' warning introduced in VisualStudio 17.4.4
sammyfreg Jan 15, 2023
c0bdf28
Revert to wrongly submitted loader file during last Dear ImGui backen…
sammyfreg Jan 18, 2023
129c068
Upgrade DearImgui 1.89.5
sammyfreg May 4, 2023
799db56
Version 1.9 Release
sammyfreg May 4, 2023
d6919ce
Update msbuild_vs2022_dev.yml
sammyfreg May 4, 2023
940866c
Update msbuild_vs2022_dev.yml
sammyfreg May 4, 2023
0f0453d
Update msbuild_vs2022_dev.yml
sammyfreg May 4, 2023
305145d
Update msbuild_vs2022_dev.yml
sammyfreg May 4, 2023
7d866ea
Update msbuild_vs2022_dev.yml
sammyfreg May 4, 2023
627af75
Merge branch 'master' into dev
sammyfreg May 4, 2023
5946008
Fix for Unreal Engine 5.2
sammyfreg May 21, 2023
beb5dd4
Task custom texture (#45)
sammyfreg May 28, 2023
1fb1dfa
Merge branch 'dev' of https://github.com/sammyfreg/netImgui into dev
sammyfreg May 28, 2023
a1aec15
* Fix server network restart (#46)
lemantisee Jun 2, 2023
1c09b28
Add sokol backend for NetImguiServerApp (#49)
THISISAGOODNAME Jul 10, 2023
d31e952
DPI handling, ReadOnly config file handling
sammyfreg Nov 14, 2023
0c2b841
Compile warning fixes
sammyfreg Nov 16, 2023
04918a2
DPI scaling support. Shared Config Support
sammyfreg Dec 11, 2023
528b263
Merge branch 'master' into dev
sammyfreg Dec 11, 2023
4d002fd
Fix compilatin error in SampleDisabled
sammyfreg Dec 11, 2023
9a6dda9
Updated to Dear Imgui 1.90 support
sammyfreg Dec 22, 2023
66e46e3
Upgraded NetImgui Server app to Dear ImGui 1.90
sammyfreg Dec 22, 2023
a5fde18
Added remote clipboard support, fiex key input issue
sammyfreg Dec 24, 2023
5b99499
Forgot to update release version
sammyfreg Dec 24, 2023
d523139
Regenerate Server Application Font texture on DPI change
sammyfreg Dec 24, 2023
051d8cd
Samples update
sammyfreg Dec 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions Build/GenerateCompatibilityTest.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
@echo off
setlocal enabledelayedexpansion
cls
pushd %~dp0

::-----------------------------------------------------------------------------------
:: SETTINGS
::-----------------------------------------------------------------------------------
:: List of offical Dear ImGui (from official depot)
set VERSIONS=(v1.71 v1.72 v1.73 v1.74 v1.75 v1.76 v1.77 v1.78 v1.79, v1.80, v1.81, v1.82, v1.83, v1.84, v1.85, v1.86, v1.87, v1.88, v1.89.1, v1.89.2, v1.89.3, v1.89.4, v1.89.5)
set VERSIONS=(v1.71 v1.72 v1.73 v1.74 v1.75 v1.76 v1.77 v1.78 v1.79, v1.80, v1.81, v1.82, v1.83, v1.84, v1.85, v1.86, v1.87, v1.88, v1.89.1, v1.89.2, v1.89.3, v1.89.4, v1.89.5, v1.89.6, v1.89.7, v1.89.7-docking, v1.89.8, v1.89.8-docking, v1.89.9, v1.89.9-docking, v1.90, v1.90-docking)

:: List of custom Dear ImGui releases (from own depot)
set EXTRA_VERSIONS=(dock-1-76, dock-1-80, dock-1-89)
Expand All @@ -27,43 +28,47 @@ echo Used to test compatibility against multiple version of Dear ImGui
echo ================================================================================
echo.

if not exist %IMGUI_DIR% goto SkipDelete
echo.
echo --------------------------------------------------------------------------------
echo Clearing Releases
echo --------------------------------------------------------------------------------
echo Removing: %IMGUI_DIR%
rmdir /s /q %IMGUI_DIR%
:: Only download new release

:: if not exist %IMGUI_DIR% goto SkipDelete
:: echo.
:: echo --------------------------------------------------------------------------------
:: echo Clearing Releases
:: echo --------------------------------------------------------------------------------
:: echo Removing: %IMGUI_DIR%
:: rmdir /s /q %IMGUI_DIR%


:SkipDelete
mkdir %IMGUI_DIR%
if not exist %IMGUI_DIR% (
mkdir %IMGUI_DIR%
)

echo.
echo --------------------------------------------------------------------------------
echo Downloading and extracting Dear ImGui Releases
echo --------------------------------------------------------------------------------
pushd %IMGUI_DIR%
for %%v in %VERSIONS% do (

for %%v in %VERSIONS% do (
echo Extracting: %%v
set IMGUI_FILE=%%v.tar.gz
set IMGUI_FILEPATH="https://github.com/ocornut/imgui/archive/!IMGUI_FILE!"
echo !IMGUI_FILEPATH!
curl -LJ !IMGUI_FILEPATH! --output !IMGUI_FILE!
if not exist !IMGUI_FILE! curl -LJ !IMGUI_FILEPATH! --output !IMGUI_FILE!
tar -xzf !IMGUI_FILE!
::del !IMGUI_FILE!
echo.
)
for %%v in %EXTRA_VERSIONS% do (

for %%v in %EXTRA_VERSIONS% do (
echo Extracting: %%v
set IMGUI_FILE=%%v.zip
set IMGUI_FILEPATH="https://raw.githubusercontent.com/wiki/sammyfreg/netImgui/ImguiVersions/!IMGUI_FILE!"
echo !IMGUI_FILE!
curl -LJ !IMGUI_FILEPATH! --output !IMGUI_FILE!
if not exist !IMGUI_FILE! curl -LJ !IMGUI_FILEPATH! --output !IMGUI_FILE!
tar -xzf !IMGUI_FILE!
del !IMGUI_FILE!
echo.
)
popd

:SkipDownload
echo.
echo --------------------------------------------------------------------------------
echo Generating Sharpmake config for compatibility projects
echo --------------------------------------------------------------------------------
Expand All @@ -89,6 +94,8 @@ echo Dear ImGui Older versions fetched
echo Please regenerate the projects to have them included in compiling tests
echo --------------------------------------------------------------------------------
pause

popd
exit /b %errorlevel%

:: Take a Imgui install path, and make it into a NetImgui project name
Expand All @@ -99,3 +106,5 @@ exit /b %errorlevel%
set NetImguiName=%NetImguiName:.=_%
set NetImguiName=ProjectCompatibility_%NetImguiName%
exit /b 0


5 changes: 4 additions & 1 deletion Build/netImgui.sharpmake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public override void ConfigureAll(Configuration conf, NetImguiTarget target)
}

// Test compiling netImgui with the Disabled Define
[Sharpmake.Generate] public class ProjectNetImgui_Disabled : ProjectNetImgui {
[Sharpmake.Generate] public class ProjectNetImgui_Disabled : ProjectNetImgui
{
public ProjectNetImgui_Disabled() : base(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath)) { Name = "NetImguiLib (Disabled)"; }

public override void ConfigureAll(Configuration conf, NetImguiTarget target)
Expand Down Expand Up @@ -148,6 +149,7 @@ public override void ConfigureAll(Configuration conf, NetImguiTarget target)
// Standard samples
//-------------------------------------------------------------------------
[Sharpmake.Generate] public class ProjectSample_Basic : ProjectSample { public ProjectSample_Basic() : base("SampleBasic"){} }
[Sharpmake.Generate] public class ProjectSample_FontDPI : ProjectSample { public ProjectSample_FontDPI() : base("SampleFontDPI"){} }
[Sharpmake.Generate] public class ProjectSample_DualUI : ProjectSample { public ProjectSample_DualUI() : base("SampleDualUI"){} }
[Sharpmake.Generate] public class ProjectSample_Textures : ProjectSample { public ProjectSample_Textures() : base("SampleTextures"){} }
[Sharpmake.Generate] public class ProjectSample_NewFrame : ProjectSample { public ProjectSample_NewFrame() : base("SampleNewFrame"){} }
Expand Down Expand Up @@ -277,6 +279,7 @@ public static void AddSampleProjects(Configuration conf, NetImguiTarget target)
{
string SolutionFolder = "Samples";
conf.AddProject<ProjectSample_Basic>(target, false, SolutionFolder);
conf.AddProject<ProjectSample_FontDPI>(target, false, SolutionFolder);
conf.AddProject<ProjectSample_DualUI>(target, false, SolutionFolder);
conf.AddProject<ProjectSample_NewFrame>(target, false, SolutionFolder);
conf.AddProject<ProjectSample_Compression>(target, false, SolutionFolder);
Expand Down
2 changes: 1 addition & 1 deletion Build/shared.sharpmake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public virtual void ConfigureAll(Configuration conf, NetImguiTarget target)
conf.Output = mIsExe ? Project.Configuration.OutputType.Exe : Project.Configuration.OutputType.Lib;

conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends");

conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
if ( target.Compiler == Compiler.Clang ){
conf.Options.Add(Options.Vc.General.PlatformToolset.ClangCL);
conf.AdditionalCompilerOptions.Add("-Wno-unused-command-line-argument"); //Note: Latest Clang doesn't support '/MP' (multiprocessor build) option, creating a compile error
Expand Down
34 changes: 21 additions & 13 deletions Code/Client/NetImgui_Api.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
//! @Name : NetImgui
//=================================================================================================
//! @author : Sammy Fatnassi
//! @date : 2023/05/04
//! @version : v1.9
//! @date : 2023/12/2
//! @version : v1.9.7
//! @Details : For integration info : https://github.com/sammyfreg/netImgui/wiki
//=================================================================================================
#define NETIMGUI_VERSION "1.9" // Version Release 1.9
#define NETIMGUI_VERSION_NUM 10900
#define NETIMGUI_VERSION "1.9.7" // Update to samples, texture creation fix
#define NETIMGUI_VERSION_NUM 10907



Expand Down Expand Up @@ -108,9 +108,16 @@ namespace NetImgui
//=================================================================================================
// List of texture format supported
//=================================================================================================
enum eTexFormat {
kTexFmtA8,
kTexFmtRGBA8,
enum eTexFormat {
kTexFmtA8,
kTexFmtRGBA8,

// Support of 'user defined' texture format.
// Implementation must be added on both client and Server code.
// Search for TEXTURE_CUSTOM_SAMPLE for example implementation.
kTexFmtCustom,

//
kTexFmt_Count,
kTexFmt_Invalid=kTexFmt_Count
};
Expand All @@ -125,9 +132,10 @@ enum eCompressionMode {
};

//-------------------------------------------------------------------------------------------------
// Thread start function
// Function typedefs
//-------------------------------------------------------------------------------------------------
typedef void ThreadFunctPtr(void threadedFunction(void* pClientInfo), void* pClientInfo);
typedef void (*ThreadFunctPtr)(void threadedFunction(void* pClientInfo), void* pClientInfo);
typedef void (*FontCreationFuncPtr)(float PreviousDPIScale, float NewDPIScale);

//=================================================================================================
// Initialize the Network Library
Expand Down Expand Up @@ -156,8 +164,8 @@ NETIMGUI_API void Shutdown();
// threadFunction : User provided function to launch new networking thread.
// Use 'DefaultStartCommunicationThread' by default (relying on 'std::thread').
//=================================================================================================
NETIMGUI_API bool ConnectToApp(const char* clientName, const char* serverHost, uint32_t serverPort=kDefaultServerPort, ThreadFunctPtr threadFunction=0);
NETIMGUI_API bool ConnectFromApp(const char* clientName, uint32_t clientPort=kDefaultClientPort, ThreadFunctPtr threadFunction=0);
NETIMGUI_API bool ConnectToApp(const char* clientName, const char* serverHost, uint32_t serverPort=kDefaultServerPort, ThreadFunctPtr threadFunction=0, FontCreationFuncPtr FontCreateFunction = 0);
NETIMGUI_API bool ConnectFromApp(const char* clientName, uint32_t clientPort=kDefaultClientPort, ThreadFunctPtr threadFunction=0, FontCreationFuncPtr FontCreateFunction = 0);

//=================================================================================================
// Request a disconnect from the NetImguiServer application
Expand All @@ -182,7 +190,7 @@ NETIMGUI_API bool IsConnectionPending(void);
NETIMGUI_API bool IsDrawing(void);

//=================================================================================================
// True when we are currently drawinf on the NetImguiServer application
// True when we are currently drawing on the NetImguiServer application
// Means that we are between NewFrame() and EndFrame() of drawing for remote application
//=================================================================================================
NETIMGUI_API bool IsDrawingRemote(void);
Expand All @@ -191,7 +199,7 @@ NETIMGUI_API bool IsDrawingRemote(void);
// Send an updated texture used by imgui, to the NetImguiServer application
// Note: To remove a texture, set pData to nullptr
//=================================================================================================
NETIMGUI_API void SendDataTexture(ImTextureID textureId, void* pData, uint16_t width, uint16_t height, eTexFormat format);
NETIMGUI_API void SendDataTexture(ImTextureID textureId, void* pData, uint16_t width, uint16_t height, eTexFormat format, uint32_t dataSize=0);

//=================================================================================================
// Start a new Imgui Frame and wait for Draws commands, using ImContext that was active on connect.
Expand Down
Loading
Loading