[Gtkradiant] [Bug 764] functionality patch from Dalroi @ Raven

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Wed, 26 Feb 2003 11:58:52 -0600


http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=764





------- Additional Comments From scork@ravensoft.com  2003-02-26 11:58 -------
Yeah, I couldn't make sense of the flags, they were wrong, eg:

// render flags
#define DRAW_RF_NONE          0x0000
#define DRAW_RF_SEL_OUTLINE   0x0001
#define DRAW_RF_SEL_FILL      0x0010
#define DRAW_RF_XY            0x0011
#define DRAW_RF_CAM           0x0100

... next flag would be logically 0x0101 therefore, but since they do OR 
checking that'd mean my new flag would also activate DRAW_RF_SEL_OUTLINE, so I 
gave up and used the gaps in the GL state for safety.  Even those were 
done "wrong" though, since they should have been more like:

// state flags (for some reason these go up 16 bits at a time instead of 1....)
#define DRAW_GL_FILL          0x0001
#define DRAW_GL_LIGHTING      0x0002
#define DRAW_GL_TEXTURE_2D    0x0004
#define DRAW_GL_BLEND         0x0008
//#define  DRAW_GL_NEXT       0x0010

... instead of

// state flags (for some reason these go up 16 bits at a time instead of 1....)
#define DRAW_GL_FILL          0x0001
#define DRAW_GL_LIGHTING      0x0010
#define DRAW_GL_TEXTURE_2D    0x0100
#define DRAW_GL_BLEND         0x1000

.. so I just hijacked a spare bit. Feel free to change.