Solved

DirectDraw: Overlays.

Posted on 1998-12-09
3
1,245 Views
Last Modified: 2012-06-22
I need many infos about Overlays.
1st of all, if i ask the question, it's because it didn't work of course on my computer. What is the recommended hardware for Overlays?
2nd, i used GetCaps
DDCAPS              ddcaps;
HRESULT            ddrval;
ddcaps.dwSize = sizeof( ddcaps );
ddcaps.dwCaps = DDCAPS_ALIGNBOUNDARYSRC | DDCAPS_ALIGNSIZESRC | DDCAPS_ALIGNBOUNDARYDEST |DDCAPS_ALIGNSIZEDEST;
ddrval = lpDD->GetCaps( &ddcaps, NULL );
PutText(ddcaps.dwAlignBoundarySrc,100,100);
PutText(ddcaps.dwAlignBoundaryDest,100,120);
PutText(ddcaps.dwAlignSizeSrc,100,140);
PutText(ddcaps.dwAlignSizeDest,100,160);
PutText(ddcaps.dwMaxVisibleOverlays,100,180);
PutText(ddcaps.dwVidMemTotal,100,200);
PutText(ddcaps.dwCurrVisibleOverlays,100,220);

And my function PutText works of course. the video memory displayed is something like 1700000 so it shows everything works here, however all the other values returned are 0. does this mean my hardware is too bad to display overlays.

Finally everything crashes when i put CreateSurface.
I would really need overlays, so i would be disppointed if i learnt that it only works with very good hardware. my graphic card is not that good however not that bad too!! it's a s3 i think, with 2 mb. it must have 3 years.
The game i want to create is an action-rpg like Zelda, so of course i inspire myself of nitendo games, where i know everything is done with overlays. there are 6 on the super nes!! so i don't see why my computer shouldn't work if the super nes does. thank you very much bye! Any help will surely be graded A because i will appreciate it soooo much!
0
Comment
Question by:FAB
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
kinkajou earned 150 total points
ID: 1179732
A card that supports overlays will have DDCAPS_OVERLAY in ddcaps.dwCaps.

do this after the "ddrval = lpDD->Getcpas (&ddcaps, NULL);" call:

if (ddcaps.dwCaps & DDCAPS_OVERLAY) MessageBox (NULL, "This card supports overlays", "", MB_OK | MB_TOPMOST);
else MessageBox (NULL, "This card does not support overlays", "", MB_OK | MB_TOPMOST);

I suggest three things. Download the DirectX SDK and completely install it - use the help to learn more about overlays. Get a book on DirectX programming that includes information on creating overlays - a good start on DirectDraw is "Direct Draw Programming" by Bret Timmins. Get a video card that supports overlays. The Velocity 128 or 4400 cards support overlay and are priced resonably when you consider all of the awards they have received.
0
 

Author Comment

by:FAB
ID: 1179733
Well, well. First of all if i have asked this question, it's because I HAVE directx sdk! Second, i read everything about overlays, and know what it is, and also know that every game console (nintendo, super nintendo, and surely sega too) have them. i finally learnt, that this function proposed by DirectDraw is only available on "directdraw compatible" cards, as for example the ati xpert@play 98. This is all i wanted to know :-)
Thank you however for the book.
Bye!
PS: do you know if Overlays are software-emulated in directx 6.0?
0
 
LVL 2

Expert Comment

by:kinkajou
ID: 1179734
DirectX does not support software emulation of Overlays according to the DirectX documentation. Use DX6 help and query "Step 2: Testing for Hardware Overlay Support".
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.net build a IF/Then Walkthrough Guide 1 240
Dynamically allocate memory 9 65
Unable to start eclipse ? 17 154
passing data from one form to another form in c++ 27 83
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question