Cycles: fix crash with image texture nodes (on windows).

This commit is contained in:
Brecht Van Lommel
2011-07-01 14:57:48 +00:00
parent 4ff22bd097
commit d2c5549f8e
3 changed files with 8 additions and 6 deletions

View File

@@ -66,8 +66,11 @@ ADD_DEPENDENCIES(cycles_blender bf_rna)
IF(WIN32)
TARGET_LINK_LIBRARIES(cycles_blender ${PYTHON_LINKFLAGS})
TARGET_LINK_LIBRARIES(cycles_blender debug ${PYTHON_LIBRARIES}_d)
TARGET_LINK_LIBRARIES(cycles_blender optimized ${PYTHON_LIBRARIES})
FILE_LIST_SUFFIX(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
TARGET_LINK_LIBRARIES_DEBUG(cycles_blender "${PYTHON_LIBRARIES_DEBUG}")
TARGET_LINK_LIBRARIES_OPTIMIZED(cycles_blender "${PYTHON_LIBRARIES}")
UNSET(PYTHON_LIBRARIES_DEBUG)
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES PREFIX "lib")
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES SUFFIX ".pyd")
@@ -82,8 +85,7 @@ INSTALL(TARGETS cycles_blender LIBRARY DESTINATION ${CYCLES_INSTALL_PATH}/cycles
IF(WIN32)
FILE(GLOB OIIO_DLLS "${CYCLES_OIIO}/bin/*.dll")
FILE(GLOB BOOST_DLLS "${CYCLES_BOOST}/lib/*.dll")
INSTALL(FILES ${OIIO_DLLS} ${BOOST_DLLS}
INSTALL(FILES ${OIIO_DLLS}
DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
ENDIF()

View File

@@ -68,7 +68,7 @@ static void node_shader_exec_tex_environment(void *data, bNode *node, bNodeStack
if(ibuf) {
float u= (atan2f(vec[1], vec[0]) + (float)M_PI)/(2*M_PI);
float v= atan2f(vec[2], hypotf(vec[0], vec[1]))/M_PI + 0.5f;
float rgb[3];
float rgb[4];
ibuf_sample(ibuf, u, v, 0.0f, 0.0f, rgb);

View File

@@ -66,7 +66,7 @@ static void node_shader_exec_tex_image(void *data, bNode *node, bNodeStack **in,
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
if(ibuf) {
float rgb[3];
float rgb[4];
ibuf_sample(ibuf, vec[0], vec[1], 0.0f, 0.0f, rgb);