Jump to content

  • Log In with Google      Sign In   
  • Create Account


GhostfromTexas

Member Since 11 Jul 2010
Offline Last Active May 18 2011 08:31 PM
-----

Topics I've Started

[C++, VS 2010 Ultimate] Advanced memory leak detection

15 May 2011 - 12:28 PM

I am having a hard time tracking down some memory leaks in my program.. I am using the CRT visual c++ debugger, which is great for finding memory leaks that have consistant allocation numbers. But these memory leaks have different allocation numbers each time the program is run, so it's quite difficult to find what allocation is causing the leak.

Is there a way to log all memory allocations so I can go back later and figure out which one specifically happened for the particular time I ran the program? Or some better method of solving the memory leak issue?

Thanks in advance...

[DX] Helpful Color List Header

14 March 2011 - 09:36 PM

I ended up making this for my project since I know I have a lot of colors that are randomly defined by name, so I figured I'd spend a few hours and make a really large compilation of a lot of colors that could be used throughout my project.

The header has #defines and const variables to use. Just block comment out the section you don't want.

http://www.cameronferguson.net/UTILSColors.h

feel free to do with this what you want.. I don't care for credit or anything, just a list I thought I'd share. The colors came from wikipedia's list of colors. So they are named accordingly there with sample colors of what it looks like. The link is in the header comment of the file.

Enjoy!
GhostfromTexas

Visual Studio build options

19 February 2011 - 10:50 AM

I've done a lot of digging through the University of Google but haven't found anything so far. I am managing a fairly large project at the moment and our compile times do get quite large. Right now depending on the way I want to compile, I have go to in and change several options under my debug configuration to swap between doing incremental builds and multi-processor builds.

By doing a multi-processor build (/MP), then incremental build option (/Gm) must be turned off. Which is fine, but I am looking for a way to easily swap between different build options under the SAME configuration. I don't want a new configuration.. i want this to all work under debug mode. Preferably, I'd like to be able to create a toolbar button or keyboard shortcut that will build the project differently depending on which button I hit.

Does anyone know of the ability to do this or an addin that will help?

I am using Visual Studio 2010 Ultimate Edition

Thanks for your time!

[DX9, c++] Is there a good book that explains quaternians for gamedev?

03 October 2010 - 05:22 AM

Hey guys. I am starting to look using quaternion to help with some rotation algorithms... Specifically I am wanting to take an object pointing in 1 direction, and rotate it to point another direction.

Are there any good popular books that have great examples and tutorials on using quaternions in DirectX? I am trying to find one I can go readily grab at a local book store in the DFW area...

Thanks!
GFT!

[DX9, C++] Lag issue when drawing models for the first frame

16 August 2010 - 04:56 PM

Ok let me try to explain this odd problem as much and as simply as possible, because it does not seem to be a simple problem.

The project I am working on is a basic DX9 game for school. It's our Junior level applied development project. We are doing nothing insanely fancy or out of the ordinary so keep that in mind as I explain the issue.

The summary of the problem is that when I draw models for the first time during the run-time of the game.. there is a small lag issue. After a particular model has been drawn the first time, drawing it again there is 0 lag.

Let me explain the basic setup. I am not loading the .X files when I spawn them in the game. They are loaded at the beginning and stored in memory. Whenever I spawn an entity in the game, it's just accepting a pointer to already loaded model data and simply just draws what's in memory.

I made a basic profiler using the difference of the GetTickCount() method before and after certain areas to try and find the actual spike.

I found the spike directly around the calls:

gd3dDevice->EndScene();
gd3dDevice->Present(0, 0, 0, 0);

The spike does not come from anywhere that handles setting up drawing the objects to the back buffer.. it's only when I go to present that buffer that the issue pops up.

I am using D3DPOOL_MANAGED for my loading on the areas where that's set.

Also, this problem happens on multiple computers of all different types of video cards, processors, driver versions etc. It's not just my computer or my drivers or my gfx card.

This problem also just spawned recently. But I have 0 idea what might have been changed to cause this, I have gone back to older versions I have saved, and the problem doesn't exists, but where it counts that I can find, I don't see anything in the core drawing that would have caused it.

I will post any code that is requested. I have 0 idea where to even consider looking so I have no idea what I would need to post for you guys to look at.

I just know these key things.

The problem lies when presenting the back buffer
The problem does not happen when drawing to the shader
The problem only happens when a model is drawn for the first time during runtime
The problem is gone for that particular model once it has been drawn once

I have also tried to draw the mesh data's subset during the load time for each of those models that cause the issue to see if drawing it once would eliminate the issue like that, and it does not.

If you got any questions.. want to see any part of my code.. or have an idea you want me to try let me know!

Thanks,
GFT

*Update*
I went through using the DirectX Control panel to debug possible errors and warnings that were popping up. I had some issues that I cleared up with it, however when it comes to the lag spike issue itself, there are no warnings or errors that are popping up when it happens.

[Edited by - GhostfromTexas on August 16, 2010 11:51:30 PM]

PARTNERS