Added constructor argument to ShadeModel

This commit is contained in:
Robert Osfield
2007-04-05 16:12:10 +00:00
parent 561dc02da5
commit 6c12c71337
4 changed files with 17 additions and 16 deletions

View File

@@ -25,7 +25,12 @@ class OSG_EXPORT ShadeModel : public StateAttribute
{
public :
ShadeModel();
enum Mode {
FLAT = GL_FLAT,
SMOOTH = GL_SMOOTH
};
ShadeModel(Mode mode=FLAT);
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
ShadeModel(const ShadeModel& sm,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
@@ -48,11 +53,6 @@ class OSG_EXPORT ShadeModel : public StateAttribute
return 0; // passed all the above comparison macros, must be equal.
}
enum Mode {
FLAT = GL_FLAT,
SMOOTH = GL_SMOOTH
};
inline void setMode(Mode mode) { _mode = mode; }
inline Mode getMode() const { return _mode; }

View File

@@ -15,9 +15,9 @@
using namespace osg;
ShadeModel::ShadeModel()
ShadeModel::ShadeModel(Mode mode):
_mode(mode)
{
_mode = SMOOTH;
}

View File

@@ -88,15 +88,14 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__void__releaseBuffer__State_P1,
"",
"");
I_Method3(void, flushDeletedBufferObjects, IN, unsigned int, contextID, IN, double, x, IN, double &, availableTime,
Properties::NON_VIRTUAL,
__void__flushDeletedBufferObjects__unsigned_int__double__double_R1,
"flush all the cached display list which need to be deleted in the OpenGL context related to contextID. ",
"");
I_StaticMethod2(void, deleteBufferObject, IN, unsigned int, contextID, IN, GLuint, globj,
__void__deleteBufferObject__unsigned_int__GLuint_S,
"Use deleteVertexBufferObject instead of glDeleteBuffers to allow OpenGL buffer objects to be cached until they can be deleted by the OpenGL context in which they were created, specified by contextID. ",
"");
I_StaticMethod3(void, flushDeletedBufferObjects, IN, unsigned int, contextID, IN, double, x, IN, double &, availableTime,
__void__flushDeletedBufferObjects__unsigned_int__double__double_R1_S,
"flush all the cached display list which need to be deleted in the OpenGL context related to contextID. ",
"");
I_StaticMethod2(osg::BufferObject::Extensions *, getExtensions, IN, unsigned int, contextID, IN, bool, createIfNotInitalized,
__Extensions_P1__getExtensions__unsigned_int__bool_S,
"Function to call to get the extension of a specified context. ",

View File

@@ -31,9 +31,11 @@ END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::ShadeModel)
I_BaseType(osg::StateAttribute);
I_Constructor0(____ShadeModel,
"",
"");
I_ConstructorWithDefaults1(IN, osg::ShadeModel::Mode, mode, osg::ShadeModel::FLAT,
Properties::NON_EXPLICIT,
____ShadeModel__Mode,
"",
"");
I_ConstructorWithDefaults2(IN, const osg::ShadeModel &, sm, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
____ShadeModel__C5_ShadeModel_R1__C5_CopyOp_R1,
"Copy constructor using CopyOp to manage deep vs shallow copy. ",