Last change
on this file since 248 was
248,
checked in by epyon, 11 years ago
|
- AssImp? loader implementation
- full mesh_data support
- initial skinning info support
- support for merging bones for GPU skeletal animation
|
File size:
1.1 KB
|
Rev | Line | |
---|
[248] | 1 | // Copyright (C) 2014 ChaosForge Ltd
|
---|
| 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
| 4 | // This file is part of NV Libraries.
|
---|
| 5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
| 6 |
|
---|
| 7 | #include "nv/lib/assimp.hh"
|
---|
| 8 |
|
---|
| 9 | nv::assimp_log_guard::assimp_log_guard()
|
---|
| 10 | {
|
---|
| 11 | aiLogStream ls = aiGetPredefinedLogStream( aiDefaultLogStream_FILE, "assimp_log.txt" );
|
---|
| 12 | aiAttachLogStream(&ls);
|
---|
| 13 | ls.callback = assimp_log_callback;
|
---|
| 14 | ls.user = nullptr;
|
---|
| 15 | aiAttachLogStream(&ls);
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | nv::assimp_log_guard::~assimp_log_guard()
|
---|
| 19 | {
|
---|
| 20 | aiDetachAllLogStreams();
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | #if defined( NV_ASSIMP_DYNAMIC )
|
---|
| 24 |
|
---|
| 25 | #include "nv/library.hh"
|
---|
| 26 |
|
---|
| 27 | #define NV_ASSIMP_FUN( rtype, fname, fparams ) rtype (NV_ASSIMP_APIENTRY *fname) fparams = nullptr; |
---|
| 28 | #include <nv/lib/detail/assimp_functions.inc> |
---|
| 29 | #undef NV_ASSIMP_FUN |
---|
| 30 | |
---|
| 31 | bool nv::load_assimp_library( const char* path )
|
---|
| 32 | {
|
---|
| 33 | static nv::library assimp_library;
|
---|
| 34 | if ( assimp_library.is_open() ) return true;
|
---|
| 35 | assimp_library.open( path );
|
---|
| 36 |
|
---|
| 37 | # define NV_ASSIMP_FUN( rtype, fname, fparams ) *(void **) (&fname) = assimp_library.get(#fname); |
---|
| 38 | # include <nv/lib/detail/assimp_functions.inc> |
---|
| 39 | # undef NV_ASSIMP_FUN
|
---|
| 40 |
|
---|
| 41 | return true;
|
---|
| 42 | }
|
---|
| 43 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.