Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Bug in GetRasterStatus  (Read 1888 times)
TotalBlank
Community Member
*
Posts: 2


« on: January 31, 2006, 08:10:44 PM »

I tried using the TV8.GetRasterStatus command but it always returned FALSE when detecting the blanking interval.

Work around:   if you use the TVInternalObjects object to get a reference to the native DirectX Direct3DDevice8 object you can use this to get the vertical blanking status and it works fine.

'The abbreviated code below works for getting the blanking interval. Thanks to JohnnyC and Data for their previous posts which provided the solution to this problem.

Regards,

TotalBlank

-----------------------------------------------------------
Dim VsyncO As TVInternalObjects
Dim VSDevice As Direct3DDevice8    'native directx object
Dim RS As D3DRASTER_STATUS      'native directx structure
Dim boolVBlank as Boolean
Dim TVRS As TV_RASTERSTATUS

Set VsyncO = New TVInternalObjects
Set VSDevice = VsyncO.GetDevice3D

'Main Render Loop Starts here
Do


  'Render objects for game.

   
  'Wait for blanking interval before rendering to screen.

   RS = VSDevice.GetRasterStatus
   Do Until RS.InVBLANK =1
         'loop until in VBlank
         Debug.Print "Not Vblank"
         RS = VSDevice.GetRasterStatus
         
   Loop
   TVRS = TV8.GetRasterStatus  
   boolVBlank = TVRS.InVBLANK   'TV method fails and always returns false
   Debug.Print "IN VBLANK"

   ' We display everything that we have rendered
   TV8.RenderToScreen

'Loop until the DoLoop isn't True.
Loop Until DoLoop = False
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks