sprite3d flicker

Advanced game related topics
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

sprite3d flicker

Post 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
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

hmm...

Post 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.
Baldrick
Addict
Addict
Posts: 860
Joined: Fri Jul 02, 2004 6:49 pm
Location: Australia

Post 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.
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

Post 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?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

At 1900x1200 i guess it is....
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

Post 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. :(
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Post 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)
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

Post 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.
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

Am I correct in understanding that this "SLI" issue will not affect games runing in windowed mode?
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Post 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
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
robert1352
User
User
Posts: 34
Joined: Tue Mar 14, 2006 8:17 pm

screen test

Post by robert1352 »

when I tried the program at 640,400 I got the blue screen with the yellow circle.
Post Reply