try asserting that gsg::get_engine() is not null

This commit is contained in:
David Rose 2009-02-18 22:28:04 +00:00
parent fac9c4982d
commit d7d7963337
3 changed files with 13 additions and 11 deletions

View File

@ -212,16 +212,6 @@ get_pipe() const {
return _pipe;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsStateGuardian::get_engine
// Access: Published
// Description: Returns the graphics engine that created this GSG.
////////////////////////////////////////////////////////////////////
INLINE GraphicsEngine *GraphicsStateGuardian::
get_engine() const {
return _engine;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsStateGuardian::get_threading_model
// Access: Published

View File

@ -13,6 +13,7 @@
////////////////////////////////////////////////////////////////////
#include "graphicsStateGuardian.h"
#include "graphicsEngine.h"
#include "config_display.h"
#include "textureContext.h"
#include "vertexBufferContext.h"
@ -248,6 +249,17 @@ GraphicsStateGuardian::
GeomMunger::unregister_mungers_for_gsg(this);
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsStateGuardian::get_engine
// Access: Published
// Description: Returns the graphics engine that created this GSG.
////////////////////////////////////////////////////////////////////
GraphicsEngine *GraphicsStateGuardian::
get_engine() const {
nassertr(_engine != (GraphicsEngine *)NULL, GraphicsEngine::get_global_ptr());
return _engine;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsStateGuardian::get_supports_multisample
// Access: Published, Virtual

View File

@ -101,7 +101,7 @@ PUBLISHED:
INLINE Loader *get_loader() const;
INLINE GraphicsPipe *get_pipe() const;
INLINE GraphicsEngine *get_engine() const;
GraphicsEngine *get_engine() const;
INLINE const GraphicsThreadingModel &get_threading_model() const;
INLINE bool is_hardware() const;