working on finishing
This commit is contained in:
parent
ebcf9910d2
commit
9cc6e9e9f5
8
Makefile
8
Makefile
@ -28,8 +28,8 @@ PLATFORM ?= PLATFORM_DESKTOP
|
||||
|
||||
LIBRAYLIB := libraylib.a
|
||||
|
||||
DISPLAY_WIDTH := 800
|
||||
DISPLAY_HEIGHT := 600
|
||||
DISPLAY_WIDTH ?= 800
|
||||
DISPLAY_HEIGHT ?= 600
|
||||
|
||||
WEB_OUTPUT_DIR := web
|
||||
WEB_OUTPUT := $(WEB_OUTPUT_DIR)/miniRT
|
||||
@ -146,10 +146,10 @@ $(OUT_DIR):
|
||||
$(OBJDIR):
|
||||
mkdir -p $(OBJDIR) $(OBJDIR)/$(SRCDIR) $(OBJDIR)/$(RENDERDIR) $(OBJDIR)/$(IODIR) $(OBJDIR)/$(UTILDIR) $(OBJDIR)/$(SCENEDIR)
|
||||
|
||||
vnc: clean clean_vnc all
|
||||
vnc: clean_vnc $(NAME) all
|
||||
$(VNC_SCRIPT) $(DISPLAY_WIDTH) $(DISPLAY_HEIGHT)
|
||||
|
||||
clean_vnc: clean
|
||||
clean_vnc:
|
||||
pkill -9 websockify || true
|
||||
pkill -9 Xvnc || true
|
||||
|
||||
|
||||
BIN
out/miniRT
Executable file
BIN
out/miniRT
Executable file
Binary file not shown.
@ -59,7 +59,7 @@
|
||||
// Use a partial-busy wait loop, in this case frame sleeps for most of the time, but then runs a busy loop at the end for accuracy
|
||||
#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1
|
||||
// Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
|
||||
#define SUPPORT_SCREEN_CAPTURE 1
|
||||
//#define SUPPORT_SCREEN_CAPTURE 1
|
||||
// Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
|
||||
#define SUPPORT_GIF_RECORDING 1
|
||||
// Support CompressData() and DecompressData() functions
|
||||
|
||||
50
scripts/run_vnc.sh
Executable file
50
scripts/run_vnc.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
NOVNC=""
|
||||
|
||||
XVNC=Xvnc
|
||||
XVNC_HOST=0.0.0.0
|
||||
XVNC_PORT=5901
|
||||
|
||||
DISPLAY_WIDTH=$1
|
||||
DISPLAY_HEIGHT=$2
|
||||
|
||||
DISPLAY=:69
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: run_vnc.sh <width> <height>"
|
||||
}
|
||||
|
||||
if command -v novnc_proxy &> /dev/null; then
|
||||
NOVNC=novnc_proxy
|
||||
elif command -v novnc &> /dev/null; then
|
||||
NOVNC=novnc
|
||||
else
|
||||
echo "noVNC (novnc_proxy || novnc) not found! Aborting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v Xvnc &> /dev/null; then
|
||||
echo "Xvnc not found! Aborting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$DISPLAY_WIDTH" = "" || "$DISPLAY_HEIGHT" = "" ]] ; then
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$XVNC ${DISPLAY} \
|
||||
-geometry ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} \
|
||||
-depth 24 \
|
||||
-SecurityTypes None \
|
||||
-interface $XVNC_HOST \
|
||||
-rfbport $XVNC_PORT &
|
||||
|
||||
sleep 2
|
||||
|
||||
$NOVNC --vnc localhost:${XVNC_PORT} --listen 7080 &
|
||||
|
||||
sleep 2
|
||||
|
||||
exec ./out/miniRT
|
||||
Loading…
x
Reference in New Issue
Block a user