Re: VB; DX; Object Placement
Re: VB; DX; Object Placement
Re: VB; DX; Object Placement
Yeah for some reason DirectDraw does that. When you scroll or have the object move passed the border of your window (or even drawing directly over or passed it), your sprite that you are drawing for some reason will disappear. I have not seen a solution to this anywhere, but it may have something to do with disabling the clipping. If not, creating your own kind of sprite clipping might be the solution to that as well, but I'm pretty sure there is a way to have DirectX do it for ya.
My solution to this problem was to do 2D using Direct3D by using a TLVertex. I had more control than using DirectDraw cause it would automatically clip my sprites correctly (which is the solution to your problem), gave me the ability to rotate and alphablend, lighting, 3D shadows on 2D sprites, etc.
Re: VB; DX; Object Placement
could you give me some code/info on the tlvertex please
Re: VB; DX; Object Placement
I don't have any code for that in VB. But if you check out directx4vb you can see a sample on how to get scrooling image algorithm should look like. I know there is a sample there. And I have a few on my computer too.
Re: VB; DX; Object Placement
Re: VB; DX; Object Placement
it seems alot of work im using DX7 why should i go to DX8? is dx8 faster than 7 and can i tdraw text faster than 7?
Re: VB; DX; Object Placement
DX8 does not have DDraw, so you have to use D3D. A bit more advanced, but on newer PCs with new GPUs it will probably be faster, since 2D is kind of outdated when it comes to graphics programming. But it is still a lot of fun to use DDraw though.
ØØ
Re: VB; DX; Object Placement
ha ok, but i really try to make the program work for as much users ass possible.
is it still wise to get into DX8?....
Re: VB; DX; Object Placement
so basicly if the TLVertex goes offscreen it still draws?
Re: VB; DX; Object Placement
Quote:
Originally Posted by nareth
ha ok, but i really try to make the program work for as much users ass possible.
is it still wise to get into DX8?....
More users will be supported if you use DX7.
Re: VB; DX; Object Placement
well im thiking about still going to DX8 because off the lighting and faster (i think)
Re: VB; DX; Object Placement
Quote:
Originally Posted by nareth
so basicly if the TLVertex goes offscreen it still draws?
confirm this please
Re: VB; DX; Object Placement
Yep. That's why I recommend it over DirectDraw. Plus you can rotate, alphablend, do lighting and 3D shadows on 2D polygons, etc.
Re: VB; DX; Object Placement
cool features.. i will do it must poeple support it nowadays anyway so it gonna be good :D
Re: VB; DX; Object Placement
I believe when it is completely off screen though (where you can't see it at all) it doesn't get drawn. This is good because if you have 1000's of polygons being drawn, you don't want the ones you can't see drawn anyways. I just didn't like the fact that DirectDraw eliminates drawing a surface when only part of it is off screen.