It is currently Mon May 20, 2013 1:30 pm



Reply to topic  [ 7 posts ] 
 My driver comes incorrect with GUI! 
Author Message
One Eyed Hopeful

Joined: Tue Jun 16, 2009 3:44 am
Posts: 6
Hei guys, I wrote a simple D3D stereo driver for Moorhuhn Kart 3 outputing side-by-side format. The 3D scene works very well, but the GUI does no change through my driver. See the screenshot below:
Attachment:
error.JPG

Now I use Up and Down instead of Left and Right.
I divide the viewport width by 2 to render the left image on the left half viewport and render the right image on the right half viewport, but as you see, the GUI doesnot change. Is there any suggestions for me? I'm looking foward to receiving your replies guys! Thank you!


You do not have the required permissions to view the files attached to this post.


Last edited by superdtec on Tue Apr 06, 2010 10:27 pm, edited 2 times in total.



Mon Dec 28, 2009 10:14 pm
Profile
Cross Eyed!
User avatar

Joined: Sat Mar 10, 2007 4:05 am
Posts: 108
Location: Russia
Maybe game render GUI using RHW vertices.

_________________
Stereoscopic Steam Group: Join now
Image


Fri Jan 15, 2010 3:32 am
Profile
One Eyed Hopeful

Joined: Tue Jun 16, 2009 3:44 am
Posts: 6
Thanks, KindDragon. It is mostly like that!
So how can I solve this point? It doesnot change when I modify the viewport, that indicates I cannot render the scene twice as left half viewport and right half viewport. Maybe I should render the same size of original viewport but, I've no idea how to save these two images in my driver. I tried to create two surfaces to be the current render target in order to save the rendered images but some errors occurred when I attempted to change the current render target to my surface created before. The rendered scene result was incorrect, nothing rendered onto it !!!
Now I've got the conflict: render left and right images into backbuffer with half of original viewport, the GUI does not change; the other hand, render left and right images with original viewport, the GUI is right but I can't find a useful way to save these two images.
What's your opinion? Looking forward to your reply~~~~~~~~ thanks!


Fri Jan 15, 2010 5:21 am
Profile
Cross Eyed!
User avatar

Joined: Sat Mar 10, 2007 4:05 am
Posts: 108
Location: Russia
I see 2 solutions:
  • Modify source vertex buffer when render to right viewport
  • Emulate RHW using vertex shader or fixed pipeline

_________________
Stereoscopic Steam Group: Join now
Image


Fri Jan 15, 2010 1:08 pm
Profile
One Eyed Hopeful

Joined: Tue Jun 16, 2009 3:44 am
Posts: 6
KindDragon wrote:
I see 2 solutions:
  • Modify source vertex buffer when render to right viewport
  • Emulate RHW using vertex shader or fixed pipeline


Thanks, I've tried your first solution with follow steps:
1 get the FVF from the desc of the current g_pVb, and see
if( (FVF & D3DFVF_XYZRHW ) == 0x04 ) // using D3DFVF_XYZRHW;
if true, create another vertext buffer g_pNewVb with the g_pVb data, now the g_pNewVb pointer's data is the same as the g_pVb's
here it works well, but the next step:
2 change the g_pNewVb's data, cause it uses D3DFVF_XYZRHW, so I must modify the x-coordinate data, but the problem is:
I can not know which data I should get and change. I mean:
g_pVb->Lock(0, 0, (VOID**) &(vtdata), 0);
g_pNewVb >Lock(0, 0, (VOID**) &(newpbv), 0);
memcpy(newpbv, vtdata, desc.Size); // here copy the g_pVb buffer's data to the g_pNewVb
the next I've no idea how to change the x-coordinate. The newpbv pointer contains all the vertex information but I don't know which one is the x-coordinate. Any suggestion for me?

With your second solution, I'm sorry that I cann't catch you exactly, would you please introduce more details for me?
Anyway, thank for your suggestion KindDragon!!


Tue Apr 06, 2010 5:15 am
Profile
One Eyed Hopeful

Joined: Fri Jun 20, 2008 9:09 am
Posts: 21
can you share your script or driver?
:roll: :roll: :roll: :roll: :roll: :roll:


Wed Apr 07, 2010 6:18 am
Profile
One Eyed Hopeful

Joined: Tue Jun 16, 2009 3:44 am
Posts: 6
rahuxx wrote:
can you share your script or driver?
:roll: :roll: :roll: :roll: :roll: :roll:

It's only for the game and have much work to do, and now the RHW problem disturbs me much. When I finish this I'll share my idea with you.


Wed Apr 07, 2010 8:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.