XNA Game Development Forums
2012/05/21 19:46:29 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: ObjectManagers problem  (Read 1341 times)
Jonotron
Newbie
*
Offline Offline

Posts: 27


View Profile
« on: 2007/06/21 12:58:23 »

Hey,
I'm trying to use two managers.  One for Objects, and one for GUI.  When I run the game, I only see the GUI, but no objects.  The weird part is I still see the skybox, just not the models/terrain.  When I go into wireframe mode.  I can see the wireframe of all the objects and the gui buttons.  Why is it not rendering my objects?!?!
I call the draw functions from here in the Engine.cs:
Code:
            GUIManager.Draw(graphics.GraphicsDevice);
            ObjectManager.Draw(graphics.GraphicsDevice);

The draw function in the GUIManager and the ObjectManager looks like this:
Code:
       public static void Draw(GraphicsDevice device)
        {
            if (controls.Count != 0)
            {
                foreach (GUIButtonSimple obj in controls.Values)
                {
                    if (obj is iObjectRenderable)
                    {
                        ((iObjectRenderable)obj).Render(device);
                    }
                }
            }
        }

        public static void Draw(GraphicsDevice device)
        {
            // Draw the child objects
            foreach (BaseObject obj in objects.Values)
            {
                obj.Draw(device);
            }
        }

Any help is appreciated!
Logged
mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #1 on: 2007/08/03 12:29:19 »

Are you using sprites for your gui? the spritemanager class sets a  lot of states on the video card that might not be getting reset correctly. This is my best guess at the cause. Look around on the XNA blogs (the Microsoft ones) as I remember one of their guys (Michael Klutcher maybe?) posted something about the sprite render states a while back.
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3d Engine-- Tutorial 2 problem. Hazy Mind 3D Engine ZebraHDH 4 2203 Last post 2006/12/03 14:20:43
by tuxdalinux
Got a problem with an .x file Hazy Mind XNA Engine bobbie_dache 8 2784 Last post 2007/01/16 12:26:30
by bobbie_dache
Screen Flickering problem... Hazy Mind XNA Engine simpson.jon 4 1701 Last post 2007/02/25 17:09:05
by simpson.jon
Strange Problem ( Advice/Assistance Needed Please :-) ) General Discussion DaphydTheBard 4 1778 Last post 2007/03/17 10:23:52
by DaphydTheBard
Animations! But one problem... Hazy Mind XNA Engine EclipsE 2 1415 Last post 2007/04/12 02:42:27
by EclipsE
Minimize problem - app crash Hazy Mind XNA Engine nicknz 4 2242 Last post 2007/08/02 04:32:10
by Suzume
tutorial 4 problem Hazy Mind 3D Engine precious roy 3 2499 Last post 2007/08/03 12:24:26
by mikeschuld
usercontrols over gamewindow and keyboard problem General Discussion XNASorcerer 2 1465 Last post 2007/05/09 00:52:09
by Chr0n1x
Interface problem. Help!! General Discussion XNASorcerer 5 2112 Last post 2007/05/09 09:46:36
by CarlosFreitas
Spaceship orientation problem Hazy Mind XNA Engine murga 3 1619 Last post 2007/07/18 07:00:15
by Nemo Krad
Camera problem Hazy Mind XNA Engine Montynis 2 1685 Last post 2007/08/02 09:54:14
by Montynis
Problem with the pick Hazy Mind 3D Engine Zandman26 0 1422 Last post 2007/08/06 15:04:06
by Zandman26
Animation Problem.. Hazy Mind XNA Engine DoomMarine 10 3540 Last post 2008/04/25 19:32:58
by DoomMarine
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.65 seconds with 19 queries.