Skip to content

Commit

Permalink
xrRender_GL: add blenders to build, fix linking libglew
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Sep 29, 2018
1 parent 6ac703d commit 59086d0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
17 changes: 17 additions & 0 deletions src/Common/PlatformLinux.inl
Original file line number Diff line number Diff line change
Expand Up @@ -940,5 +940,22 @@ typedef struct _AVIINDEXENTRY {

typedef void *HIC;

#define D3DTA_SELECTMASK 0x0000000f
#define D3DTA_DIFFUSE 0x00000000
#define D3DTA_CURRENT 0x00000001
#define D3DTA_TEXTURE 0x00000002
#define D3DTA_TFACTOR 0x00000003
#define D3DTA_SPECULAR 0x00000004
#define D3DTA_TEMP 0x00000005
#define D3DTA_CONSTANT 0x00000006
#define D3DTA_COMPLEMENT 0x00000010
#define D3DTA_ALPHAREPLICATE 0x00000020

#define D3DTSS_TCI_PASSTHRU 0x00000
#define D3DTSS_TCI_CAMERASPACENORMAL 0x10000
#define D3DTSS_TCI_CAMERASPACEPOSITION 0x20000
#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
#define D3DTSS_TCI_SPHEREMAP 0x40000

inline BOOL SwitchToThread() { return (0 == pthread_yield()); }

2 changes: 2 additions & 0 deletions src/Layers/xrRender/blenders/Blender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ void CBlender_DESC::Setup(LPCSTR N)

xr_strcpy(cComputer, Core.CompName); // Computer
#ifndef _EDITOR
#if defined(WINDOWS) // TODO Implement for Linux
_tzset();
_time32((__time32_t*)&cTime); // Time
#endif
#else
_tzset();
time((long*)&cTime); // Time
Expand Down
6 changes: 5 additions & 1 deletion src/Layers/xrRender/blenders/Blender_Palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
#include "Blender.h"

//////////////////////////////////////////////////////////////////////
#include "blender_clsid.h"
#include "Blender_CLSID.h"
IC bool p_sort(IBlender* A, IBlender* B) { return xr_stricmp(A->getComment(), B->getComment()) < 0; }
#ifdef __BORLANDC__
#define TYPES_EQUAL(A, B) (typeid(A) == typeid(B))
#else
#if defined(WINDOWS)
#define TYPES_EQUAL(A, B) (typeid(A).raw_name() == typeid(B).raw_name())
#elif defined(LINUX)
#define TYPES_EQUAL(A, B) (typeid(A).name() == typeid(B).name())
#endif
#endif

void IBlender::CreatePalette(xr_vector<IBlender*>& palette)
Expand Down
3 changes: 2 additions & 1 deletion src/Layers/xrRenderPC_GL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(xrRender_GL)
list(APPEND DIRS
"."
"../xrRender"
"../xrRender/blenders"
"../xrRenderGL"
"../../Include/xrRender"
)
Expand Down Expand Up @@ -40,4 +41,4 @@ add_definitions(-DXRLCUTIL_EXPORTS -D_USRDLL -DXRRENDER_GL_EXPORTS -DUSE_OGL -DN
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})

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

0 comments on commit 59086d0

Please sign in to comment.