VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NetImgui_Config.h
Go to the documentation of this file.
1 #pragma once
2 
3 //=================================================================================================
4 // Enable code compilation for this library
5 // Note: Useful to disable 'netImgui' on unsupported builds while keeping functions declared
6 //=================================================================================================
7 #ifndef NETIMGUI_ENABLED
8  #define NETIMGUI_ENABLED 1
9 #endif
10 
11 #if NETIMGUI_ENABLED
12 //=================================================================================================
13 // Set the path to 'imgui.h' used by your codebase here.
14 // Also suppress a few warnings imgui.h generates in 'warning All' (-Wall)
15 //=================================================================================================
16 #include <vrvImgui/imgui.h>
17 
18 // This test is only to reduce compile time when this header isn't needed
19 #ifdef NETIMGUI_INTERNAL_INCLUDE
20 #include "Private/NetImgui_WarningDisableImgui.h"
21 #include <imgui_internal.h>
22 #include "Private/NetImgui_WarningReenable.h"
23 #endif
24 
25 
26 #endif // NETIMGUI_ENABLED
27 
28 //=================================================================================================
29 // Port used by connect the Server and Client together
30 //=================================================================================================
31 namespace NetImgui
32 {
33 constexpr uint32_t kDefaultServerPort = 8888;
34 constexpr uint32_t kDefaultClientPort = 8889;
35 }
36 
37 //=================================================================================================
38 // Enable default Win32/Posix networking code
39 // Note: By default, netImgui uses Winsock on Windows and Posix sockets on other platforms
40 //
41 // The use your own code, turn off both NETIMGUI_WINSOCKET_ENABLED,
42 // NETIMGUI_POSIX_SOCKETS_ENABLED and provide your own implementation of the functions
43 // declared in 'NetImgui_Network.h'.
44 //=================================================================================================
45 #if !defined(NETIMGUI_WINSOCKET_ENABLED) && !defined(__UNREAL__)
46  #ifdef _WIN32
47  #define NETIMGUI_WINSOCKET_ENABLED 1 // Project needs 'ws2_32.lib' added to input libraries
48  #else
49  #define NETIMGUI_WINSOCKET_ENABLED 0
50  #endif
51 #endif
52 
53 #if !defined(NETIMGUI_POSIX_SOCKETS_ENABLED) && !defined(__UNREAL__)
54  #define NETIMGUI_POSIX_SOCKETS_ENABLED !(NETIMGUI_WINSOCKET_ENABLED)
55 #endif
56 
57 // Disable auto interception of ImGui::NewFrame() / ImGui::Render()
58 //#define NETIMGUI_IMGUI_CALLBACK_ENABLED 0
constexpr uint32_t kDefaultClientPort
Default port Client waits for a connection.
Definition: NetImgui_Config.h:34
constexpr uint32_t kDefaultServerPort
Default port Server waits for a connection.
Definition: NetImgui_Config.h:33

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)