6 #ifndef _MGGLAttrib_HH_
7 #define _MGGLAttrib_HH_
13 #include "mg/Attrib.h"
45 CURRENT_BIT= GL_CURRENT_BIT,
46 POINT_BIT= GL_POINT_BIT,
47 LINE_BIT= GL_LINE_BIT,
48 POLYGON_BIT= GL_POLYGON_BIT,
49 POLYGON_STIPPLE_BIT= GL_POLYGON_STIPPLE_BIT,
50 PIXEL_MODE_BIT= GL_PIXEL_MODE_BIT,
51 LIGHTING_BIT= GL_LIGHTING_BIT,
53 DEPTH_BUFFER_BIT= GL_DEPTH_BUFFER_BIT,
54 ACCUM_BUFFER_BIT= GL_ACCUM_BUFFER_BIT,
55 STENCIL_BUFFER_BIT= GL_STENCIL_BUFFER_BIT,
56 VIEWPORT_BIT= GL_VIEWPORT_BIT,
57 TRANSFORM_BIT= GL_TRANSFORM_BIT,
58 ENABLE_BIT= GL_ENABLE_BIT,
59 COLOR_BUFFER_BIT= GL_COLOR_BUFFER_BIT,
60 HINT_BIT= GL_HINT_BIT,
61 EVAL_BIT= GL_EVAL_BIT,
62 LIST_BIT= GL_LIST_BIT,
63 TEXTURE_BIT= GL_TEXTURE_BIT,
64 SCISSOR_BIT= GL_SCISSOR_BIT
78 bool defined()
const{
return m_flag!=UNDEFINED;};
79 bool disabled()
const{
return m_flag==DISABLED;};
80 bool enabled()
const{
return m_flag!=UNDEFINED && m_flag!=DISABLED;};
86 int data()
const{
return m_flag;};
87 int&
data(){
return m_flag;};
99 virtual void render(
mgVBO& vbo)
const=0;
102 virtual void set_draw_attrib_mask(
unsigned int& mask)
const=0;
105 virtual void reset_draw_attrib_mask(
unsigned int& mask)
const=0;
108 virtual void set_render_attrib_mask(
unsigned int& mask)
const=0;
111 virtual void reset_render_attrib_mask(
unsigned int& mask)
const=0;
122 virtual std::ostream&
out(std::ostream&)
const;
146 #endif //#ifndef _MGGLAttrib_HH_
void reset_Amask(unsigned int &mask, MGGLAttrib::ATTRIB_MASK bit)
bool disabled() const
Definition: GLAttrib.h:79
MGGLAttrib is an abstract class which defines the enum of undefined or disabled.
Definition: GLAttrib.h:35
void set_Amask(unsigned int &mask, MGGLAttrib::ATTRIB_MASK bit)
Set or reset the bit of mask.
int data() const
retrieve the data.
Definition: GLAttrib.h:86
virtual long identify_type() const
Return This object's typeID.
Definition: GLAttrib.h:114
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual MGGLAttrib & operator=(const MGGLAttrib &gel2)
Definition: GLAttrib.h:70
int & data()
Definition: GLAttrib.h:87
virtual void ReadMembers(MGIfstream &buf)
Read all member data.
FLAG
Definition: GLAttrib.h:39
MGRenderAttr defines the attributes of rendering attributes.
Definition: RenderAttr.h:28
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
MGLight is an abstract base class for light sources.
Definition: Light.h:27
virtual std::ostream & out(std::ostream &) const =0
Output virtual function.
void set_undefined()
Definition: GLAttrib.h:82
bool enabled() const
Definition: GLAttrib.h:80
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
void set_disabled()
Definition: GLAttrib.h:83
virtual void WriteMembers(MGOfstream &buf) const
Write all member data.
MGGLAttrib(int flag=UNDEFINED)
Definition: GLAttrib.h:67
ATTRIB_MASK
Definition: GLAttrib.h:44
bool defined() const
Definition: GLAttrib.h:78
int m_flag
Definition: GLAttrib.h:129
virtual bool is_highlight_attrib() const
Test if this is highlight attrib or not.
Definition: GLAttrib.h:96
a container class for light sources(MGDirectionalLight, MGPointLight, or MGSpotLight).
Definition: Lights.h:23
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
virtual MGGel * clone() const =0
MGLineWidth defines line width of a curve.
Definition: LineWidth.h:24
virtual void drawAttrib(mgVBO &vbo, bool no_color=false) const
draw attribute data.
Definition: Gel.h:106
MGGLAttrib * MGNullGLAttrib(long TID)
Construct a null newed MGAttrib from the type id TID.
bool undefined() const
Definition: GLAttrib.h:77
MGAttrib is an abstract class that defines attribute elements of MGGel.
Definition: Attrib.h:28
MGLineStipple defines line stipple patters.
Definition: LineStipple.h:24