Using Direct3d for 2d (DirectX 7)
Does anyone have a version of the code for this article that is written for DirectX 7? Or maybe some pointers on how I can convert it over?
I have been attempting to rewrite the DX 6 code to work with DX 7, but since I'm not familiar with Direct3d and the interfaces are changed between 6 and 7, I'm not having any luck at all. I can't seem to get anything to display on the screen. (And yes, I have the lighting render state turned off). I am checking ALL the return codes, and everything is returning DD_OK.
So, does anyone have a Direct7 version of this code or something similar? Or some tips on what I might be doing wrong?
Thanks!
Edited by - jaxson on 8/10/00 11:04:21 PM
Have you create the IID_IDirectDraw7 interface with DirectDrawCreateEx ?
Because when you create the IID_IDirectDraw7 interface with a DirectDrawCreate and after a QueryInterface, this interface doesn''t work with Direct3D.
I have a similar problem when I try to convert my own DirectX class to DirectX7.
Because when you create the IID_IDirectDraw7 interface with a DirectDrawCreate and after a QueryInterface, this interface doesn''t work with Direct3D.
I have a similar problem when I try to convert my own DirectX class to DirectX7.
Thanks for replying, Chagarou. But yes, I am creating the IID_IDirectDraw7 interface with DirectDrawCreateEx. I have tried several different ways to get this to work, and with one of my attempts, I tried modifying some DirectX 7 DirectDraw code that I KNOW works.
I am trying to even get the wireframe working. What are some other things that I might be doing wrong? Does anyone have any experiences to share of what held them up when trying to switch from DX 6 to 7? Or maybe someone just happens to have rewritten all that code in DX 7?
I am trying to even get the wireframe working. What are some other things that I might be doing wrong? Does anyone have any experiences to share of what held them up when trying to switch from DX 6 to 7? Or maybe someone just happens to have rewritten all that code in DX 7?
August 11, 2000 10:17 AM
I am working on some code right now. I have it fully functioning...
I can give out the source, but it is my absolute first C/C++
program, so it''s really sloppy...
Go to http://www.shadoware.com/games/ to check out the runnable demo. I will post the source code for it very soon.
It is also vastly improved from the articles demos as it supports the lighting pipeline as well.
I can give out the source, but it is my absolute first C/C++
program, so it''s really sloppy...
Go to http://www.shadoware.com/games/ to check out the runnable demo. I will post the source code for it very soon.
It is also vastly improved from the articles demos as it supports the lighting pipeline as well.
I managed to convert the code to dx7 and it works fine.. maybe it has to do with some of the obsolete interfaces the original uses.. or how ever you''d call it... neway, drop me an email, i''ll send you what i have, if ya wants....
Caracarn.
nuadhu@netcom.ca
Caracarn.
nuadhu@netcom.ca
Hey, AstroTurf. It''s not so important whether it is topdown or isometric. I can handle that part myself. I mainly just want to be able to take advantage of 3d acceleration for doing 2d graphics and things like alpha blending. But, if I can''t get anything displayed at ALL, I''m going to have a little trouble
By the way, I tried your link and there is nothing there except a link to the ''parent directory.'' I''ll check back later and see if there''s anything there.
And of course, in the meantime, if anyone else feels like adding their infinite wisdom, I''m always happy to hear it.
By the way, I tried your link and there is nothing there except a link to the ''parent directory.'' I''ll check back later and see if there''s anything there.
And of course, in the meantime, if anyone else feels like adding their infinite wisdom, I''m always happy to hear it.
It''s out there now... I hadn''t published it when I wrote the article... Thought I''d have a couple of minutes leeway... ;-) Sorry, next time I''ll finish before actually submitting my message...
I''ve converted it, but I''m not sure how much has been converted correctly ( I just went though the code and changed all DX6 variables to DX7, so there may be some ''errors''
Check out my web site http://www.stevesprogpage.f2s.com
I also improved on the original code a little, optimised it and added the ability to display walls.
Check out my web site http://www.stevesprogpage.f2s.com
I also improved on the original code a little, optimised it and added the ability to display walls.
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
Thanks to everyone''s help and examples, I now have a working version of the code from Bracket''s article that is ported to DirectX 7.
However, the problem that I''m having now is a gap between some of the tiles. The gap doesn''t occur between every tile, which is why I can''t figure it out. The gaps seem to come after every pair of vertical strips of tiles. I''m not sure if that makes sense, so I''ll TRY a picture here:
Ok, if you can sort of see how the tiles are laid out, there is about a one pixel gap between columns 2 and 3; then again between 4 and 5 and so on.
Does anyone have any ideas what could be going on? I''m using exactly the calculations that are used in the article for the location of the vertices. Is there a bug with them?
Thanks in advance for any help!
However, the problem that I''m having now is a gap between some of the tiles. The gap doesn''t occur between every tile, which is why I can''t figure it out. The gaps seem to come after every pair of vertical strips of tiles. I''m not sure if that makes sense, so I''ll TRY a picture here:
1 2 3 4 5 6 1 2 3 4 5 61 2 3 4 5 6 1 2 3 4 5 6
Ok, if you can sort of see how the tiles are laid out, there is about a one pixel gap between columns 2 and 3; then again between 4 and 5 and so on.
Does anyone have any ideas what could be going on? I''m using exactly the calculations that are used in the article for the location of the vertices. Is there a bug with them?
Thanks in advance for any help!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement