Page 1 of 1

sprite3d flicker

Posted: Fri Jul 14, 2006 2:51 am
by griz
I just received a new computer and am running pb 4. When I display a 3D sprite (compatible size of 256x256) it flickers like mad. I cannot try this on my previous computer unfortunately. Is this a known problem? Does the code below cause flickering for anyone else? I've wondered if this was a driver issue, but games run just fine on my new PC (Oblivion for example).

Code: Select all

If InitSprite() = 0 Or InitKeyboard() = 0
  MessageRequester("Error", "Direct X 7+ Not loaded.", 0)
  End
EndIf
If InitSprite3D() = 0
  MessageRequester("Error", "Direct3D not loaded", 0)
  End
EndIf
If OpenScreen(1920, 1200, 32, "test")
  CreateSprite(0, 256,256, #PB_Sprite_Texture)
  StartDrawing(SpriteOutput(0))
    Box(0,0,256,256,RGB(0,100,255))
    Circle(127,127,80,RGB(255,180,0))
  StopDrawing()
  CreateSprite3D(0, 0)
  Repeat    
    FlipBuffers(1)
    ClearScreen(RGB(0,50,128))
    If Start3D()
      DisplaySprite3D(0, 0, 0)
      Stop3D()
    EndIf
    ExamineKeyboard()
    Delay(20)
  Until KeyboardPushed(#PB_Key_Escape)
Else
  MessageRequester("Error", "Can't open screen!", 0)
EndIf
End

hmm...

Posted: Fri Jul 14, 2006 3:01 am
by GBeebe
I could not do a screen at 1920 * 1200 @ 32, it's out of my monitors range. I changed it to one compatible with my monitor and I got your blue screen with a blue-ish box that had a yellow-ish circle in it... No flickering. I think you may have a hardware issue with your monitor. try a smaller screen size if possible.

Posted: Fri Jul 14, 2006 2:04 pm
by Baldrick
Your code works fine here also Griz with screen set down to 1280 x 1024 / 32 & refresh rate @ 75Khz

I am running P4 HT, 3GH , 512 RAM + Geforce 5200 video with 128MB ram.

Posted: Sat Jul 15, 2006 5:52 am
by griz
Thanks for testing guys. I know what is happening now. I'm running a pair of 7900 GTXs in SLI ... when I switch SLI off the problem goes away. Is this a bug? Can anyone else confirm that Pure Basic works with SLI?

Posted: Sat Jul 15, 2006 9:40 am
by Num3
At 1900x1200 i guess it is....

Posted: Sat Jul 15, 2006 6:03 pm
by griz
Num3, it has nothing to do with screen resolution. Even at 640 x 480 I get vicious flickering when Nvidia's SLI is enabled. :(

Posted: Sat Jul 15, 2006 6:30 pm
by Thade
It has nothing to do with SLI here
No flickering in any Mode. Not in "Single GPU Rendering" or "Automatic" or "SLI Antialising" or "Alternative Rendering"
Not in 1600x1200 + not in 1024x768
If you have SLI-issues they usualy look different ... to be seen in some (Moorhuhn-type) Games or in Blitz3D-Games which can only be used with "Single GPU Rendering" ...
In these cases you have only the upper half on screen normal ... the lower half varies depending where the mouse cursor position is or is not shown at all...

And btw: I have not seen any PureBasic Game or App which had SLI-Problems since I have my "SLI-Computer" (Sept. 2005)

Posted: Sun Jul 16, 2006 12:52 am
by griz
Thanks for the feedback Thade.

I am running in alternating SLI and it seems as though the flickering is caused by an entire frame being skipped (not rendered).

I am running 91.31 drivers, which version and gpus are you using?

As you pointed out, the problem is also found in Blitz :

http://www.blitzmax.com/Community/posts.php?topic=52225
Just to get this Problem on the main page again!
As more people use SLI ... as less can use Blitz Programs in Fullscreen Mode without that annoying switching to Single GPU by hand before running a Blitz Program and switching back to Multi GPU or Automatic detection in the NVidia Settings afterwards...
Apparently this problem was reported several months ago and is without a solution to this day.

Posted: Sun Jul 16, 2006 3:17 am
by White Eagle
Am I correct in understanding that this "SLI" issue will not affect games runing in windowed mode?

Posted: Sun Jul 16, 2006 3:36 am
by Thade
Hi griz
Thanks for pointing me to the new driver ;)
I had 84.43 ... now I have 91.31, too :)
And if the first tests don't lie ... now even the Blitz3Ds run as expected ... means I do not have to switch from "Automatic" to "Single GPU" each time.
PureBasic now works fine in "Single GPU Rendering" and "Automatic Mode", but both modes of "Alternative Rendering" don't work anymore ... they flicker using your example above.
So this seems to be a driver problem ... I didn't have this before.

But since Automatic Mode works I can live with that.
I am far from having any knowledge how this works ... but it seems to me, that now for the first time automatic mode works as it should ... engines that are programmed to use Single GPU now use Single GPU automatic

White Eagle, correct, windowed mode never was effected ... always worked with all settings

screen test

Posted: Mon Aug 21, 2006 7:42 pm
by robert1352
when I tried the program at 640,400 I got the blue screen with the yellow circle.