Added osgtexture3D demo, renamed osgtexture demo to osgtexture2D, and have

added osgtexture1D demo which currently is simply copy of osgtexture2D. I
will be modifying it to do 1D texturing next.

Fixed a bug in osg::Texture3D relating to checking of existance of
texturing.

Merged some fixes to the pfb loader from Ulrich Hertlein.
This commit is contained in:
Robert Osfield
2002-08-27 10:06:57 +00:00
parent 501f28449c
commit 83af5e7a95
21 changed files with 1067 additions and 351 deletions

View File

@@ -97,13 +97,13 @@ void Texture3D::setImage(Image* image)
void Texture3D::apply(State& state) const
{
static bool s_texturing_supported = strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0 ||
isGLExtensionSupported("GL_EXT_texture3D");
if (s_texturing_supported)
if (!s_texturing_supported)
{
notify(WARN)<<"Warning: Texture3D::apply(..) failed, 3D texturing is not support by your OpenGL drivers."<<std::endl;
return;
}
// get the contextID (user defined ID of 0 upwards) for the
@@ -205,8 +205,6 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
image->ensureValidSizeForTexturing();
glPixelStorei(GL_UNPACK_ALIGNMENT,image->getPacking());
if( _min_filter == LINEAR || _min_filter == NEAREST )
{