flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > Difference between directdraw 1 and directdraw 7 ? |
Author |
|
vivik 31 Mar 2018, 09:30
Curious what exactly changed since the first version. Going full archaeologist. Only dos is older.
Found one code that uses directdraw 1 here https://www.mycplus.com/tutorials/microsoft-direct-x-programming/directdraw-sample/ , need to search for directdraw 7 examples now. By the way, it really surprised me that directdraw actually allows sprite rotation. Though, hardware not always allow that, and directdraw wouldn't do it in software for you automatically (it will do scalling up and down and filtering for you, but not rotation, too expensive to do in software). |
|||
31 Mar 2018, 09:30 |
|
DimonSoft 31 Mar 2018, 13:00
vivik wrote: Curious what exactly changed since the first version. Going full archaeologist. Only dos is older. I guess, the easiest way would be to look for DirectX SDKs containing these versions. Although I never managed to find anything earlier than DirectX 5 SDK. If you need anything from SDKs 5-6-7, let me know (I guess, SDK documentation would be more useful for your task than plain samples). |
|||
31 Mar 2018, 13:00 |
|
vivik 31 Mar 2018, 14:35
sdk 7 and 5 will be useful. Maybe only docs and a few examples from there.
|
|||
31 Mar 2018, 14:35 |
|
vivik 31 Mar 2018, 15:05
I think I found docs for older directdraw. Need to compare them, to see what changed.
idirectdraw GetAvailableVidMem https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ee490253(v=winembedded.80) IDirectDraw4::GetAvailableVidMem https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms893924(v=msdn.10) https://msdn.microsoft.com/en-us/library/windows/desktop/gg426142(v=vs.85).aspx IDirectDraw7::GetAvailableVidMem |
|||
31 Mar 2018, 15:05 |
|
vivik 31 Mar 2018, 15:55
Well, found the first difference.
IDirectDrawSurface::Lock has DDLOCK_DISCARD, but IDirectDrawSurface7::Lock doesn't. As a consequence, my version of ddraw.h that came with SDK9 doesn't have that... That doesn't tell much though. It only means that I have to search for an older sdk... Really curious if first directdraw will work just as well as the seventh. Though, I probably shouldn't bother... |
|||
31 Mar 2018, 15:55 |
|
vivik 31 Mar 2018, 17:07
I think there is an error in the fasm ddraw example. It uses directdraw1 (since there is no "pDDraw->QueryInterface( IID_IDirectDraw7, ( VOID** )&pDDraw7 )" anywhere), yet it uses directdraw7 flags for ->Lock().
Compare. c:/shared/my_programs/fasmw172/EXAMPLES/DDRAW/DDRAW.INC ; DirectDrawSurface lock flags DDLOCK_SURFACEMEMORYPTR = 000000000h DDLOCK_WAIT = 000000001h DDLOCK_EVENT = 000000002h DDLOCK_READONLY = 000000010h DDLOCK_WRITEONLY = 000000020h DDLOCK_NOSYSLOCK = 000000800h C:\Program Files\Microsoft DirectX SDK (November 2008)\Include ddraw.h (this is SDK9) #define DDLOCK_WAIT 0x00000001L #define DDLOCK_EVENT 0x00000002L #define DDLOCK_READONLY 0x00000010L #define DDLOCK_WRITEONLY 0x00000020L http://ftp.icpdas.com.tw/pub/beta_version/VHM/wince600/at91sam9g45m10ek_armv4i/cesysgen/sdk/inc/ddraw.h #define DDLOCK_READONLY 0x00000001 #define DDLOCK_WRITEONLY 0x00000002 #define DDLOCK_DISCARD 0x00000004 #define DDLOCK_WAITNOTBUSY 0x00000008 After many years of staring in confusion, lol. |
|||
31 Mar 2018, 17:07 |
|
vivik 31 Mar 2018, 17:09
Though, maybe those are wince flags. Yes they are, ignore message above.
Last edited by vivik on 31 Mar 2018, 18:04; edited 1 time in total |
|||
31 Mar 2018, 17:09 |
|
DimonSoft 31 Mar 2018, 17:27
vivik wrote: sdk 7 and 5 will be useful. Maybe only docs and a few examples from there. Cut out docs and DirectDraw samples. Note that DX SDK 7 contains docs for 6.1 for some reason. Included them as well. I had to upload them to Google Drive due to the 5 MB quota of the forum. |
|||
31 Mar 2018, 17:27 |
|
vivik 31 Mar 2018, 17:27
Huh, you can create IDirectDraw7 either with
DirectDrawCreateEx or with DirectDrawCreate QueryInterface https://www.gamedev.net/forums/topic/28908-directdrawcreate-error/ @DimonSoft Thank you~ |
|||
31 Mar 2018, 17:27 |
|
DimonSoft 31 Mar 2018, 22:50
Tomasz Grysztar wrote: I have not re-visited this old DirectDraw example in ages, it was written a bit sloppily and perhaps deserved some careful examination and polishing. Nowadays I should perhaps scrap it entirely and replace with a Direct2D example? IMHO, some simple rotating cube with Direct3D would be more impressive for newbies. |
|||
31 Mar 2018, 22:50 |
|
vivik 01 Apr 2018, 05:20
Don't scrap it, add direct2d nearby if you wish.
Ideally you'd rewrite an entire sdk in assembly, but I can't ask for that, can I? Not many people use assembly for gamedev nowadays. Game examples would be useful... Most of games I know are closed source. |
|||
01 Apr 2018, 05:20 |
|
Tomasz Grysztar 01 Apr 2018, 13:21
vivik wrote: Game examples would be useful... Most of games I know are closed source. |
|||
01 Apr 2018, 13:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.