Skip to main content
gamedev.net
🔒 Locked

Performance lag

Started by Hog Jan 10, 2004 at 6:12 AM 1 replies 400+ views
Original Post
Hog
Hog
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? VB.NET by the way
(Visual Basic .NET) www.elpuerco.co.uk
aker_jus
aker_jus
Are you calling Application.DoEvents() ?
Are you creating the mesh in the loop?
Post some code too.
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
Hog
Hog
Yes I am calling Application.DoEvents.

No I''m not creating the mesh in the Render loop.

Sample:

''Clear the backbuffer to a blue color
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

Dim intX As Integer

For intX = 0 To m_matMaterial.Length - 1

'' Set the material and texture for this subset
m_obj3DDevice.Material = m_matMaterial(i)

'' Draw the mesh subset
m_mshMesh.DrawSubset(i)

Next intX

''End the scene
m_obj3DDevice.EndScene()

m_obj3DDevice.Present()
(Visual Basic .NET) www.elpuerco.co.uk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.