Skip to content

Commit 751d09b

Browse files
author
Roderick Kennedy
committed
Linux build fixes.
1 parent 93f42af commit 751d09b

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

Applications/Sfx/Sfx.ypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3484,7 +3484,7 @@ shader_def : SHADER_COMMAND '(' shader_compile_or_instance ')' ';'
34843484
{
34853485
string shaderInstanceNames=$3.strs[0];
34863486
vector<string> shaderInstances;
3487-
for(const auto const &i:$3.children)
3487+
for(const auto &i:$3.children)
34883488
{
34893489
shaderInstances.push_back(i.strs[0]);
34903490
}

CMake/Include.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_guard()
22

3-
set( PLATFORM_CPP_VERSION 17 CACHE STRING "Set the C++ version to compile." )
3+
set( PLATFORM_CPP_VERSION 20 CACHE STRING "Set the C++ version to compile." )
44
set( CMAKE_CXX_STANDARD_REQUIRED ON )
55
set( CMAKE_CXX_EXTENSIONS ON )
66
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

CrossPlatform/SphereRenderer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void SphereRenderer::DrawLatLongSphere(GraphicsDeviceContext &deviceContext,int
139139
crossplatform::GetCameraPosVector(deviceContext.viewStruct.view,(float*)&cam_pos,(float*)&view_dir);
140140
crossplatform::EffectTechnique* tech =effect->GetTechniqueByName("draw_lat_long_sphere");
141141

142-
sphereConstants.sphereCamPos =cam_pos;
142+
sphereConstants.sphereCamPos =*(vec3*)&cam_pos;
143143
sphereConstants.latitudes =lat;
144144
sphereConstants.longitudes =longt;
145145
static int loop=100;
@@ -229,7 +229,7 @@ void SphereRenderer::DrawColouredSphere(GraphicsDeviceContext &deviceContext, ve
229229
// sphereConstants.quaternion =orient_quat;
230230
sphereConstants.radius = sph_rad;
231231
sphereConstants.debugColour = clr;
232-
sphereConstants.sphereCamPos = cam_pos;
232+
sphereConstants.sphereCamPos = *(vec3 *)&cam_pos;
233233
sphereConstants.debugViewDir = view_dir;
234234
sphereConstants.multiplier = vec4(1.0f, 1.0f, 1.0f, 1.0f);
235235
renderPlatform->SetConstantBuffer(deviceContext, &sphereConstants);
@@ -266,7 +266,7 @@ void SphereRenderer::DrawTexturedSphere(GraphicsDeviceContext &deviceContext,vec
266266
//sphereConstants.quaternion =orient_quat;
267267
sphereConstants.radius =sph_rad;
268268
sphereConstants.debugColour =clr;
269-
sphereConstants.sphereCamPos =cam_pos;
269+
sphereConstants.sphereCamPos =*(vec3*)&cam_pos;
270270
sphereConstants.debugViewDir =view_dir;
271271
sphereConstants.multiplier =vec4(1.0f, 1.0f, 1.0f, 1.0f);
272272
renderPlatform->SetConstantBuffer(deviceContext,&sphereConstants);

Math/Noise3D.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "Platform/Math/Noise3D.h"
66
#include "Platform/Math/RandomNumberGenerator.h"
77
#include "Platform/Core/MemoryInterface.h"
8+
#include <math.h>
89

910
using namespace platform::math;
1011

0 commit comments

Comments
 (0)