virtual ~TinyRendererGUIHelper()
 {
     for (int i=0;i<m_swRenderObjects.size();i++)
     {
         TinyRenderObjectData** d = m_swRenderObjects[i];
         if (d && *d)
         {
             delete *d;
         }
     }
 }
	virtual int	registerTexture(const unsigned char* texels, int width, int height)
	{
		//do we need to make a copy?
		int textureId = m_textures.size();
		TinyRendererTexture t;
		t.m_texels = texels;
		t.m_width = width;
		t.m_height = height;
		this->m_textures.insert(textureId,t);
		return textureId;
	}
	virtual ~SW_And_OpenGLGuiHelper()
	{
		for (int i = 0; i < m_swRenderObjects.size(); i++)
		{
			TinyRenderObjectData** d = m_swRenderObjects[i];
			if (d && *d)
			{
				delete *d;
			}
		}
	}
	virtual int registerGraphicsShape(const float* vertices, int numvertices, const int* indices, int numIndices,int primitiveType, int textureId)
	{
		int shapeIndex = m_swRenderObjects.size();

		TinyRenderObjectData* swObj = new TinyRenderObjectData(m_rgbColorBuffer,m_depthBuffer);
        float rgbaColor[4] = {1,1,1,1};

		//if (textureId>=0)
		//{
		//	swObj->registerMeshShape(vertices,numvertices,indices,numIndices,rgbaColor);
		//} else
		{
			swObj->registerMeshShape(vertices,numvertices,indices,numIndices,rgbaColor);
		}
		//swObj->createCube(1,1,1);//MeshShape(vertices,numvertices,indices,numIndices);
        m_swRenderObjects.insert(shapeIndex,swObj);
		return shapeIndex;
	}