Z Buffering Problems
Hello. I am having problems with creating a depth buffer with D3D IM. I have narrowed it down to where the problem is, but the thing is that it quits without an error message. This is the code that is stops at:
hret=lpD3D->EnumZBufferFormats( IID_IDirect3DRGBDevice, EnumZBufferFormatsCallback,
(VOID*)&zpixelf );
if(FAILED(hret))
{
ofile<<"ERROR - Z Buffer Formats Enumeration Error"<<endl;
return FALSE;
}
Now it calls the function and exit the program, however, what you see with ofile, it does not print that to the file. Its something that I am using for Debugging. I am open to any and all suggestions, so any would be appreciative. Again, thanx for any help.
RZ
If I understand what you''re saying, then it''s because you are not closing the file. I think the call would be ofile.close() since that looks like you are using fstream. If the program is crashing or something, and you''re not closing the file, then it won''t write to it. That''s one flaw in the way windows manages disk files. There might be some function that will let you flush the buffer to disk, though, look in the documentation.
------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge
------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge
I am closing the file in the deconstructor, which is called when the program is killed right ?
March 08, 2000 05:08 PM
Umm.. Look at your code, dawg.. =)
the file input says:
{
ofile<<"ERROR - Z Buffer Formats Enumeration Error"< return FALSE;
}
try changing that to:
{
ofile<<"ERROR - Z Buffer Formats Enumeration Error";
return FALSE;
}
--SR
the file input says:
{
ofile<<"ERROR - Z Buffer Formats Enumeration Error"< return FALSE;
}
try changing that to:
{
ofile<<"ERROR - Z Buffer Formats Enumeration Error";
return FALSE;
}
--SR
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement