void DrawSpeakerCube()
{
GI.TexParameter(TextureParameterTarget.Texture2d, TextureParameterName.TextureMinFilter, TextureMinFilter.Linear);
GI.TexParameter(TextureParameterTarget.Texture2d, TextureParameterName.TextureMagFilter, TextureMagFilter.Linear);
GI.TexParameter(TextureParameterTarget.Texture2d, TextureParameterName.TextureWrapS, TextureWrapMode.Clamp);
GI.TexParameter(TextureParameterTarget.Texture2d, TextureParameterName.TextureWrapT, TextureWrapMode.Clamp);
GI.TexEnv(TextureEnvModeParam.Modulate);
GI.Features.Texturing2D.Enable();
// Set drawing color to white
//GI.Drawing.Color = ColorRGBA.White;
//GI.FrontFace(FrontFaceDirection.Cw);
if (null != fViewer && fViewer.TexTure != null)
fDesktopTexture = fViewer.TexTure;
GI.PolygonMode(GLFace.Front, PolygonMode.Fill);
// Draw Section 0
fDesktopTexture.Bind();
GI.PushMatrix();
GI.Rotate(0, 0, 1, 0);
GI.Translate(0, 4, fSpeakerSection0.Radius * fSpeakerSeparation);
fSpeakerSection0.Render(GI);
GI.PopMatrix();
fDesktopTexture.Unbind();
// Draw Section 90
fSpeakerTexture.Bind();
GI.PushMatrix();
GI.Rotate(90, 0, 1, 0);
GI.Translate(0, 4, fSpeakerSection90.Radius * fSpeakerSeparation);
fSpeakerSection90.Render(GI);
GI.PopMatrix();
fSpeakerTexture.Unbind();
// Draw Section 180
fDesktopTexture.Bind();
GI.PushMatrix();
GI.Rotate(180, 0, 1, 0);
GI.Translate(0, 4, fSpeakerSection180.Radius * fSpeakerSeparation);
fSpeakerSection180.Render(GI);
GI.PopMatrix();
fDesktopTexture.Unbind();
// Draw Section 270
fSpeakerTexture.Bind();
GI.PushMatrix();
GI.Rotate(270, 0, 1, 0);
GI.Translate(0, 4, fSpeakerSection270.Radius * fSpeakerSeparation);
fSpeakerSection270.Render(GI);
GI.PopMatrix();
fSpeakerTexture.Unbind();
}