~ubuntu-branches/ubuntu/raring/openwalnut/raring

« back to all changes in this revision

Viewing changes to src/core/graphicsEngine/shaders/WGEShaderDefineOptions.cpp

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2012-12-12 11:26:32 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20121212112632-xhiuwkxuz5h0idkh
Tags: 1.3.1+hg5849-1
* Minor changes compared to 1.3.0 but included several bug fixes.
* See http://www.openwalnut.org/versions/4

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <stdarg.h>
26
26
 
27
27
#include <algorithm>
 
28
#include <string>
 
29
#include <vector>
28
30
 
29
31
#include "../../common/exceptions/WPreconditionNotMet.h"
30
 
 
31
32
#include "WGEShaderDefineOptions.h"
32
33
 
33
34
WGEShaderDefineOptions::WGEShaderDefineOptions( std::string first,
124
125
{
125
126
    WPrecond( idx < m_options.size(), "Index invalid." );
126
127
 
 
128
    // if this option is already active, avoid an update even if exclusive is true
 
129
    if( ( m_idx.size() == 1 ) && ( m_idx[ 0 ] == idx ) )
 
130
    {
 
131
        return;
 
132
    }
 
133
 
127
134
    if( exclusive )
128
135
    {
129
136
        m_idx.clear();
137
144
    }
138
145
}
139
146
 
140
 
void WGEShaderDefineOptions::dactivateOption( size_t idx )
 
147
void WGEShaderDefineOptions::deactivateOption( size_t idx )
141
148
{
142
149
    IdxList::iterator iter = std::find( m_idx.begin(), m_idx.end(), idx );
143
150
    if( iter != m_idx.end() )