Compare commits

...

2 Commits

Author SHA1 Message Date
0083f356f2 working on finishing 2026-02-11 16:31:11 +01:00
9cc6e9e9f5 working on finishing 2026-02-11 16:30:40 +01:00
5 changed files with 58 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
out
web
# Prerequisites
*.d

View File

@ -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

Binary file not shown.

View File

@ -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
View 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