#include #include #include "ogl.h" #include "Renderer.h" #include "BrushShapeEditorTool.h" // default tool instance CBrushShapeEditorTool CBrushShapeEditorTool::m_BrushShapeEditorTool; CBrushShapeEditorTool::CBrushShapeEditorTool() : m_BrushSize(5), m_BrushData(0) { m_BrushData=new bool[m_BrushSize*m_BrushSize]; memset(m_BrushData,0,sizeof(bool)*m_BrushSize*m_BrushSize); } void CBrushShapeEditorTool::OnDraw() { g_Renderer.SetTexture(0,0); glDepthMask(0); // draw grid // draw state of each bit in the brush int r=m_BrushSize; // iterate through selected patches for (int j=0;jm_BrushSize ? m_BrushSize : size; for (u32 j=0;j