Allow filling paths and do some clean up/fixing.

This commit is contained in:
Thomas Geymayer 2012-06-07 00:11:10 +02:00
parent 99b00daf87
commit 05c107ba9c
2 changed files with 16 additions and 19 deletions

View File

@ -1,12 +1,14 @@
#SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
include(CheckIncludeFile)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
ADD_DEFINITIONS(
-DVG_API_EXPORT
-DHAVE_INTTYPES_H
)
if(HAVE_INTTYPES_H)
add_definitions(-DHAVE_INTTYPES_H)
endif()
add_definitions(-DVG_API_EXPORT)
INCLUDE_DIRECTORIES(
${OPENGL_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
../include
)
SET(INCROOT ../include/VG)
@ -43,11 +45,4 @@ TARGET_LINK_LIBRARIES(
ShivaVG
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
)
#INSTALL(
# TARGETS OpenVG
# RUNTIME DESTINATION bin COMPONENT bin
# LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT bin
# ARCHIVE DESTINATION lin${LIB_SUFFIX} COMPONENT devel
#)
)

View File

@ -317,21 +317,23 @@ VGU_API_CALL VGUErrorCode vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
VGfloat *matrix)
{
/* Basic idea taken from the reference implementation */
VGfloat mat[3][3];
VGfloat det, det00, det01, det02;
if( !matrix )
return VGU_ILLEGAL_ARGUMENT_ERROR;
VGfloat mat[3][3];
if( vguComputeWarpSquareToQuad( sx0, sy0, sx1, sy1, sx2, sy2, sx3, sy3,
(VGfloat*)mat )
== VGU_BAD_WARP_ERROR )
return VGU_BAD_WARP_ERROR;
// Invert the matrix...
VGfloat det00 = mat[1][1]*mat[2][2] - mat[2][1]*mat[1][2];
VGfloat det01 = mat[2][0]*mat[1][2] - mat[1][0]*mat[2][2];
VGfloat det02 = mat[1][0]*mat[2][1] - mat[2][0]*mat[1][1];
det00 = mat[1][1]*mat[2][2] - mat[2][1]*mat[1][2];
det01 = mat[2][0]*mat[1][2] - mat[1][0]*mat[2][2];
det02 = mat[1][0]*mat[2][1] - mat[2][0]*mat[1][1];
VGfloat det = mat[0][0]*det00 + mat[0][1]*det01 + mat[0][2]*det02;
det = mat[0][0]*det00 + mat[0][1]*det01 + mat[0][2]*det02;
if( det == 0.0f )
return VGU_BAD_WARP_ERROR;