Skip to main content
GameDev.net gamedev.net
🔒 Locked

Drawing

Started by Newbie00 Dec 28, 2003 at 2:18 AM 8 replies 350+ views
Original Post
Newbie00
Newbie00
How would I draw a bmp onto another games surface?
Jok
Jok
You should write questions more correctly, detailing your broblem.
Newbie00
Newbie00
I would like to display a bmp on top of the game through my d3d8.dll proxy dll. What API would I use?
Nik02
Nik02
If you have to ask, then it''s too complicated for you at this time.

kind rgds,
-Nik
Niko Suni
NogginBoink
NogginBoink
Nik, that''s a very unhelpful answer.

Newbie, from what I''ve read, Microsoft removed DirectDraw (the 3D drawing interface) from DX8 and put most of the functionality back in DX9. From the comments I''ve seen, drawing 2D in DX8 is a royal PITA.

You may wish to consider writing for DX9.
aker_jus
aker_jus
NogginBoink, since what you know is what you have heard, you can''t provide an answer either. Rendering 2D is a piece of cake in D3D8/9 using TL vertices or orthographic mode.
"and put most of the functionality back in DX9"
They did not put the *directdraw* functionality back into DX9, it is the same way as D3D8. Honestly, I don''t know how your answer solved noob''s problems. He wants to render a bmp onto a game''s surface, that game can be 3d, so what are you talking about DD? I have not done such a thing, render on a game''s backbuffer directly, I dont think it can be done either. Even if it can be done, it would be slow; locking the backbuffer is very slow unless it is craeted with a lockable format. Perhaps newbie can tell some more about his idea.
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
bigbadboo
bigbadboo
sorry, Im pretty new to this myself, but how about billboarding? (just a suggestion if you are totally stuck or got time to experiment)

take a look at the billboarding samples
--------------------------A good discussion is like a miniskirt; Short enough to pertain interest and long enough to cover the subject..
Nik02
Nik02
Since he/she mentioned having a proxy d3d8.dll already, I implicitly assumed he/she knows how to deal with D3D8 API.
That is, incidentally, the API that should be used to blit between d3d8 surfaces
At very least, to lock a d3d8 surface, one needs it''s native interface pointer (even if one plans to use your own blitter routine or API).

Sorry if I sounded unhelpful

-Nik
Niko Suni
SelethD
SelethD
Buy the book "Programming Role Playing Games with DirectX"

or at least go to a bookstore, and look through it and see if its right for you.

I covers how to draw a 2d bitmap in a 3d enviroment, and vice versa.
circlesoft
circlesoft
I don''t think the bulk of his problem is in the drawing part - it''s the hooking part of the IDirect3DDevice8''s functions (such as EndScene() and Present()). It is not that hard to do - I have done it for a project before, but it is a little bit of work. You have to make your own IDirect3DDevice8 interface (inherited from IDirect3DDevice8) and go from there. I remember a thread like this from the past - do a search of this forum, and you should be able to find something.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.