Woohoo :D, Agreement No. 2 :DQuote:
Posted by NoteMe
I am totaly in....
Woohoo :D, Agreement No. 2 :DQuote:
Posted by NoteMe
I am totaly in....
Option B it is then...;)Quote:
Originally posted by Electroman
So is it:Code:// Option A...
// Constructor
/************************\
|* Edited By NoteMe *|
|* At: 20-05-2004 *|
\************************/
CApp::CApp()
{
g_pCApp = this;
m_bActive = FALSE;
m_strWindowTitle = _T("Tiki's Garden v 0.1");
m_dwWidth = 640;
m_dwHeight = 480;
}
// Or
// Option B...
// Constructor
CApp::CApp()
// Edited By NoteMe At: 20-05-2004
{
g_pCApp = this;
m_bActive = FALSE;
m_strWindowTitle = _T("Tiki's Garden v 0.1");
m_dwWidth = 640;
m_dwHeight = 480;
}
Quote:
Originally posted by Electroman
Haven't got a clue, haven't used C++ that much yet, only played around with consoles remember, but I can learn fast ;).
This is things that no VC++ book sais anything about...but I think I am getting somewhere now..:D
I am now proud to present the 23 first working files in our project....:D..
I changed the edited by ØØ thingy for every function a bit..see if you like it or not...
http://terrain.electromanuk.com/samples/tiki.rar
And since you don't like rar..then try ZIP
BTW rar = weird in Norwegian..:D
http://terrain.electromanuk.com/samples/tiki.zip
That makes sense cos .rar means wierd to me ;).Quote:
Posted by NoteMe
BTW rar = weird in Norwegian..:D
Hehe...there is so many functions here..:D...not sure if that is for all the functions, but if there is just as many functions in all the other classes then I am not sure if I ever going to finish this...:D
http://vbforums.com/attachment.php?s=&postid=1696159
Picture's a bit blurry but is that the one from the book then :eek:
Quote:
Originally posted by Electroman
Picture's a bit blurry but is that the one from the book then :eek:
I had to scale it down to get a print screen...yeah that is two of the clases in the Gaia Engine..:D
Added some more classes to it last night...this is going to be a big ****er..::D...I think I will hang it on my wall when I am finished..:D
I don't think it's going to be that big. Yeah its a big project but when you think of how large a whole fully functioning game is it won't be as bad. Planning it before hand too will make it easier ;).
Yeah but the gaia engine has nearly 200 files...and there is a lot of functions is a lot of them...so if I ever finish this UML thingy for it, I think I need my whole wall..:D
You know you've been documenting Gaia, well have you seen this yet, http://www.mightystudios.com/content/view/18/29/, it might come in handy ;).
Quote:
Originally posted by Electroman
You know you've been documenting Gaia, well have you seen this yet, http://www.mightystudios.com/content/view/18/29/, it might come in handy ;).
I know...on the old page he had a document with this an 20 more pages...I printed it out, but didn't download it....so I can't show it too you...but it doesn't contain all the classes, and not the function....
BTW should we add a page with the coding style...I feel like it is slipping a bit away here in the thread...:D
Hehehe...:D
Quote:
I am the moderator fro the Games & Graphics Section over at VBForums.com which is where I meant NoteMe
hehe, wonder if that shows up when I edit it ;).Quote:
Posted by NoteMe
Hehehe...:D
YEah I'll see if I can get some time to do it, I plan to get my essays done today and tomorrow mostly revision for my exam on wedensday. I will probably get some time free when I'm not revising then though.Quote:
Posted by NoteMe
BTW should we add a page with the coding style...I feel like it is slipping a bit away here in the thread...:D
You sound like my GF...I will do it today...the next day..I will do it today...the next day...I will do it today...:D
Just kidding with you.
Just take your time...I can add it to the ToDo list...and then you can do it after 4th June. Or when you have the time.
:lol: :lol:
Yeah i hope I get some time before then but I'll see ;).
Have you ever used a memory manager....I am always afreaid to forget to clean things up...and I read this cool article about how to make one, but it was very unclear on how to implement it.
But I stumbeled over this right now...:D
http://www.flipcode.com/cgi-bin/msg....m=askmid&id=-1
*Bump*
Just showing there is still life in this thread ;)
Well I will soon have finished my exams and be back on this project :D. Whereas you have ages left :D:D.
So for are we actually going to render the trianlges, are we going to use TRIANGLE_STRIP or TRIANGLE_LIST. I would have thought the list one would be best because we are altering it so much but it would use lots more verts than the Stip does.
What you think?
BTW I'm gonna draw a diagram in a bit to show the triangle arrabgment ;).
I am not sure what is best. What did Gaia use?
BTW maybe we can start to add on things to that iteration plan soon. So it is easier to see what we are going to start with?
Like if we are going to make a "map editor" so the engine can read the terrain in, and then display it?
I have a idea for the file structure but it depends, it might need a little more optimising.
Will have a look at Gaia...
Did you ever finish that multithreading thingy? Can I see the message loop in that thingy?
Yeah I am still working on the DirectX part of it but the rest is good enough ;). I know what your like about classes but seen as though there wouldn't be two or more instances I just enclosed it in files ;).
If you want to class it up I suppose I am ok with it, just post what changes you make ;).
Are you running your code in Debug or in Runtime?
I get this message when I run it...scary...
Quote:
Direct3D9: :====> ENTER: DLLMAIN(00d83950): Process Attach: 000008a8, tid=00000498
Direct3D9: (WARN) :Executing processor detection code (benign first-chance exception possible)
Direct3D9: (INFO) :MMX detected
Direct3D9: (INFO) :Pentium Pro CPU features (fcomi, cmov) detected
Direct3D9: (INFO) :dwCPUFamily = 6, dwCPUFeatures = 7
Direct3D9: (INFO) :szCPUString = AuthenticAMD
Direct3D9: (INFO) :Win2K SP1 or above detected - enabling VB swap workaround
Direct3D9: :====> EXIT: DLLMAIN(00d83950): Process Attach: 000008a8
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (ERROR) :Invalid Flags parameter: Exactly one of the following must be set: D3DCREATE_HARDWARE_VERTEXPROCESSING, D3DCREATE_SOFTWARE_VERTEXPROCESSING or D3DCREATE_MIXED_VERTEXPROCESSING. ValidateCreateDevice failed.
Direct3D9: (INFO) :======================= Hal HWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style 9
Direct3D9: :BackBufferCount not specified, considered default 1
Direct3D9: :DoneExclusiveMode
Direct3D9: (INFO) :Failed to create driver indexbuffer
'Basis.exe': Loaded 'C:\WINNT\system32\hid.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\SETUPAPI.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\USERENV.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\comctl32.dll', Cannot find or open a required DBG file.
The thread 'Win32 Thread' (0x804) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x498) has exited with code 0 (0x0).
Direct3D9: :====> ENTER: DLLMAIN(00d83950): Process Detach 000008a8, tid=0000077c
Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 93
Direct3D9: (ERROR) :Current Process (pid) = 000008a8
Direct3D9: (ERROR) :Memory Address: 006e4054 lAllocID=1 dwSize=000047f8, ReturnAddr=00d83796 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ea94c lAllocID=11 dwSize=000011b8, ReturnAddr=00d7e1e9 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ea86c lAllocID=12 dwSize=00000008, ReturnAddr=00d7e289 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ebb44 lAllocID=13 dwSize=000005a0, ReturnAddr=00d82f45 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006e8b24 lAllocID=35 dwSize=000006bc, ReturnAddr=00d8f12f (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006e92b4 lAllocID=38 dwSize=00001584, ReturnAddr=00d8478b (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ec11c lAllocID=40 dwSize=00000008, ReturnAddr=00d848bc (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 00f40064 lAllocID=43 dwSize=00003500, ReturnAddr=00d83796 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ec164 lAllocID=44 dwSize=00000198, ReturnAddr=00d83796 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 006ea8b4 lAllocID=45 dwSize=00000030, ReturnAddr=00d83796 (pid=000008a8)
Direct3D9: (ERROR) :Memory Address: 00f4359c lAllocID=46 dwSize=00001020, ReturnAddr=00d83796 (pid=000008a8)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 49800 bytes
Direct3D9: :====> EXIT: DLLMAIN(00d83950): Process Detach 000008a8
The program '[2216] Basis.exe: Native' has exited with code 0 (0x0).
So does that run?
I ran it on my PC and didn't get any of those messages :confused:, we are talking about the output box yea?
BTW you should notice this was mainly the code I had for the demo thing for the Games Section soon, it was gonna be modifyed quite a lot before we used it for the project ;).
After I changed line 83 in the mydirectx.cpp file to this:
I am getting less errors...Code:if (FAILED(g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_PUREDEVICE && D3DCREATE_HARDWARE_VERTEXPROCESSING, &g_d3dpp, &g_pD3DDevice )))
Quote:
Direct3D9: :====> ENTER: DLLMAIN(00d93950): Process Attach: 00000994, tid=0000099c
Direct3D9: (WARN) :Executing processor detection code (benign first-chance exception possible)
Direct3D9: (INFO) :MMX detected
Direct3D9: (INFO) :Pentium Pro CPU features (fcomi, cmov) detected
Direct3D9: (INFO) :dwCPUFamily = 6, dwCPUFeatures = 7
Direct3D9: (INFO) :szCPUString = AuthenticAMD
Direct3D9: (INFO) :Win2K SP1 or above detected - enabling VB swap workaround
Direct3D9: :====> EXIT: DLLMAIN(00d93950): Process Attach: 00000994
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (ERROR) :Invalid BehaviorFlags parameter. ValidateCreateDevice failed.
Direct3D9: (INFO) :======================= Hal HWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style 9
Direct3D9: :BackBufferCount not specified, considered default 1
Direct3D9: :DoneExclusiveMode
Direct3D9: (INFO) :Failed to create driver indexbuffer
'Basis.exe': Loaded 'C:\WINNT\system32\hid.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\SETUPAPI.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\USERENV.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\comctl32.dll', Cannot find or open a required DBG file.
The thread 'Win32 Thread' (0x940) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x99c) has exited with code 0 (0x0).
Direct3D9: :====> ENTER: DLLMAIN(00d93950): Process Detach 00000994, tid=00000990
Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 93
Direct3D9: (ERROR) :Current Process (pid) = 00000994
Direct3D9: (ERROR) :Memory Address: 006f4054 lAllocID=1 dwSize=000047f8, ReturnAddr=00d93796 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fa94c lAllocID=11 dwSize=000011b8, ReturnAddr=00d8e1e9 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fa86c lAllocID=12 dwSize=00000008, ReturnAddr=00d8e289 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fbb44 lAllocID=13 dwSize=000005a0, ReturnAddr=00d92f45 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006f8b24 lAllocID=35 dwSize=000006bc, ReturnAddr=00d9f12f (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006f92b4 lAllocID=38 dwSize=00001584, ReturnAddr=00d9478b (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fc11c lAllocID=40 dwSize=00000008, ReturnAddr=00d948bc (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 00f50064 lAllocID=43 dwSize=00003500, ReturnAddr=00d93796 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fc164 lAllocID=44 dwSize=00000198, ReturnAddr=00d93796 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 006fa8b4 lAllocID=45 dwSize=00000030, ReturnAddr=00d93796 (pid=00000994)
Direct3D9: (ERROR) :Memory Address: 00f5359c lAllocID=46 dwSize=00001020, ReturnAddr=00d93796 (pid=00000994)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 49800 bytes
Direct3D9: :====> EXIT: DLLMAIN(00d93950): Process Detach 00000994
The program '[2452] Basis.exe: Native' has exited with code 0 (0x0).
Your PC is strange, mine has no trouble compiling it :confused:.
My output is:Code:'Basis.exe': Loaded 'D:\My Projects\CPP\TikisGarden\Tests\Basis\Debug\Basis.exe', Symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Logitech\MouseWare\system\LgWndHk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\CTAGENT.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Common Files\Logitech\Scrolling\LGMSGHK.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded.
The thread 'Win32 Thread' (0x2f4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xeb0) has exited with code 0 (0x0).
The program '[2496] Basis.exe: Native' has exited with code 0 (0x0).
Are you using the
Debug -> Direc3D -> Debug mode way to start it?
:confused: Not sure what you mean so I will guess not :(. Don't forget I'm not used to using Dx with C++ :(.Quote:
Posted by NoteMe
Are you using the
Debug -> Direc3D -> Debug mode way to start it?
Ow I see now, will try it....
Not me either...2 sec...and I will show you a post....
I ment Pic..:D
http://vbforums.com/attachment.php?s=&postid=1709950
I now get:Code:'Basis.exe': Loaded 'D:\My Projects\CPP\TikisGarden\Tests\Basis\Debug\Basis.exe', Symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Logitech\MouseWare\system\LgWndHk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\CTAGENT.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Common Files\Logitech\Scrolling\LGMSGHK.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded.
Direct3D9: (ERROR) :Invalid BehaviorFlags parameter. ValidateCreateDevice failed.
Direct3D9: (INFO) :======================= Hal HWVP device selected
'Direct3D HAL (HWVP) Device 1': Attached to debug monitor.
'Basis.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded.
The thread 'Win32 Thread' (0xd94) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xfb0) has exited with code 0 (0x0).
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 91
Direct3D9: (ERROR) :Current Process (pid) = 000005ec
Direct3D9: (ERROR) :Memory Address: 003385fc lAllocID=1 dwSize=000047f8, ReturnAddr=00cd3796 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 00335c84 lAllocID=9 dwSize=000019bc, ReturnAddr=00cce1e9 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 003352b4 lAllocID=10 dwSize=00000008, ReturnAddr=00cce289 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 0033f2dc lAllocID=11 dwSize=00000860, ReturnAddr=00cd2f45 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 0033ce2c lAllocID=27 dwSize=000006bc, ReturnAddr=00cdf12f (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 0033d51c lAllocID=29 dwSize=00001d88, ReturnAddr=00cd478b (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 0033857c lAllocID=31 dwSize=00000008, ReturnAddr=00cd48bc (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 00ea0064 lAllocID=33 dwSize=00003500, ReturnAddr=00cd3796 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 003358c4 lAllocID=34 dwSize=00000198, ReturnAddr=00cd3796 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 003353a4 lAllocID=35 dwSize=00000030, ReturnAddr=00cd3796 (pid=000005ec)
Direct3D9: (ERROR) :Memory Address: 00ea359c lAllocID=36 dwSize=00001020, ReturnAddr=00cd3796 (pid=000005ec)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 54608 bytes
The program '[1516] Basis.exe: Native' has exited with code 0 (0x0).
The program '[1516] Basis.exe: Direct3D HAL (HWVP) Device 1' has exited with code 0 (0x0).
So you are getting this too:
Direct3D9: (ERROR) :Invalid BehaviorFlags parameter. ValidateCreateDevice failed.
Direct3D9: (INFO) :======================= Hal HWVP device selected
Fixed that by removing the line that tries to use the pure device ;).Quote:
Posted by NoteMe
So you are getting this too:
Direct3D9: (ERROR) :Invalid BehaviorFlags parameter. ValidateCreateDevice failed.
Direct3D9: (INFO) :======================= Hal HWVP device selected
Which leaves us with just:I wouldn't be suprised if I have missed the odd deallocation of some memory becuase I haven't properly check it :(.Code:Direct3D9: (ERROR) :Memory still allocated! Alloc count = 91
Direct3D9: (ERROR) :Current Process (pid) = 00000764
Direct3D9: (ERROR) :Memory Address: 003384c4 lAllocID=1 dwSize=000047f8, ReturnAddr=00ce3796 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 00335b4c lAllocID=9 dwSize=000019bc, ReturnAddr=00cde1e9 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033517c lAllocID=10 dwSize=00000008, ReturnAddr=00cde289 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033f1a4 lAllocID=11 dwSize=00000860, ReturnAddr=00ce2f45 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033ccf4 lAllocID=20 dwSize=000006bc, ReturnAddr=00cef12f (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033d3e4 lAllocID=22 dwSize=00001d88, ReturnAddr=00ce478b (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 00338444 lAllocID=24 dwSize=00000008, ReturnAddr=00ce48bc (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 00ea0064 lAllocID=26 dwSize=00003500, ReturnAddr=00ce3796 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033753c lAllocID=27 dwSize=00000198, ReturnAddr=00ce3796 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 0033526c lAllocID=28 dwSize=00000030, ReturnAddr=00ce3796 (pid=00000764)
Direct3D9: (ERROR) :Memory Address: 00ea359c lAllocID=29 dwSize=00001020, ReturnAddr=00ce3796 (pid=00000764)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 54608 bytes
Is it a memory leak? If so I bet it has something with the 2 threads you have made.
BTW I am also getting this error:
Direct3D9: :BackBufferCount not specified, considered default 1
Why is your code like this?
Code:
if (bWindowed)
{
g_d3dpp.BackBufferFormat = d3ddm.Format;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
// Make sure the window is the same size...
g_XRes = XRes;
g_YRes = YRes;
RECT* pScreen = NULL;
pScreen = new RECT;
GetWindowRect(hWnd, pScreen);
MoveWindow(hWnd, pScreen->left, pScreen->top, g_XRes, g_YRes, true);
delete pScreen;
}
else
{
g_d3dpp.BackBufferWidth = XRes;
g_d3dpp.BackBufferHeight = YRes;
g_d3dpp.BackBufferCount = 1;
g_d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
}
Quote:
Originally posted by Electroman
Fixed that by removing the line that tries to use the pure device ;).
Quote:
D3DCREATE_PUREDEVICE
Specifies that Direct3D does not support Get* calls for anything that can be stored in state blocks. It also tells Direct3D not to provide any emulation services for vertex processing. This means that if the device does not support vertex processing, then the application can use only post-transformed vertices.
Quote:
D3DCREATE_HARDWARE_VERTEXPROCESSING
Specifies hardware vertex processing.
What is actualy the diffrence? The Get thingy?
As for the code it should be:I think I was thinking of how Dx7 handled windowed mode (no back buffer ;)).Code:if (bWindowed)
{
g_d3dpp.BackBufferFormat = d3ddm.Format;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
// Make sure the window is the same size...
g_XRes = XRes;
g_YRes = YRes;
RECT* pScreen = NULL;
pScreen = new RECT;
GetWindowRect(hWnd, pScreen);
MoveWindow(hWnd, pScreen->left, pScreen->top, g_XRes, g_YRes, true);
delete pScreen;
}
else
{
g_d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
}
g_d3dpp.BackBufferWidth = XRes;
g_d3dpp.BackBufferHeight = YRes;
g_d3dpp.BackBufferCount = 1;
Yea I think so, I just saw it once a long time ago and ever since I have used it to set up a D3D Device :blush:. Basically I was to believe that it went in order of best to worst:Quote:
Posted by NoteMe
What is actualy the diffrence? The Get thingy?
PureDevice
Hardware Processing
Software Processing
This was in VB and it never used the PureDevice for my old GPU anyway so I couldn't tell what the error had been :(.
Quote:
Originally posted by Electroman
As for the code it should be:I think I was thinking of how Dx7 handled windowed mode (no back buffer ;)).Code:if (bWindowed)
{
g_d3dpp.BackBufferFormat = d3ddm.Format;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
// Make sure the window is the same size...
g_XRes = XRes;
g_YRes = YRes;
RECT* pScreen = NULL;
pScreen = new RECT;
GetWindowRect(hWnd, pScreen);
MoveWindow(hWnd, pScreen->left, pScreen->top, g_XRes, g_YRes, true);
delete pScreen;
}
else
{
g_d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
}
g_d3dpp.BackBufferWidth = XRes;
g_d3dpp.BackBufferHeight = YRes;
g_d3dpp.BackBufferCount = 1;
OK...I can agree to that...;)...
BTW I am also getting this error:
Direct3D9: (INFO) :Failed to create driver indexbuffer
I bet that must be a ATI driver error actualy. Can't belive it. Maybe it is a good thing that you have NViDIA and I have ATI. Then we get to test it on both cards...;)
Quote:
Originally posted by Electroman
Yea I think so, I just saw it once a long time ago and ever since I have used it to set up a D3D Device :blush:. Basically I was to believe that it went in order of best to worst:
PureDevice
Hardware Processing
Software Processing
This was in VB and it never used the PureDevice for my old GPU anyway so I couldn't tell what the error had been :(.
Well well, it at least works now. But the last memory probelm is a *****. It looks like some of the DX objects don't get cleared up before the threads finishes...did you add some DI or something that you havn't made the Free code for or something? Or are you forgetting to call it or something?
Yea, mind I wish I was back to ATi, I am really starting to ahte this card :cry:. It overheats far too much. Could just be my case has bad ventalation but either way its far too hot :(.
If the multi threading is causing the problem with the memory error then I have an idea why and will test something.....
Quote:
Originally posted by Electroman
Yea, mind I wish I was back to ATi, I am really starting to ahte this card :cry:. It overheats far too much. Could just be my case has bad ventalation but either way its far too hot :(.
If the multi threading is causing the problem with the memory error then I have an idea why and will test something.....
ARe you releasing it with the same thread as you are creating it?
Haha....Fixed it :D.
The problem is if you close the program by clicking the X button it doesn't terminate the Game Thread, only the window which in turn "Terminates" the game thread. And this way doesn't let it free the memory. I designed the Game Thread to be closed from within itself and didn't think about it being closed due to a message.Code:'Basis.exe': Loaded 'D:\My Projects\CPP\TikisGarden\Tests\Basis\Debug\Basis.exe', Symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Logitech\MouseWare\system\LgWndHk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\CTAGENT.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\Program Files\Common Files\Logitech\Scrolling\LGMSGHK.DLL', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll', No symbols loaded.
Direct3D9: (INFO) :======================= Hal HWVP device selected
'Direct3D HAL (HWVP) Device 1': Attached to debug monitor.
'Basis.exe': Loaded 'C:\WINDOWS\system32\hid.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', No symbols loaded.
The thread 'Win32 Thread' (0x21c) has exited with code 0 (0x0).
The thread 'Direct3D HAL (HWVP) Device 1' (0x1) has exited with code 0 (0x0).
The program '[2732] Basis.exe: Direct3D HAL (HWVP) Device 1' has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf68) has exited with code 0 (0x0).
The program '[2732] Basis.exe: Native' has exited with code 0 (0x0).
All works now, to get these results close the window using the Esacpe Key, I will code the stuff that will make the X button work but for now stick witht he escape key ;). Shouldn't take me long to code it I think :D :D :D.
Getting smaller warnings and info texts every time..:D
I have made two of the comments in bold. Do you think the first "warning" there is good, or bad? Is it becuase I have Win2K and you XP?Quote:
'Basis.exe': Loaded 'D:\Terrain\Tiki\basis\Debug\Basis.exe', Symbols loaded.
'Basis.exe': Loaded 'C:\WINNT\system32\NTDLL.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\dinput8.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINNT\system32\msvcrt.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINNT\system32\KERNEL32.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\ADVAPI32.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\rpcrt4.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\USER32.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\GDI32.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\d3d9.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINNT\system32\d3d8thk.dll', No symbols loaded.
'Basis.exe': Loaded 'C:\WINNT\system32\version.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\lz32.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\winmm.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\mmdrv.dll', Cannot find or open a required DBG file.
'Basis.exe': Unloaded 'C:\WINNT\system32\mmdrv.dll'
'Basis.exe': Loaded 'C:\WINNT\system32\d3d9d.dll', No symbols loaded.
Direct3D9: :====> ENTER: DLLMAIN(00d93950): Process Attach: 00000988, tid=00000600
Direct3D9: (WARN) :Executing processor detection code (benign first-chance exception possible)
Direct3D9: (INFO) :MMX detected
Direct3D9: (INFO) :Pentium Pro CPU features (fcomi, cmov) detected
Direct3D9: (INFO) :dwCPUFamily = 6, dwCPUFeatures = 7
Direct3D9: (INFO) :szCPUString = AuthenticAMD
Direct3D9: (INFO) :Win2K SP1 or above detected - enabling VB swap workaround
Direct3D9: :====> EXIT: DLLMAIN(00d93950): Process Attach: 00000988
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (INFO) :======================= Hal HWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style 9
Direct3D9: :DoneExclusiveMode
Direct3D9: (INFO) :Failed to create driver indexbuffer
'Direct3D HAL (HWVP) Device 1': Attached to debug monitor.
'Basis.exe': Loaded 'C:\WINNT\system32\hid.dll', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\SETUPAPI.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\USERENV.DLL', Cannot find or open a required DBG file.
'Basis.exe': Loaded 'C:\WINNT\system32\comctl32.dll', Cannot find or open a required DBG file.
The thread 'Win32 Thread' (0x904) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x600) has exited with code 0 (0x0).
The thread 'Direct3D HAL (HWVP) Device 1' (0x1) has exited with code 0 (0x0).
The program '[2440] Basis.exe: Direct3D HAL (HWVP) Device 1' has exited with code 0 (0x0).
Direct3D9: :====> ENTER: DLLMAIN(00d93950): Process Detach 00000988, tid=000008d8
Direct3D9: (INFO) :MemFini!
Direct3D9: :====> EXIT: DLLMAIN(00d93950): Process Detach 00000988
The program '[2440] Basis.exe: Native' has exited with code 0 (0x0).
The second one I don't like at all....I actualy hate it...:(
BTW I have asked abou the DBG files on the MSDN forum. Maybe I get an answer to that too...:D
Have you fallen out with google recently ;)Quote:
Posted by NoteMe
BTW I have asked abou the DBG files on the MSDN forum. Maybe I get an answer to that too...:D
http://support.microsoft.com/default...;en-us;q121366
BTW, if I first clean the solutuion, then build it again: I get some more warnings..:D
Should we add a DI version like we do for D3D?Quote:
Compiling...
winmain.cpp
mydirectx.cpp
d:\dx9sdkb\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
gamemain.cpp
d:\dx9sdkb\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
d:\Terrain\Tiki\basis\gamemain.cpp(21) : warning C4309: 'initializing' : truncation of constant value
Generating Code...
Linking...
And what is that truncating of constant value meaning?
Ohhh....I got it...you are usign DI8....:D
I was just gonna point out you aren't running XP then, but I guess you thought of that already :rolleyes:.Quote:
Posted by NoteMe
Getting smaller warnings and info texts every time..:D
I have made two of the comments in bold. Do you think the first "warning" there is good, or bad? Is it becuase I have Win2K and you XP?
The second one I don't like at all....I actualy hate it...:(
As for the index buffer I'm not sure what to think, cos we aren't trying to use an index buffer (yet) :sick:.
At least the "Real" errors are gone ;).
Yea thats why I was asking in the games section about Caps so I could check for different formats :(. My card doesn't support D32 :eek: but does support D24, ATi's normally support D32 but not D24 :rolleyes:Quote:
Posted by NoteMe
Ohhh....I got it...you are usign DI8....:D
Why did you think this was important at the moment though ?
Quote:
Originally posted by Electroman
I was just gonna point out you aren't running XP then, but I guess you thought of that already :rolleyes:.
As for the index buffer I'm not sure what to think, cos we aren't trying to use an index buffer (yet) :sick:.
At least the "Real" errors are gone ;).
Yeah it is...I am soo happy...:D....but you havn't used our commenting standard all over the place...:eek:...
Think I will make a UML diagram over it now. And then I will go to sleep...;)
Now I look stupid becuase you wrote DI8 not D16 :cry:Quote:
Originally posted by Electroman
Yea thats why I was asking in the games section about Caps so I could check for different formats :(. My card doesn't support D32 :eek: but does support D24, ATi's normally support D32 but not D24 :rolleyes:
Why did you think this was important at the moment though ?
Quote:
Originally posted by Electroman
Yea thats why I was asking in the games section about Caps so I could check for different formats :(. My card doesn't support D32 :eek: but does support D24, ATi's normally support D32 but not D24 :rolleyes:
Why did you think this was important at the moment though ?
I was talking about DInput..:confused: