@@ -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);
0 commit comments