Export netimgui files in MuJoCo Copybara configuration for use with the upcoming Web Viewer
PiperOrigin-RevId: 954769526 Change-Id: I4cdee083082f7d55c2babd5e664ec0283a2aaf63
This commit is contained in:
committed by
Copybara-Service
parent
c7b6e0b8dd
commit
ca5337161d
@@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
|
||||
//=================================================================================================
|
||||
// Enable code compilation for this library
|
||||
// Note: Useful to disable 'netImgui' on unsupported builds while keeping
|
||||
// functions declared
|
||||
//=================================================================================================
|
||||
#ifndef NETIMGUI_ENABLED
|
||||
#define NETIMGUI_ENABLED 1
|
||||
#endif
|
||||
|
||||
#if NETIMGUI_ENABLED
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#ifdef NETIMGUI_INTERNAL_INCLUDE
|
||||
#include <imgui_internal.h> // Only needed when compiling NetImgui, not when using the NetImgui Api
|
||||
|
||||
#include "Private/NetImgui_WarningDisableImgui.h" // Disable some extra warning generated by imgui_internal in '-Wall'
|
||||
#include "Private/NetImgui_WarningReenable.h"
|
||||
#endif
|
||||
|
||||
#endif // NETIMGUI_ENABLED
|
||||
|
||||
//=================================================================================================
|
||||
// Default Ports used to reach the Server or the Client (listen port for
|
||||
// incoming connection)
|
||||
//=================================================================================================
|
||||
namespace NetImgui {
|
||||
enum Constants {
|
||||
kDefaultServerPort = 8888, //!< Default port Server waits for a connection
|
||||
kDefaultClientPort = 8889 //!< Default port Client waits for a connection
|
||||
};
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
// Enable default Win32/Posix networking code
|
||||
// Note: By default, netImgui uses Winsock on Windows and Posix sockets
|
||||
// on other platforms
|
||||
//
|
||||
// The use your own code, turn off both
|
||||
//NETIMGUI_WINSOCKET_ENABLED, NETIMGUI_POSIX_SOCKETS_ENABLED and provide your
|
||||
//own implementation of the functions declared in 'NetImgui_Network.h'.
|
||||
//
|
||||
// As an example, 'SampleCompression' disable default com
|
||||
//implementation and use its own
|
||||
//=================================================================================================
|
||||
#if !defined(NETIMGUI_WINSOCKET_ENABLED) && !defined(__UNREAL__)
|
||||
#ifdef _WIN32
|
||||
#define NETIMGUI_WINSOCKET_ENABLED \
|
||||
1 // Project needs 'ws2_32.lib' added to input libraries
|
||||
#else
|
||||
#define NETIMGUI_WINSOCKET_ENABLED 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(NETIMGUI_POSIX_SOCKETS_ENABLED) && !defined(__UNREAL__)
|
||||
#define NETIMGUI_POSIX_SOCKETS_ENABLED !(NETIMGUI_WINSOCKET_ENABLED)
|
||||
#endif
|
||||
|
||||
//=================================================================================================
|
||||
// Various build settings define
|
||||
// Note: for more information, please look in 'NetImgui_Api.h' for description
|
||||
// and default values
|
||||
//=================================================================================================
|
||||
// #define NETIMGUI_IMGUI_CALLBACK_ENABLED (IMGUI_VERSION_NUM >=
|
||||
// 18100) // Not supported pre Dear ImGui 1.81 #define
|
||||
// NETIMGUI_FORCE_TCP_LISTEN_BINDING 0
|
||||
// // Doesn't seem to be needed on Window/Linux #define NETIMGUI_API
|
||||
// IMGUI_API // Use same value as
|
||||
// defined by Dear ImGui by default
|
||||
Reference in New Issue
Block a user