SpeedTreeLib: port 40250 wrapper/forest verbatim over a CSpeedTreeRT stand-in

Delete the platform proxy tree renderer and copy SpeedTreeWrapper, SpeedTreeForest,
SpeedTreeForestDirectX8, SpeedTreeConfig.h and VertexShaders.h from 40250. The SDK
SpeedTreeRT.h public API becomes the shim; the closed CSpeedTreeRT is reimplemented in
platform/SpeedTreeLib/SpeedTreeRT.cpp (procedural geometry, static lighting, single LOD,
DIVERGENT). Shims gain the D3D8 vertex shader declaration tokens, D3D_OK,
CreateVertexShader/DeleteVertexShader, ID3DXBuffer/D3DXAssembleShader, MessageBox and
__min/__max.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-28 13:31:57 +09:00
co-authored by Claude Opus 5.5
parent 86e602cb32
commit d817bd7cab
19 changed files with 4373 additions and 1516 deletions
+15
View File
@@ -72,6 +72,21 @@ BOOL FindNextFile(HANDLE handle, WIN32_FIND_DATA* data);
BOOL FindClose(HANDLE handle);
void Sleep(DWORD milliseconds);
// MSVC <stdlib.h> __min / __max
#ifndef __min
#define __min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef __max
#define __max(a, b) (((a) > (b)) ? (a) : (b))
#endif
// user32 MessageBox (ANSI): no dialog on these hosts; writes caption and text to stderr, returns IDOK.
#define MB_OK 0x00000000L
#define MB_ICONHAND 0x00000010L
#define MB_ICONSTOP MB_ICONHAND
#define IDOK 1
int MessageBox(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
// winmm `timeGetTime`: milliseconds since system start, wrapping at 2^32.
DWORD timeGetTime();
DWORD GetTickCount();