Permalink
Browse files

"Port" of the [Open Asset Import library ("assimp")](http://assimp.so…

…urceforge.net) which can be used

to load 3D models, replacing the obj importer that I'd tried using previously. Example program has
been renamed from wfobj to assview. It builds but hasn't been tested, & doesn't really attempt to
do anything with the model yet.
  • Loading branch information...
1 parent 81f9abb commit 96feeea6e58ad50c6479eb4b813bd4d06babee8f @gzorin committed Sep 22, 2011
Showing with 1,834 additions and 2,674 deletions.
  1. +1 −1 Makefile.am
  2. +14 −3 Makefile.in
  3. +41 −0 aclocal.m4
  4. +151 −2 configure
  5. +23 −1 configure.ac
  6. BIN extsrc/objTester/objTester.ncb
  7. +0 −20 extsrc/objTester/objTester.sln
  8. BIN extsrc/objTester/objTester.suo
  9. +0 −9 extsrc/objTester/objTester/ReadMe.txt
  10. +0 −51 extsrc/objTester/objTester/cornell_box.mtl
  11. +0 −147 extsrc/objTester/objTester/cornell_box.obj
  12. +0 −205 extsrc/objTester/objTester/list.cpp
  13. +0 −29 extsrc/objTester/objTester/list.h
  14. +0 −43 extsrc/objTester/objTester/objLoader.cpp
  15. +0 −50 extsrc/objTester/objTester/objLoader.h
  16. +0 −167 extsrc/objTester/objTester/objTester.cpp
  17. +0 −233 extsrc/objTester/objTester/objTester.vcproj
  18. +0 −555 extsrc/objTester/objTester/obj_parser.cpp
  19. +0 −143 extsrc/objTester/objTester/obj_parser.h
  20. +0 −16 extsrc/objTester/objTester/string_extra.cpp
  21. +0 −8 extsrc/objTester/objTester/string_extra.h
  22. +0 −36 extsrc/objTester/objTester/test.mtl
  23. +0 −129 extsrc/objTester/objTester/test.obj
  24. +9 −1 include/Makefile.in
  25. +591 −0 src/assimp/Makefile.in
  26. +8 −0 src/assimp/memory.h
  27. +162 −0 src/assimp/realpath.c
  28. +22 −0 src/assimp/realpath.h
  29. +19 −0 src/assimp/symlinks.c
  30. +9 −1 src/cgcomp/Makefile.in
  31. +9 −1 src/library/Makefile.in
  32. +1 −1 src/samples/Makefile.am
  33. +10 −2 src/samples/Makefile.in
  34. +51 −0 src/samples/assview/Makefile.am
  35. +644 −0 src/samples/assview/Makefile.in
  36. +51 −32 src/samples/{wfobjs/wfobjs.cc → assview/assview.cc}
  37. 0 src/samples/{wfobjs/wfobjs.frag → assview/assview.frag}
  38. 0 src/samples/{wfobjs/wfobjs.vert → assview/assview.vert}
  39. 0 src/samples/{wfobjs → assview}/cornell_box_mtl.bin
  40. 0 src/samples/{wfobjs → assview}/cornell_box_obj.bin
  41. 0 src/samples/{wfobjs → assview}/crab_obj.bin
  42. 0 src/samples/{wfobjs → assview}/obj_parser.cpp
  43. 0 src/samples/{wfobjs → assview}/obj_parser.h
  44. +9 −1 src/samples/rsxglgears/Makefile.in
  45. +9 −1 src/samples/rsxgltest/Makefile.in
  46. +0 −55 src/samples/wfobjs/Makefile.am
  47. +0 −731 src/samples/wfobjs/Makefile.in
View
@@ -1,2 +1,2 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = include src/cgcomp src/library src/samples
+SUBDIRS = @RSXGL_SUBDIRS@
View
@@ -34,18 +34,20 @@ POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure \
+ $(top_srcdir)/src/assimp/Makefile.in \
$(top_srcdir)/src/library/GL3/rsxgl3ext.h.in \
$(top_srcdir)/src/library/GL3/rsxgl_compatibility.h.in AUTHORS \
INSTALL TODO config/depcomp config/install-sh config/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/extsrc.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = src/library/GL3/rsxgl3ext.h \
- src/library/GL3/rsxgl_compatibility.h
+ src/library/GL3/rsxgl_compatibility.h src/assimp/Makefile
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
@@ -161,6 +163,8 @@ PSL1GHT_PPU_CPPFLAGS = @PSL1GHT_PPU_CPPFLAGS@
PSL1GHT_PPU_LDFLAGS = @PSL1GHT_PPU_LDFLAGS@
RANLIB = @RANLIB@
RSXGL_CONFIG_RSX_compatibility = @RSXGL_CONFIG_RSX_compatibility@
+RSXGL_SAMPLES = @RSXGL_SAMPLES@
+RSXGL_SUBDIRS = @RSXGL_SUBDIRS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -176,6 +180,8 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+assimp_SOURCE_LOCATION = @assimp_SOURCE_LOCATION@
+assimp_source_found = @assimp_source_found@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
@@ -184,6 +190,9 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+extsrc_build_commands = @extsrc_build_commands@
+extsrc_clean_commands = @extsrc_clean_commands@
+extsrcdir = @extsrcdir@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
@@ -209,7 +218,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = include src/cgcomp src/library src/samples
+SUBDIRS = @RSXGL_SUBDIRS@
all: all-recursive
.SUFFIXES:
@@ -251,6 +260,8 @@ src/library/GL3/rsxgl3ext.h: $(top_builddir)/config.status $(top_srcdir)/src/lib
cd $(top_builddir) && $(SHELL) ./config.status $@
src/library/GL3/rsxgl_compatibility.h: $(top_builddir)/config.status $(top_srcdir)/src/library/GL3/rsxgl_compatibility.h.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+@assimp_SOURCE_FOUND_TRUE@src/assimp/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/assimp/Makefile.in
+@assimp_SOURCE_FOUND_TRUE@ cd $(top_builddir) && $(SHELL) ./config.status $@
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
View
@@ -108,6 +108,46 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
+# AM_COND_IF -*- Autoconf -*-
+
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# _AM_COND_IF
+# _AM_COND_ELSE
+# _AM_COND_ENDIF
+# --------------
+# These macros are only used for tracing.
+m4_define([_AM_COND_IF])
+m4_define([_AM_COND_ELSE])
+m4_define([_AM_COND_ENDIF])
+
+
+# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
+# ---------------------------------------
+# If the shell condition matching COND is true, execute IF-TRUE,
+# otherwise execute IF-FALSE. Allow automake to learn about conditional
+# instantiating macros (the AC_CONFIG_FOOS).
+AC_DEFUN([AM_COND_IF],
+[m4_ifndef([_AM_COND_VALUE_$1],
+ [m4_fatal([$0: no such condition "$1"])])dnl
+_AM_COND_IF([$1])dnl
+if _AM_COND_VALUE_$1; then
+ m4_default([$2], [:])
+m4_ifval([$3],
+[_AM_COND_ELSE([$1])dnl
+else
+ $3
+])dnl
+_AM_COND_ENDIF([$1])dnl
+fi[]dnl
+])
+
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
@@ -949,3 +989,4 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([m4/extsrc.m4])
View
153 configure
@@ -566,6 +566,13 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+assimp_SOURCE_FOUND_FALSE
+assimp_SOURCE_FOUND_TRUE
+assimp_source_found
+assimp_SOURCE_LOCATION
+extsrc_clean_commands
+extsrc_build_commands
+extsrcdir
PORTLIBS_PPU_LDFLAGS
PORTLIBS_PPU_CPPFLAGS
PORTLIBS
@@ -609,6 +616,8 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+RSXGL_SAMPLES
+RSXGL_SUBDIRS
am__untar
am__tar
AMTAR
@@ -681,6 +690,8 @@ with_ppu_cxxlib
enable_RSX_compatibility
with_psl1ght
with_portlibs
+with_extsrc
+with_assimp_source
'
ac_precious_vars='build_alias
host_alias
@@ -1327,6 +1338,9 @@ Optional Packages:
--with-ppu-cxxlib full path to a static C++ standard library
--with-psl1ght location of compiled PSL1GHT
--with-portlibs location of ported libraries
+ --with-extsrc set path to external package sources
+ --with-assimp-source set the path to the source for assimp, the Open
+ Asset Import library
Some influential environment variables:
CC C compiler command
@@ -2355,7 +2369,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-ac_config_files="$ac_config_files include/config.h Makefile include/Makefile src/cgcomp/Makefile src/library/Makefile src/library/rsxgl_config.h src/library/GL3/rsxgl3ext.h src/library/GL3/rsxgl_compatibility.h src/samples/Makefile src/samples/rsxgltest/Makefile src/samples/rsxglgears/Makefile src/samples/wfobjs/Makefile"
+ac_config_files="$ac_config_files include/config.h Makefile include/Makefile src/cgcomp/Makefile src/library/Makefile src/library/rsxgl_config.h src/library/GL3/rsxgl3ext.h src/library/GL3/rsxgl_compatibility.h src/samples/Makefile src/samples/rsxgltest/Makefile src/samples/rsxglgears/Makefile"
+
+
+# Which subdirectories get built:
+RSXGL_SUBDIRS="include src/cgcomp src/library src/samples"
+
+# Determine which samples get built:
+RSXGL_SAMPLES="rsxgltest rsxglgears"
+
+
ac_ext=c
@@ -4017,6 +4040,127 @@ $as_echo "$as_me: PORTLIBS is set to ${PORTLIBS}" >&6;}
+# Setup "extsrc" - "contributed" sources:
+
+ _extsrcdir=
+ _abs_srcdir=$(cd "${srcdir}"; /bin/pwd)
+ default_extsrcdir=${_extsrcdir:-"${_abs_srcdir}/extsrc"}
+
+# Check whether --with-extsrc was given.
+if test "${with_extsrc+set}" = set; then :
+ withval=$with_extsrc; extsrcdir="$withval"
+else
+ extsrcdir="${default_extsrcdir}"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: location of external package sources is ${extsrcdir}" >&5
+$as_echo "$as_me: location of external package sources is ${extsrcdir}" >&6;}
+
+ extsrc_build_commands=""
+ extsrc_clean_commands=""
+
+
+
+
+
+# Look for the Open Asset Import library:
+
+
+# Check whether --with-assimp-source was given.
+if test "${with_assimp_source+set}" = set; then :
+ withval=$with_assimp_source;
+fi
+
+
+ _name="assimp"
+ _help="the Open Asset Import library"
+ _source_location=""
+
+ default_source_LOCATION=${extsrcdir}/${_source_location:-"${_name}"}
+
+ if test "${with_assimp_source}" == "no"; then
+ assimp_SOURCE_LOCATION="no";
+ else
+ assimp_SOURCE_LOCATION=${with_assimp_source:-${default_source_LOCATION}}
+ fi
+
+
+
+
+
+ _name=assimp
+ _relative_test_pathname=include/assimp.h
+ _required=
+
+ _source_location_varname="${_name}_SOURCE_LOCATION"
+ _SOURCE_LOCATION=${!_source_location_varname}
+
+ # Maybe _SOURCE_LOCATION is set to "no"?
+ if test "${_required}" == "required" -a "${_SOURCE_LOCATION}" == "no"; then
+ as_fn_error $? "Source for assimp is required, but attempt was made to configure without it" "$LINENO" 5
+ fi;
+
+ # Look for the file:
+ _test_pathname="${_SOURCE_LOCATION}/${_relative_test_pathname}"
+ as_ac_File=`$as_echo "ac_cv_file_$_test_pathname" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $_test_pathname" >&5
+$as_echo_n "checking for $_test_pathname... " >&6; }
+if eval \${$as_ac_File+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ test "$cross_compiling" = yes &&
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "$_test_pathname"; then
+ eval "$as_ac_File=yes"
+else
+ eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
+ assimp_source_found="yes"
+else
+ assimp_source_found="no"
+fi
+
+
+ # It was found:
+ if test "${assimp_source_found}" == yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Source for assimp found in $_SOURCE_LOCATION" >&5
+$as_echo "$as_me: Source for assimp found in $_SOURCE_LOCATION" >&6;}
+ # It was not found, but is required:
+ elif test "${_required}" == "required"; then
+ as_fn_error $? "Source for assimp is required, but not found (checked in $_SOURCE_LOCATION)" "$LINENO" 5
+ # It was not found, but is not required:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Source for assimp was not found, but is not required (checked in $_SOURCE_LOCATION)" >&5
+$as_echo "$as_me: Source for assimp was not found, but is not required (checked in $_SOURCE_LOCATION)" >&6;}
+ fi
+
+
+ if test "${assimp_source_found}" == "yes" ; then
+ assimp_SOURCE_FOUND_TRUE=
+ assimp_SOURCE_FOUND_FALSE='#'
+else
+ assimp_SOURCE_FOUND_TRUE='#'
+ assimp_SOURCE_FOUND_FALSE=
+fi
+
+
+
+
+if test "${assimp_source_found}" == "yes" ; then
+ ac_config_files="$ac_config_files src/assimp/Makefile src/samples/assview/Makefile"
+
+fi
+
+if test "${assimp_source_found}" == "yes"; then
+ RSXGL_SUBDIRS="${RSXGL_SUBDIRS} src/assimp";
+ RSXGL_SAMPLES="${RSXGL_SAMPLES} assview";
+fi;
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -4182,6 +4326,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${assimp_SOURCE_FOUND_TRUE}" && test -z "${assimp_SOURCE_FOUND_FALSE}"; then
+ as_fn_error $? "conditional \"assimp_SOURCE_FOUND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -4777,8 +4925,9 @@ do
"src/samples/Makefile") CONFIG_FILES="$CONFIG_FILES src/samples/Makefile" ;;
"src/samples/rsxgltest/Makefile") CONFIG_FILES="$CONFIG_FILES src/samples/rsxgltest/Makefile" ;;
"src/samples/rsxglgears/Makefile") CONFIG_FILES="$CONFIG_FILES src/samples/rsxglgears/Makefile" ;;
- "src/samples/wfobjs/Makefile") CONFIG_FILES="$CONFIG_FILES src/samples/wfobjs/Makefile" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "src/assimp/Makefile") CONFIG_FILES="$CONFIG_FILES src/assimp/Makefile" ;;
+ "src/samples/assview/Makefile") CONFIG_FILES="$CONFIG_FILES src/samples/assview/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
View
@@ -15,9 +15,17 @@ AC_CONFIG_FILES(
src/samples/Makefile
src/samples/rsxgltest/Makefile
src/samples/rsxglgears/Makefile
- src/samples/wfobjs/Makefile
)
+# Which subdirectories get built:
+RSXGL_SUBDIRS="include src/cgcomp src/library src/samples"
+
+# Determine which samples get built:
+RSXGL_SAMPLES="rsxgltest rsxglgears"
+
+AC_SUBST([RSXGL_SUBDIRS])
+AC_SUBST([RSXGL_SAMPLES])
+
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
@@ -131,4 +139,18 @@ AC_SUBST([PORTLIBS])
AC_SUBST([PORTLIBS_PPU_CPPFLAGS])
AC_SUBST([PORTLIBS_PPU_LDFLAGS])
+# Setup "extsrc" - "contributed" sources:
+AC_EXTSRC_INIT()
+
+# Look for the Open Asset Import library:
+AC_EXTSRC([assimp],[the Open Asset Import library])
+AC_EXTSRC_CHECK([assimp],[include/assimp.h])
+
+AM_COND_IF([assimp_SOURCE_FOUND],[AC_CONFIG_FILES([src/assimp/Makefile src/samples/assview/Makefile])])
+
+if test "${assimp_source_found}" == "yes"; then
+ RSXGL_SUBDIRS="${RSXGL_SUBDIRS} src/assimp";
+ RSXGL_SAMPLES="${RSXGL_SAMPLES} assview";
+fi;
+
AC_OUTPUT
Binary file not shown.
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "objTester", "objTester\objTester.vcproj", "{8CE4F77B-78A1-4CA8-B18B-FB43284DEE33}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8CE4F77B-78A1-4CA8-B18B-FB43284DEE33}.Debug|Win32.ActiveCfg = Debug|Win32
- {8CE4F77B-78A1-4CA8-B18B-FB43284DEE33}.Debug|Win32.Build.0 = Debug|Win32
- {8CE4F77B-78A1-4CA8-B18B-FB43284DEE33}.Release|Win32.ActiveCfg = Release|Win32
- {8CE4F77B-78A1-4CA8-B18B-FB43284DEE33}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
Binary file not shown.
Oops, something went wrong.

0 comments on commit 96feeea

Please sign in to comment.