~ubuntu-branches/debian/sid/coin2/sid

« back to all changes in this revision

Viewing changes to src/elements/GL/SoGLTextureEnabledElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-06-28 02:38:17 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080628023817-lgrh0u677j1gcqgf
Tags: 2.5.0-2
* debian/control: Change suggests from libopenal0 to libopenal0a.
  Closes: #488001.  Change ${Source-Version} to ${binary:Version}.
  Update to standards version 3.8.0.

* debian/rules: Do not ignore errors in clean rule.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**************************************************************************\
2
2
 *
3
3
 *  This file is part of the Coin 3D visualization library.
4
 
 *  Copyright (C) 1998-2006 by Systems in Motion.  All rights reserved.
 
4
 *  Copyright (C) 1998-2007 by Systems in Motion.  All rights reserved.
5
5
 *
6
6
 *  This library is free software; you can redistribute it and/or
7
7
 *  modify it under the terms of the GNU General Public License
81
81
  SoShapeStyleElement::setTextureEnabled(state, TRUE);
82
82
}
83
83
 
 
84
/*!
 
85
  Enables GL_TEXTURE_CUBE+MAP. GL_TEXTURE_2D and/or
 
86
  GL_TEXTURE_RECTANGLE will be disabled if it's enabled earlier.
 
87
*/
 
88
void 
 
89
SoGLTextureEnabledElement::enableCubeMap(SoState * state, SoNode * node)
 
90
{
 
91
  SoInt32Element::set(classStackIndex, state, node, (int32_t) CUBEMAP);
 
92
  SoShapeStyleElement::setTextureEnabled(state, TRUE);
 
93
}
 
94
 
84
95
SoGLTextureEnabledElement::Mode 
85
96
SoGLTextureEnabledElement::getMode(SoState * state)
86
97
{
183
194
  case RECTANGLE:
184
195
    glDisable(GL_TEXTURE_RECTANGLE_EXT);
185
196
    break;
 
197
  case CUBEMAP: 
 
198
    glDisable(GL_TEXTURE_CUBE_MAP);
 
199
    break;
186
200
  default:
187
201
    assert(0 && "should not happen");
188
202
    break;
196
210
  case RECTANGLE:
197
211
    glEnable(GL_TEXTURE_RECTANGLE_EXT);
198
212
    break;
 
213
  case CUBEMAP:
 
214
    glEnable(GL_TEXTURE_CUBE_MAP);
 
215
    break;
199
216
  default:
200
217
    assert(0 && "should not happen");
201
218
    break;