Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Oct 2008
Offline Last Active Apr 14 2016 05:50 PM

Topics I've Started

GOTO, why are you adverse to using it

04 September 2014 - 09:34 PM

I am an old school programmer, did many stints in assembly (6502,6510,68000,68030,486,586), basic, fortran, pascal, extended languages, c++, c# etc... I use goto on a regular basis to exit out of routines, skipping many lines of code and only incurring a single cache hit. In over 30+ years I know when the proper use of the command is needed, it's no worse than BREAK or CONTINUE for a loop, actually less in fact. What is your aversion to using that command, is it your workplace or your training? I can skip a thousand lines of code with a single command and a single cache hit. Do you have to jump through hoops to get out of a routine? With my experience I know when to use it and not to use it. I want to hear from the professionals why it's such a bad command to use. My typical use is goto ex; which is jump to the exit routine, everything is done, clean up and get out. I'm not a pro by any means (mid-south US, no programming jobs here), just wondering about all the hate on goto is about, it's a very useful command...

GTX 750 problem - SOLVED

27 July 2014 - 11:11 PM

DirectX 9


I just bought a GTX 750 Ti Friday to replace my aging GTX 250 (5 years old). My game engine worked perfectly on the 250 but with the 750 I am getting complete system lockup when starting the game. The main menu works fine. My question is what changed or is there some driver problems with the newer cards?


Whats been tried...

Complete wipe of NVidia drivers 3 times

Complete wipe of DX SDK (VS 2005 Feb 2010)

Maximum debug mode for DX, when did anisotropic become a bad setting for MAG & MIP Filter? Wasn't for the 250, dropped down to LINEAR


What happens

Main menu, renders perfectly, even with all shaders active

Load screens, load perfectly

New scene, never shows, no hud (font sprite), no rendering (deferred shader, transparency forward shader)

Jump back to main menu, load screens flash red and blue, no load screen

Main menu, whole computer locks up if I don't stop debugging fast enough

Only deferred and sky shader active, all others disabled

750 shows 2 gig dedicated, 2 gig shared, 250 did not share memory (4 gig total) (250 1 gig video memory)


Have to do a hard reset every time since the 3 finger salute will not activate.


From my google searches, it's looking like a repeat of the AMD cards issues with the latest NVidia cards, IE buggy drivers, the main reason I stopped using AMD video cards. Any suggestion to fix this problem would be helpful. I have full access to the source code since I wrote it so I can fix it if it's a setup problem.

VS 2005 not saving build setting and window settings

15 July 2013 - 01:26 AM

I have been having this issue with 1 single project for a year now. I have scoured the web multiple times looking for a solution. So here is how it all came about.


Moved from Vista to Win 7 after a nasty trojan trashed my system. Reinstalled all of the software needed to build the project and left the project in the partition it was already in. At that point when I loaded the project it always starts in debug mode, never release mode.


A few weeks ago my Seagate drive failed due to a bad flash rom version (found out afterwards it was a widespread problem with the 1 TB drives). Fortunately Seagate was nice enough to reflash the rom and I now have my code back. Thanks to Seagate, I got back over 2 years worth of code I had lost (dummy me didn't check to make sure my backups were sent to a different HD, I feel like an idiot for this one since I know better). Well now a new issue has cropped up, none of the windows that were opened will be there when I reload the project. I thought there was a setting for that one but I haven't had any luck in finding it.


This is the only project that behaves this way, unfortunately it is the project I work on the most and it is annoying to have to change it back to release mode every time I start VS and reopen all of the windows again. Does anyone know of a solution to either of these issues? None of my other projects have that problem including ones that are even older than this one.

Single pass multi-depth buffer generation

22 March 2013 - 08:29 PM

I've recently implemented shadowing in my game engine. Currently it only has one shadow map and I want to expand it to at least 3 to 4. I was going to try to attempt doing it using a MRT but ran into the issue of only being able to use 1 depth/stencil buffer which is required to keep the depth pixels in order. So any ideas on how to accomplish this? Using a single texture for all will get around the depth/stencil buffer problem but haven't been able to come up with a way to use the MRT or a single channel to a 1/4 slice of the texture.


I am looking to use a cascade shadow mapping technique since I simple calculate a quaternion based position for the shadow map placement directly in front of the player. The reason is I can easily fine-tune the overlap amount.

Resource DLL problem

17 February 2012 - 01:08 AM

I am currently trying to add strings to an empty dll using the BeginUpdateResource, UpdateResource & EndUpdateResource without any luck. I've been hunting the web for several hours but all of the examples simply change an existing resource string, which is not what I need to do.

VC 2005 SP1
Win 7/Vista
C++ with MFC

HANDLE hdll;
DWORD dsz;
BOOL rv;
size_t osz,csz,nsz;
wchar_t *data;
CString d1,d2,tmp;
// set up data to test with
tmp="Test data.";
data = new wchar_t [nsz];
// copy and paste blank.dll
DBFIO.CopyFiles(d1,d2);	 // make copy of empty dll
// update resource entry
if(hdll==NULL) {
	 AfxMessageBox("BeginUpdateResource failed");
	 goto ex;
if(rv==FALSE) {
	 AfxMessageBox("UpdateResource failed");
	 goto ex;
if(rv==FALSE) {
	 AfxMessageBox("EndUpdateResource failed");
	 goto ex;
delete [] data;

Any c++ example code would be appreciated. I does create a "101" resource but not a "2" resource. The "101" is blank though.