Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I find that if I have my app running which displays a mesh rotating in a viewport that after a time the pc starts to lag if I try to do anything else. Change focus to another app, move mouse etc.

 

Is there some form of garbage collection I might be not aware of?

My website
Posted
I do dispose of the objects etc when say selecting another mesh etc. The lag seems to occur when the mesh is being rotated in the viewport. No disposing can take place here as the objects are in use?
My website
Posted

? but I have looked through my code and eack proc that gets called releases any objects it creates prior to leaving?

 

There is definte lag as whilst the app is running if I open My Documents for example there is delay and the mouse cursor lags:(

 

I'll look again, any pointers on the best way to find if it is memory leak?

My website
Posted

OK this is what is happening;

 

The render loop runs as usual ->

 

Render

Application.DoEvents

 

The application itself does not lag. But if I kick of the render loop and just leave it running then try to open up another app, folder etc there is a delay and the mouse jitters??

 

This is the code involved:

 


Private Sub Render()

       Dim intX As Integer

       If m_obj3DDevice Is Nothing Then

           Return

       End If

       Try

           ' clear the backbuffer to the colour set by user, black when first run 

           m_obj3DDevice.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, m_colBackColour, 1.0F, 0)

           ' begin the scene

           m_obj3DDevice.BeginScene()

           ' setup the world, view, and projection matrices

           SetupMatrices()

           ' meshes are divided into subsets, one for each material, render them in a loop

           For intX = 0 To m_matMaterial.Length - 1

               ' set the material for this subset

               m_obj3DDevice.Material = m_matMaterial(intX)

               ' draw the mesh subset

               m_mshMesh.DrawSubset(intX)

           Next intX

           'end the scene

           m_obj3DDevice.EndScene()

           ' display on screen

           m_obj3DDevice.Present()

       Catch objException As Exception

           ' bugger, somethings gone wrong, so tell user

           MessageBox.Show("The following error has occured during the render process" & ControlChars.CrLf & _
                           ControlChars.CrLf & objException.Message, "Mesh View ~ Render Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

           ' set flg to stop this code being called again

           m_blnRenderScene = False

       End Try

   End Sub

My website
Posted

Mmm how odd!

 

I have just loaded the app on my PC at work and there is no loag as far as other apps are concerned but the animation is a bit jitty probably cos the Video Card is naff?

 

Running on an RM P4 1.8 GHZ, 512MB RAM and Intel® 82845G/GL 64MB the animation is jitty but no lag on other apps.

 

Running on a Mobile P4 2.2GHZ, 640MB RAM and GeoForce4 420 Go 32MB the animation is well smooth but other apps jitter????

My website
  • 2 weeks later...
Posted

Not sure if this is the answer but still looking into this on my laptop my graphics card and usb host both share IRQ7 and I have a usb mouse.

 

Me thinks could this be it? Anyone know the ins and outs of IRQs?

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...