Skip to content

Commit 59086d0

Browse files
committed
xrRender_GL: add blenders to build, fix linking libglew
1 parent 6ac703d commit 59086d0

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

src/Common/PlatformLinux.inl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,5 +940,22 @@ typedef struct _AVIINDEXENTRY {
940940

941941
typedef void *HIC;
942942

943+
#define D3DTA_SELECTMASK 0x0000000f
944+
#define D3DTA_DIFFUSE 0x00000000
945+
#define D3DTA_CURRENT 0x00000001
946+
#define D3DTA_TEXTURE 0x00000002
947+
#define D3DTA_TFACTOR 0x00000003
948+
#define D3DTA_SPECULAR 0x00000004
949+
#define D3DTA_TEMP 0x00000005
950+
#define D3DTA_CONSTANT 0x00000006
951+
#define D3DTA_COMPLEMENT 0x00000010
952+
#define D3DTA_ALPHAREPLICATE 0x00000020
953+
954+
#define D3DTSS_TCI_PASSTHRU 0x00000
955+
#define D3DTSS_TCI_CAMERASPACENORMAL 0x10000
956+
#define D3DTSS_TCI_CAMERASPACEPOSITION 0x20000
957+
#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
958+
#define D3DTSS_TCI_SPHEREMAP 0x40000
959+
943960
inline BOOL SwitchToThread() { return (0 == pthread_yield()); }
944961

src/Layers/xrRender/blenders/Blender.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ void CBlender_DESC::Setup(LPCSTR N)
2020

2121
xr_strcpy(cComputer, Core.CompName); // Computer
2222
#ifndef _EDITOR
23+
#if defined(WINDOWS) // TODO Implement for Linux
2324
_tzset();
2425
_time32((__time32_t*)&cTime); // Time
26+
#endif
2527
#else
2628
_tzset();
2729
time((long*)&cTime); // Time

src/Layers/xrRender/blenders/Blender_Palette.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
#include "Blender.h"
55

66
//////////////////////////////////////////////////////////////////////
7-
#include "blender_clsid.h"
7+
#include "Blender_CLSID.h"
88
IC bool p_sort(IBlender* A, IBlender* B) { return xr_stricmp(A->getComment(), B->getComment()) < 0; }
99
#ifdef __BORLANDC__
1010
#define TYPES_EQUAL(A, B) (typeid(A) == typeid(B))
1111
#else
12+
#if defined(WINDOWS)
1213
#define TYPES_EQUAL(A, B) (typeid(A).raw_name() == typeid(B).raw_name())
14+
#elif defined(LINUX)
15+
#define TYPES_EQUAL(A, B) (typeid(A).name() == typeid(B).name())
16+
#endif
1317
#endif
1418

1519
void IBlender::CreatePalette(xr_vector<IBlender*>& palette)

src/Layers/xrRenderPC_GL/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ project(xrRender_GL)
33
list(APPEND DIRS
44
"."
55
"../xrRender"
6+
"../xrRender/blenders"
67
"../xrRenderGL"
78
"../../Include/xrRender"
89
)
@@ -40,4 +41,4 @@ add_definitions(-DXRLCUTIL_EXPORTS -D_USRDLL -DXRRENDER_GL_EXPORTS -DUSE_OGL -DN
4041
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
4142

4243
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
43-
target_link_libraries(${PROJECT_NAME} xrCore luabind luajit xrCDB xrEngine xrParticles xrScriptEngine xrAPI)
44+
target_link_libraries(${PROJECT_NAME} xrCore luabind luajit xrCDB xrEngine xrParticles xrScriptEngine xrAPI GLEW)

0 commit comments

Comments
 (0)