-#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)
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
-#)
+)
\ No newline at end of file
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;