OpenSceneGraph 3.6.5
PolygonStipple
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13// -*- Mode: c++ -*-
14
15#ifndef OSG_POLYGONSTIPPLE
16#define OSG_POLYGONSTIPPLE 1
17
18#include <osg/StateAttribute>
19
20#ifndef GL_POLYGON_STIPPLE
21 #define GL_POLYGON_STIPPLE 0x0B42
22#endif
23
24namespace osg
25{
26
28{
29 public :
30
32
33 PolygonStipple(const GLubyte* mask);
34
37
39
41 virtual int compare(const StateAttribute& sa) const;
42
43 virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const
44 {
46 return true;
47 }
48
50 void setMask(const GLubyte* mask);
51
53 inline const GLubyte* getMask() const {return _mask;}
54
55
56 virtual void apply(State& state) const;
57
58 protected :
59
60 virtual ~PolygonStipple();
61
62 GLubyte _mask[128];
63
64};
65
66}
67
68#endif
#define GL_POLYGON_STIPPLE
Definition PolygonStipple:21
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
META_StateAttribute(osg, PolygonStipple, POLYGONSTIPPLE)
virtual void apply(State &state) const
apply the OpenGL state attributes.
PolygonStipple(const PolygonStipple &lw, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
void setMask(const GLubyte *mask)
set the mask up, copying 128 bytes (32x32 bitfield) from mask into the local _mask.
virtual int compare(const StateAttribute &sa) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
PolygonStipple(const GLubyte *mask)
GLubyte _mask[128]
Definition PolygonStipple:62
virtual bool getModeUsage(StateAttribute::ModeUsage &usage) const
Return the modes associated with this StateAttribute.
Definition PolygonStipple:43
virtual ~PolygonStipple()
const GLubyte * getMask() const
get a pointer to the mask.
Definition PolygonStipple:53
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
@ POLYGONSTIPPLE
Definition StateAttribute:142
Definition StateAttribute:308
virtual void usesMode(GLMode mode)=0
#define OSG_EXPORT
Definition Export:39

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.