Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 03:34

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 08.02.2023, 02:35 
Offline

Joined: 02.01.2017, 02:59
Posts: 24
Here's my .dll build script for building in winXP, using VMWare player.
Before install VM tools (the VM drivers) set the VM hardware compatibility to "Workstation 10" (no directx 10, etc)
Menu -> VM -> Manage -> Change hardware compatibility...
cmake 3.13.5

It's kinda hacky but works okay... it builds 4 dirs
debug and release
VM (VM_2GL_HACK_ON on)
Native (VM_2GL_HACK_ON off)
Virtual Box removed 3D support for winXP in v6.1, so I haven't tested it.


Code:
echo off
cls
REM NOTES
REM https://github.com/MNRK01/myGCCBuilds/releases/tag/12.2.0
REM i686-12.2.0-release-posix-sjlj-rt_v10-rev0.7z multilib
REM Some useful info
REM https://mingwpy.github.io/background-mingw.html
REM https://stat.ethz.ch/pipermail/r-sig-windows/2015q3/000020.html
echo.
echo --- setup info ---
echo GCC
echo https://github.com/niXman/mingw-builds-binaries/releases/tag/12.2.0-rt_v10-rev2
echo file: i686-12.2.0-release-win32-dwarf-msvcrt-rt_v10-rev2.7z
echo extracted to: C:\mingw-w64-12.2.msvcrt-dwarf-i686 and path set etc
echo libstdc++-6.dll must also be copied from the compiler to your executable location.
echo.
echo.
echo SDL2
echo https://github.com/libsdl-org/SDL/releases/tag/release-2.26.2
echo file: SDL2-devel-2.26.2-mingw.zip
echo extract to: C:\SDL2-devel-2.26.2-mingw
echo.
echo.
pause
echo.
echo VM_2GL_HACK_ON
echo VM OpenGL on windows XP (VMware) is very limited, supporting up to GL2.1 with GL3 at 43% support :/
echo and a few extensions, one that isn't is ARB_texture_rg which is
echo used by H3D. This must be ignored if it's not available,
echo comment out line egRendererBaseGL2.cpp:382 & 3
echo.
                                                                       
copy /Y C:\SDL2-devel-2.26.2-mingw\SDL2-2.26.2\i686-w64-mingw32\bin\SDL2.dll  Binaries\Windows\Debug                                                                   
pause

echo --- winxp VM builds ---
echo.
echo winxp-vm-gl2-release
mkdir winxp-vm-gl2-release
cd winxp-vm-gl2-release
echo.
cmake .. -G "MinGW Makefiles"   -DHORDE3D_BUILD_EXAMPLES=ON  -DHORDE3D_USE_GLFW=OFF -DHORDE3D_USE_SDL=ON -DHORDE3D_FORCE_DOWNLOAD_SDL=OFF  -DCMAKE_MAKE_PROGRAM=make -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"  -DSDL2_INCLUDE_DIR=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/include/SDL2 -DSDL2_LIBRARY:STRING=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/lib/libSDL2.dll.a -DCMAKE_CXX_FLAGS="-fpermissive -DVM_2GL_HACK_ON" -DHORDE3D_USE_GL4=OFF  -DCMAKE_BUILD_TYPE=Release

echo.
pause
make
pause
echo.
copy /Y C:\SDL2-devel-2.26.2-mingw\SDL2-2.26.2\i686-w64-mingw32\bin\SDL2.dll Binaries\Windows\Release
cd ..

echo winxp-vm-gl2-debug
mkdir winxp-vm-gl2-debug
cd winxp-vm-gl2-debug

cmake .. -G "MinGW Makefiles"   -DHORDE3D_BUILD_EXAMPLES=ON  -DHORDE3D_USE_GLFW=OFF -DHORDE3D_USE_SDL=ON -DHORDE3D_FORCE_DOWNLOAD_SDL=OFF  -DCMAKE_MAKE_PROGRAM=make -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"  -DSDL2_INCLUDE_DIR=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/include/SDL2 -DSDL2_LIBRARY:STRING=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/lib/libSDL2.dll.a -DCMAKE_CXX_FLAGS="-fpermissive -DVM_2GL_HACK_ON" -DHORDE3D_USE_GL4=OFF -DCMAKE_BUILD_TYPE=Debug
echo.
pause 
make
pause
echo.
copy /Y C:\SDL2-devel-2.26.2-mingw\SDL2-2.26.2\i686-w64-mingw32\bin\SDL2.dll  Binaries\Windows\Debug 
cd ..

echo --- winxp hardware builds ---



echo winxp-release
mkdir winxp-release
cd winxp-release
cmake .. -G "MinGW Makefiles"   -DHORDE3D_BUILD_EXAMPLES=ON  -DHORDE3D_USE_GLFW=OFF -DHORDE3D_USE_SDL=ON -DHORDE3D_FORCE_DOWNLOAD_SDL=OFF  -DCMAKE_MAKE_PROGRAM=make -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"  -DSDL2_INCLUDE_DIR=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/include/SDL2 -DSDL2_LIBRARY:STRING=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/lib/libSDL2.dll.a -DCMAKE_CXX_FLAGS="-fpermissive"  -DCMAKE_BUILD_TYPE=Release
echo.
pause
make
pause
echo.
copy /Y C:\SDL2-devel-2.26.2-mingw\SDL2-2.26.2\i686-w64-mingw32\bin\SDL2.dll Binaries\Windows\Release
cd ..

winxp-debug
mkdir winxp-debug
cd winxp-debug
cmake .. -G "MinGW Makefiles"   -DHORDE3D_BUILD_EXAMPLES=ON  -DHORDE3D_USE_GLFW=OFF -DHORDE3D_USE_SDL=ON -DHORDE3D_FORCE_DOWNLOAD_SDL=OFF  -DCMAKE_MAKE_PROGRAM=make -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"  -DSDL2_INCLUDE_DIR=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/include/SDL2 -DSDL2_LIBRARY:STRING=C:/SDL2-devel-2.26.2-mingw/SDL2-2.26.2/i686-w64-mingw32/lib/libSDL2.dll.a -DCMAKE_CXX_FLAGS="-fpermissive"   -DCMAKE_BUILD_TYPE=Debug

echo.
pause
make
pause
echo.
copy /Y C:\SDL2-devel-2.26.2-mingw\SDL2-2.26.2\i686-w64-mingw32\bin\SDL2.dll Binaries\Windows\Debug
cd ..




I'm not sure what the ARB_texture_rg does, but it effects Chicago's background, (deferred rendering only) looks like it's not clearing it.

Looks like EXT_framebuffer_multisample is also used and not supported, but it's not an issue running the samples.

To use the dll's I use tcc (tiny C Compiler)
create dll def files first:
tcc -impdef -v SDL2.dll
tcc -impdef -v libHorde3D.dll
tcc -impdef -v libHorde3DUtils.dll
tcc -impdef -v libstdc++-6.dll

CFLAGS are:
-Wall -Werror -g -I./includes -L. -lSDL2 -llibHorde3DUtils -llibHorde3D -lopengl32

It worked fine with the tutorial

GL report from my laptop
Attachment:
File comment: full report - running Linux (MX 21.3 AHS) NVidia RXT3060 laptop
VM-GL.txt [5.81 KiB]
Downloaded 988 times




You need to replace this function with the msvcrt friendly version:
In file utPlatform.h


Error: variable 'st rncpy' definition is marked dllimport
comment out the following
// #if (!defined( _MSC_VER ) || (defined( _MSC_VER ) && (_MSC_VER < 1400))) // && !defined( __MINGW32__ )
// # define strncpy_s( dst, dstSize, src, count ) strncpy( (dst), (src), ( ( (count) <= (dstSize) ) ? (count) : (dstSize) ) )
// #endif

add this to the top of the header:

#ifndef _utPlatform_H_
#define _utPlatform_H_

#if (!defined( _MSC_VER ) || (defined( _MSC_VER ) && (_MSC_VER < 1400))) // && !defined( __MINGW32__ )
#include <string.h>
# define strncpy_s( dst, dstSize, src, count ) strncpy( (dst), (src), ( ( (count) <= (dstSize) ) ? (count) : (dstSize) ) )
#endif


function:
inline float toFloat(const char* str)

#ifdef __MINGW32__
// return _atof_l(str, locale.get());

// _atof_l isn't in msvcrt
// from https://stackoverflow.com/questions/133 ... 34#1333534
{
float result = 0;
float sign = *str == '-' ? str++, -1 : 1;
while (*str >= '0' && *str <= '9') {
result *= 10;
result += *str - '0';
str++;
}
if (*str == ',' || *str == '.') {
str++;
float multiplier = 0.1;
while (*str >= '0' && *str <= '9') {
result += (*str - '0') * multiplier;
multiplier /= 10;
str++;
}
}
result *= sign;
if (*str == 'e' || *str == 'E') {
str++;
float powerer = *str == '-'? str++, 0.1 : 10;
float power = 0;
while (*str >= '0' && *str <= '9') {
power *= 10;
power += *str - '0';
str++;
}
result *= pow(powerer, power);
}
return result;
}
// from https://stackoverflow.com/questions/133 ... 34#1333534


Attachments:
File comment: WinXP VMware GL support
GL-WINXP-VMWare.jpg
GL-WINXP-VMWare.jpg [ 67.81 KiB | Viewed 20686 times ]
File comment: VM looks like this
horde3d-WINXP-VMWare.jpg
horde3d-WINXP-VMWare.jpg [ 58.83 KiB | Viewed 20687 times ]


Last edited by gwald on 26.02.2023, 13:18, edited 5 times in total.
Top
 Profile  
Reply with quote  
PostPosted: 10.02.2023, 04:24 
Offline

Joined: 02.01.2017, 02:59
Posts: 24
I forgot, horde3d header in C is a PITA (not complaining ), had to remove the emu stuff, here's mine.


Also, I can recommend this compiler,
https://github.com/skeeto/w64devkit

winXP support works great! and the exe's also work great on newer windows also... tested on 64bit win7 & win10! and with no extra dll's required!!


Attachments:
File comment: horde3d header in C, had to zip it due to size limit
Horde3D.h.zip [18.65 KiB]
Downloaded 980 times
Top
 Profile  
Reply with quote  
PostPosted: 09.05.2023, 13:15 
Offline

Joined: 02.01.2017, 02:59
Posts: 24
I uploaded a video showing the modeller I use (mostly for playstation 3D) with my H3D 3D pipeline.
Obj export -> assimp to .dae -> H3D

https://youtu.be/TjLy36A94jo?t=1169


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group