Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


buk110

Member Since 10 Aug 2011
Offline Last Active Aug 22 2011 07:02 PM

Posts I've Made

In Topic: GDITexture - 3D

11 August 2011 - 06:52 AM

The code itself looks fine, you'd have to give us more information about the inheritance part, probably both classes, and what exactly do you mean by "no luck", does it crash? does anything appear on the screeen?



Sure, by no luck I mean nothing shows up on the screen. My inheritance is like this:

ArcGlobeControl : MapControl
MapControl : OpenGLControl


In ArcGlobeControl I do the following

public override void glDraw()
{
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
GL.glLoadIdentity();
GL.glTranslated(0,0,-1000);
GL.glRotated(35 , 1, 1.2 , 0.2);
GL.glScaled(2,2,2);

GL.glPushMatrix();
GL.glColor3f(1,0,0);
GL.glRotated(180,0,1,0);

myFont.DrawString("TEST");
}

What's really odd is that I have a separate class, called DataLayer that a Instantiate inside of the GlobeControl and in that I have the following
protected void SetupOpenGL()
{
   myGlobeDisplayEvents = myGlobeControl.GlobeViewer.GlobeDisplay;

   myGlobeDisplayEvents.AfterDraw += MyHandler();
}


private void MyHandler(ISceneViewer inSceneViewer)
{
 //GL Drawing code
  // GL Draw a huge box
  // WOW I HAVE A 3D box that shows up on the globe
}

However, inside that class I can never seem to create a GDITextureFont. It does create one in the ArcGlobeControl , but not in the DataLayer.

Any thoughts?

PARTNERS