Skip to content

Commit 619d942

Browse files
authored
Merge pull request #578 from lasalvavida/effect-images
Load images declared in profile_COMMON
2 parents d826fd0 + f9dc40b commit 619d942

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

COLLADASaxFrameworkLoader/include/COLLADASaxFWLLibraryEffectsLoader.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
44
This file is part of COLLADASaxFrameworkLoader.
55
6-
Licensed under the MIT Open Source License,
6+
Licensed under the MIT Open Source License,
77
for details please see LICENSE file or the website
88
http://www.opensource.org/licenses/mit-license.php
99
*/
1010

1111
#ifndef __COLLADASAXFWL_LIBRARYEFFECTSSLOADER_H__
1212
#define __COLLADASAXFWL_LIBRARYEFFECTSSLOADER_H__
1313

14-
#include "COLLADASaxFWLPrerequisites.h"
15-
#include "COLLADASaxFWLFilePartLoader.h"
16-
#include "COLLADASaxFWLXmlTypes.h"
14+
#include "COLLADASaxFWLLibraryImagesLoader.h"
1715

1816
#include "COLLADAFWEffectCommon.h"
1917
#include "COLLADAFWTypes.h"
@@ -32,7 +30,7 @@ namespace COLLADASaxFWL
3230
{
3331

3432
/** TODO Documentation */
35-
class LibraryEffectsLoader : public FilePartLoader
33+
class LibraryEffectsLoader : public LibraryImagesLoader
3634
{
3735
public:
3836
enum ShaderParameterTypes
@@ -218,7 +216,7 @@ namespace COLLADASaxFWL
218216
/** Store the sid of the new param.*/
219217
virtual bool begin__newparam____cg_newparam( const newparam____cg_newparam__AttributeData& attributeData );
220218

221-
/** Set the current profile to PROFILE_COMMON. Create and append common effect to current
219+
/** Set the current profile to PROFILE_COMMON. Create and append common effect to current
222220
effect.*/
223221
virtual bool begin__profile_COMMON( const profile_COMMON__AttributeData& attributeData );
224222

@@ -258,7 +256,7 @@ namespace COLLADASaxFWL
258256
virtual bool begin__minfilter(){return true;}
259257
virtual bool end__minfilter(){return true;}
260258
virtual bool data__minfilter( const ENUM__fx_sampler_filter_common value );
261-
259+
262260
/** We don't need to do anything here.*/
263261
virtual bool begin__source____NCName(){return true;}
264262

@@ -289,7 +287,7 @@ namespace COLLADASaxFWL
289287
/** Resolve all the samplers and copy them to the current effect.*/
290288
virtual bool begin__profile_COMMON__technique( const profile_COMMON__technique__AttributeData& attributeData );
291289

292-
/** Iterate over the list of used samplers in the current effect profile and push them
290+
/** Iterate over the list of used samplers in the current effect profile and push them
293291
in the sampler array. */
294292
bool fillSamplerArray();
295293

@@ -377,7 +375,7 @@ namespace COLLADASaxFWL
377375

378376
private:
379377
/** Set the shader type of the current profile.*/
380-
bool setCommonEffectShaderType( COLLADAFW::EffectCommon::ShaderType shaderType);
378+
bool setCommonEffectShaderType( COLLADAFW::EffectCommon::ShaderType shaderType);
381379

382380
/** Stores color data into the correct color object.*/
383381
bool handleColorData( const float* value, size_t length );
@@ -391,7 +389,7 @@ namespace COLLADASaxFWL
391389
bool handleExtraEffectTextures( const COLLADAFW::PointerArray<COLLADAFW::TextureAttributes>& effectTextures );
392390

393391
/**
394-
* Luminance is the function, based on the ISO/CIE color standards (see ITU-R
392+
* Luminance is the function, based on the ISO/CIE color standards (see ITU-R
395393
* Recommendation BT.709-4), that averages the color channels into one value.
396394
*/
397395
double calculateLuminance ( const COLLADAFW::Color& color );

COLLADASaxFrameworkLoader/include/generated14/COLLADASaxFWLLibraryEffectsLoader14.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "COLLADASaxFWLPrerequisites.h"
1717
#include "COLLADASaxFWLLibraryEffectsLoader.h"
18-
#include "COLLADASaxFWLIParserImpl14.h"
18+
#include "COLLADASaxFWLLibraryImagesLoader14.h"
1919

2020

2121
namespace COLLADASaxFWL
@@ -25,14 +25,14 @@ namespace COLLADASaxFWL
2525
class IFilePartLoader;
2626

2727

28-
class LibraryEffectsLoader14 : public IParserImpl14
28+
class LibraryEffectsLoader14 : public LibraryImagesLoader14
2929
{
3030
private:
3131
LibraryEffectsLoader* mLoader;
3232

3333
public:
3434
LibraryEffectsLoader14(LibraryEffectsLoader* loader)
35-
: mLoader(loader)
35+
: LibraryImagesLoader14(static_cast<LibraryImagesLoader*>(loader)), mLoader(loader)
3636
{}
3737

3838

COLLADASaxFrameworkLoader/include/generated15/COLLADASaxFWLLibraryEffectsLoader15.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "COLLADASaxFWLPrerequisites.h"
1717
#include "COLLADASaxFWLLibraryEffectsLoader.h"
18-
#include "COLLADASaxFWLIParserImpl15.h"
18+
#include "COLLADASaxFWLLibraryImagesLoader15.h"
1919

2020

2121
namespace COLLADASaxFWL
@@ -25,14 +25,14 @@ namespace COLLADASaxFWL
2525
class IFilePartLoader;
2626

2727

28-
class LibraryEffectsLoader15 : public IParserImpl15
28+
class LibraryEffectsLoader15 : public LibraryImagesLoader15
2929
{
3030
private:
3131
LibraryEffectsLoader* mLoader;
3232

3333
public:
3434
LibraryEffectsLoader15(LibraryEffectsLoader* loader)
35-
: mLoader(loader)
35+
: LibraryImagesLoader15(static_cast<LibraryImagesLoader*>(loader)), mLoader(loader)
3636
{}
3737

3838

COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace COLLADASaxFWL
2222

2323
//------------------------------
2424
LibraryEffectsLoader::LibraryEffectsLoader( IFilePartLoader* callingFilePartLoader )
25-
: FilePartLoader(callingFilePartLoader)
25+
: LibraryImagesLoader(callingFilePartLoader)
2626
, mCurrentEffect(0)
2727
, mTransparency(1)
2828
, mOpaqueMode(UNSPECIFIED_OPAQUE)

0 commit comments

Comments
 (0)