~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to COLLADAFramework/include/COLLADAFWPassTarget.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of COLLADAFramework.
 
5
 
 
6
    Licensed under the MIT Open Source License, 
 
7
    for details please see LICENSE file or the website
 
8
    http://www.opensource.org/licenses/mit-license.php
 
9
*/
 
10
 
 
11
#ifndef __COLLADAFW_COLORTARGET_H__
 
12
#define __COLLADAFW_COLORTARGET_H__
 
13
 
 
14
#include "COLLADAFWPrerequisites.h"
 
15
#include "COLLADAFWPassOutput.h"
 
16
 
 
17
 
 
18
namespace COLLADAFW
 
19
{
 
20
 
 
21
    /** 
 
22
    Specifies which <surface> will receive the color information from the output of this pass.
 
23
    
 
24
    Multiple Render Targets (MRTs) allow fragment shaders to output more than one value per pass, 
 
25
    or to redirect the standard depth and stencil units to read from and write to arbitrary 
 
26
    offscreen buffers. These elements tell the FX Runtime which previously defined surfaces to use.
 
27
 
 
28
    The <color_target> element has no attributes in GLES scope.
 
29
    */
 
30
    class PassTarget : public PassOutput
 
31
    {
 
32
    public:
 
33
 
 
34
        enum Face
 
35
        {
 
36
            POSITIVE_X, 
 
37
            NEGATIVE_X, 
 
38
            POSITIVE_Y, 
 
39
            NEGATIVE_Y,
 
40
            POSITIVE_Z,
 
41
            NEGATIVE_Z
 
42
        };
 
43
 
 
44
        private:
 
45
        
 
46
        /** Indexes a subimage inside a target <surface>, including a single MIP-map level, a 
 
47
        unique cube face, or a layer of a 3-D texture. The default is 0. Optional. */
 
48
        unsigned int mSlice;
 
49
 
 
50
        /** The default is 0. Optional. */
 
51
        unsigned int mMip;
 
52
 
 
53
        /** Valid values are 
 
54
        POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, and NEGATIVE_Z. 
 
55
        The default is POSITIVE_X. Optional. */
 
56
        unsigned int mFace;
 
57
 
 
58
        /** The color target value. */
 
59
        String mTarget;
 
60
 
 
61
        public:
 
62
 
 
63
        /** Constructor. */
 
64
        PassTarget( PassOutput::OutputType outputType ) 
 
65
            : PassOutput ( outputType )
 
66
            , mFace ( POSITIVE_X ) 
 
67
        {}
 
68
 
 
69
        /** Destructor. */
 
70
        virtual ~PassTarget() {}
 
71
 
 
72
        /** Indexes a subimage inside a target <surface>, including a single MIP-map level, a 
 
73
        unique cube face, or a layer of a 3-D texture. The default is 0. Optional. */
 
74
        const unsigned int getSlice () const { return mSlice; }
 
75
 
 
76
        /** Indexes a subimage inside a target <surface>, including a single MIP-map level, a 
 
77
        unique cube face, or a layer of a 3-D texture. The default is 0. Optional. */
 
78
        void setSlice ( const unsigned int Slice ) { mSlice = Slice; }
 
79
 
 
80
        /** The default is 0. Optional. */
 
81
        const unsigned int getMip () const { return mMip; }
 
82
 
 
83
        /** The default is 0. Optional. */
 
84
        void setMip ( const unsigned int Mip ) { mMip = Mip; }
 
85
 
 
86
        /** Valid values are 
 
87
        POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, and NEGATIVE_Z. 
 
88
        The default is POSITIVE_X. Optional. */
 
89
        const unsigned int getFace () const { return mFace; }
 
90
 
 
91
        /** Valid values are 
 
92
        POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, and NEGATIVE_Z. 
 
93
        The default is POSITIVE_X. Optional. */
 
94
        void setFace ( const unsigned int Face ) { mFace = Face; }
 
95
 
 
96
        /** The color target value. */
 
97
        const String getTarget () const { return mTarget; }
 
98
 
 
99
        /** The color target value. */
 
100
        void setTarget ( const String Target ) { mTarget = Target; }
 
101
 
 
102
        private:
 
103
 
 
104
        /** Disable default copy ctor. */
 
105
                PassTarget( const PassTarget& pre );
 
106
 
 
107
        /** Disable default assignment operator. */
 
108
                const PassTarget& operator= ( const PassTarget& pre );
 
109
 
 
110
        };
 
111
 
 
112
} // namespace COLLADAFW
 
113
 
 
114
#endif // __COLLADAFW_COLORTARGET_H__