Roland Posted January 2, 2010 Share Posted January 2, 2010 To get rid of this type of warnings cpp\renderer.cpp(457) : warning C4244: 'argument' : conversion from 'double' to 'flt', possible loss of data following lines needs to be changed in Renderer.cpp Renderer.cpp 457 ScaleEntity( skybox, Vec3(farrange/2.0f) ); Renderer.cpp 798-800 SetShaderFloat(postfilter,"saturation",(flt)saturation); SetShaderFloat(postfilter,"brightness",(flt)brightness); SetShaderFloat(postfilter,"contrast",(flt)contrast); Renderer.cpp 1085 SetColor(Vec4(1,1,1,(flt)irisadjustmentspeed*AppSpeed())); 1 Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Canardia Posted January 2, 2010 Share Posted January 2, 2010 I don't know why you get warning messages, because I don't get any. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Roland Posted January 2, 2010 Author Share Posted January 2, 2010 (edited) I don't know why you get warning messages, because I don't get any. Mayby your are 'cheating' by having this line at top.. #pragma warning(disable:4244) or maybe some compiler setting Edited January 2, 2010 by Roland Strålberg Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Canardia Posted January 2, 2010 Share Posted January 2, 2010 I don't disable type conversion warnings, but make the code so that it has no type conversions. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Marleys Ghost Posted January 2, 2010 Share Posted January 2, 2010 I don't disable type conversion warnings, but make the code so that it has no type conversions. Isn't that what Roland's post was giving instructions for? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
afecelis Posted January 3, 2010 Share Posted January 3, 2010 I'm getting those warnings, I'll try your fixes. Thanks for pointing them out Roland. Quote Win8.1 Pro X64/ Intel core I7 @ 3.5GHz / 32GB DDR3 SDRAM / GeForce GTX 660+760/ VC++ Express 2013/ Blender /Unwrap3dpro3 /Modo 8 Link to comment Share on other sites More sharing options...
Canardia Posted January 3, 2010 Share Posted January 3, 2010 Ok, I found the reason why Roland gets those warnings. He is using Framewerk directly, and not via gamelib. When I tried to make a new project which had the Framewerk files directly included as source, then I got those warnings too. I'll fix those warnings and send Josh the updated files. EDIT: Sent new renderer.cpp to Josh Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.