FreeBSD Bugzilla – Attachment 193977 Details for
Bug 228730
graphics/mandelbulber does not build with clang 6.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to unbreak mandelbulber build with clang 6.0
mandelbulber.patch (text/plain), 9.20 KB, created by
Don Lewis
on 2018-06-04 00:32:13 UTC
(
hide
)
Description:
patch to unbreak mandelbulber build with clang 6.0
Filename:
MIME Type:
Creator:
Don Lewis
Created:
2018-06-04 00:32:13 UTC
Size:
9.20 KB
patch
obsolete
>Index: graphics/mandelbulber/files/patch-src_Render3D.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_Render3D.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_Render3D.cpp (working copy) >@@ -0,0 +1,27 @@ >+--- src/Render3D.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/Render3D.cpp >+@@ -867,11 +867,11 @@ void *MainThread(void *ptr) >+ //---------- end of raytraced reflection >+ >+ unsigned short shadow16 = shadowOutput.R * 4096.0; >+- sRGB16 globalLight = { AO.R * 4096.0, AO.G * 4096.0, AO.B * 4096.0 }; >++ sRGB16 globalLight = { static_cast<unsigned short>(AO.R * 4096.0), static_cast<unsigned short>(AO.G * 4096.0), static_cast<unsigned short>(AO.B * 4096.0) }; >+ unsigned short shade16 = shade.R * 4096.0; >+- sRGB16 shadeAux16 = { shadeAux.R * 4096.0, shadeAux.G * 4096.0, shadeAux.B * 4096.0 }; >+- sRGB16 specularAux16 = { shadeAuxSpec.R * 4096.0, shadeAuxSpec.G * 4096.0, shadeAuxSpec.B * 4096.0 }; >+- sRGB16 reflection = { envMapping.R * 256.0, envMapping.G * 256.0, envMapping.B * 256.0 }; >++ sRGB16 shadeAux16 = { static_cast<unsigned short>(shadeAux.R * 4096.0), static_cast<unsigned short>(shadeAux.G * 4096.0), static_cast<unsigned short>(shadeAux.B * 4096.0) }; >++ sRGB16 specularAux16 = { static_cast<unsigned short>(shadeAuxSpec.R * 4096.0), static_cast<unsigned short>(shadeAuxSpec.G * 4096.0), static_cast<unsigned short>(shadeAuxSpec.B * 4096.0) }; >++ sRGB16 reflection = { static_cast<unsigned short>(envMapping.R * 256.0), static_cast<unsigned short>(envMapping.G * 256.0), static_cast<unsigned short>(envMapping.B * 256.0) }; >+ >+ if (!image->IsLowMemMode()) >+ { >+@@ -913,7 +913,7 @@ void *MainThread(void *ptr) >+ //------------- render 3D background >+ background = TexturedBackground(¶m, viewVector); >+ >+- sRGB16 background16 = { background.R * 65536.0, background.G * 65536.0, background.B * 65536.0 }; >++ sRGB16 background16 = { static_cast<unsigned short>(background.R * 65536.0), static_cast<unsigned short>(background.G * 65536.0), static_cast<unsigned short>(background.B * 65536.0) }; >+ pixelData.backgroundBuf16 = background16; >+ >+ if (!image->IsLowMemMode()) > >Property changes on: graphics/mandelbulber/files/patch-src_Render3D.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/mandelbulber/files/patch-src_cimage.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_cimage.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_cimage.cpp (working copy) >@@ -0,0 +1,20 @@ >+--- src/cimage.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/cimage.cpp >+@@ -159,7 +159,7 @@ sRGB16 cImage::CalculatePixel(sComplexImage &pixel, un >+ + adj.globalIlum * pixel.ambientBuf16.B / 4096.0 + pixel.auxLight.B / 4096.0) + jasSuma2 * mLightB + pixel.auxSpecular.B / 4096.0) * 65536.0; >+ } >+ >+- sRGB col = { R, G, B }; >++ sRGB col = { static_cast<unsigned short>(R), static_cast<unsigned short>(G), static_cast<unsigned short>(B) }; >+ if (sw.fogEnabled) >+ { >+ col = PostRendering_Fog(zBuf, fogVisFront, fogVisBack + fogVisFront, ecol.fogColor, col); >+@@ -250,7 +250,7 @@ sRGB16 cImage::CalculateAmbientPixel(sRGB16 ambient16, >+ if(newG > 65535) newG = 65535; >+ if(newB > 65535) newB = 65535; >+ >+- sRGB16 newPixel = {newR, newG, newB}; >++ sRGB16 newPixel = {static_cast<unsigned short>(newR), static_cast<unsigned short>(newG), static_cast<unsigned short>(newB)}; >+ //sRGB16 newPixel = {color.R, color.G, color.B}; >+ return newPixel; >+ } > >Property changes on: graphics/mandelbulber/files/patch-src_cimage.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/mandelbulber/files/patch-src_image.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_image.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_image.cpp (working copy) >@@ -0,0 +1,20 @@ >+--- src/image.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/image.cpp >+@@ -373,7 +373,7 @@ void ThreadSSAO(void *ptr) >+ >+ } >+ >+- sRGB16 ambient = { total_ambient * 4096.0, total_ambient * 4096.0, total_ambient * 4096.0 }; >++ sRGB16 ambient = { static_cast<unsigned short>(total_ambient * 4096.0), static_cast<unsigned short>(total_ambient * 4096.0), static_cast<unsigned short>(total_ambient * 4096.0) }; >+ if (!image->IsLowMemMode()) image->PutPixelAmbient(x, y, ambient); >+ else >+ { >+@@ -567,7 +567,7 @@ void DrawPalette(sRGB *palette) >+ { >+ int number = (int) (i * 256.0 / colWidth + paletteOffset * 256.0); >+ sRGB color = mainImage.IndexToColour(number); >+- GdkColor gdk_color = { 0, color.R * 256, color.G * 256, color.B * 256 }; >++ GdkColor gdk_color = { 0, static_cast<unsigned short>(color.R * 256), static_cast<unsigned short>(color.G * 256), static_cast<unsigned short>(color.B * 256) }; >+ gdk_gc_set_rgb_fg_color(GC, &gdk_color); >+ gdk_draw_line(dareaPalette->window, GC, i, 0, i, 30); >+ } > >Property changes on: graphics/mandelbulber/files/patch-src_image.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/mandelbulber/files/patch-src_interface.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_interface.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_interface.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- src/interface.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/interface.cpp >+@@ -1931,7 +1931,7 @@ void CreateInterface(sParamRender *default_settings) >+ >+ Interface.label_NavigatorEstimatedDistance = gtk_label_new("Estimated distance to the surface:"); >+ >+- Interface.label_about = gtk_label_new("Mandelbulber "MANDELBULBER_VERSION_STR"\n" >++ Interface.label_about = gtk_label_new("Mandelbulber " MANDELBULBER_VERSION_STR "\n" >+ "author: Krzysztof Marczak\n" >+ "Licence: GNU GPL v3\n" >+ "www: http://sites.google.com/site/mandelbulber/home\n" > >Property changes on: graphics/mandelbulber/files/patch-src_interface.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/mandelbulber/files/patch-src_netrender.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_netrender.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_netrender.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- src/netrender.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/netrender.cpp >+@@ -88,7 +88,7 @@ bool CNetRender::SetServer(char *portNo, char *statusO >+ sizeof(timeout)) < 0) >+ std::cout << "socket options error " << strerror(errno); >+ >+- status = bind(socketfd, host_info_list->ai_addr, host_info_list->ai_addrlen); >++ status = ::bind(socketfd, host_info_list->ai_addr, host_info_list->ai_addrlen); >+ if (status == -1) >+ { >+ std::cout << "bind error" << std::endl ; > >Property changes on: graphics/mandelbulber/files/patch-src_netrender.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/mandelbulber/files/patch-src_shaders.cpp >=================================================================== >--- graphics/mandelbulber/files/patch-src_shaders.cpp (nonexistent) >+++ graphics/mandelbulber/files/patch-src_shaders.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- src/shaders.cpp.orig 2012-12-02 16:22:54 UTC >++++ src/shaders.cpp >+@@ -822,7 +822,7 @@ void PostRenderingLights(cImage *image, sParamRender * >+ if (newG > 65535) newG = 65535; >+ if (newB > 65535) newB = 65535; >+ >+- sRGB16 pixel = { newR, newG, newB }; >++ sRGB16 pixel = { static_cast<unsigned short>(newR), static_cast<unsigned short>(newG), static_cast<unsigned short>(newB) }; >+ int alpha = oldAlpha + bright * 65536; >+ if (alpha > 65535) alpha = 65535; >+ > >Property changes on: graphics/mandelbulber/files/patch-src_shaders.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228730
: 193977