GL_NONE replaced with PARRAY_DRAW_MODE_NONE to disambiguate with GL_POINTS
DRAW_MODE_NONE constant moved into OpenGl_PrimitiveArray class to avoid potential name collisions
// =======================================================================
OpenGl_PrimitiveArray::OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray)
: myPArray (thePArray),
- myDrawMode (GL_NONE)
+ myDrawMode (DRAW_MODE_NONE)
{
switch (myPArray->type)
{
// =======================================================================
void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
{
- if (myPArray == NULL || myDrawMode == GL_NONE)
+ if (myPArray == NULL || myDrawMode == DRAW_MODE_NONE)
return;
// create VBOs on first render call
class OpenGl_PrimitiveArray : public OpenGl_Element
{
public:
+ // OpenGL does not provie a constant for "none" draw mode.
+ // So we define our own one that does not conflict with GL constants
+ // and untilizes common GL invalid value
+ enum
+ {
+ DRAW_MODE_NONE = -1
+ };
//! Default constructor
OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray);
protected:
mutable CALL_DEF_PARRAY* myPArray;
- GLenum myDrawMode;
+ GLint myDrawMode;
public: