Page 1 of 1

Problem on Notebook w/ 2 Gfx-Kernels (resolved .. sort of)

Posted: Tue Apr 17, 2012 5:32 pm
by Captn. Jinguji
On an Asus NB with nvidia 540 gtm and the intel gfx kernel of the processor, I can't seem to get simple graphics -such as lines -to show up when the exe PB created is being executed with the "standard gfx processor" set to nvidia, (whereas the same exe executes as expected when the standard is set to "integrated graphics".)

In the nvidia case, the screen simply goes black, and it comes back to normal view when the program finishes.
The graphics to be displayed is just a grid of lines.

Environment:
w7 x64 home premium, current patch set
nvidia 296.10
intel hd3000 8.15.10.2656
pb 4.60-32
pb 4.60-64

Non-PB exes do behave as expected (i.e. graphics are shown either way, and usually with a performance boost when nvidia is the choice)

Am I the only one with this problem, or can anyone confirm this behaviour ?

Re: Problem on Notebook w/ 2 Gfx-Kernels

Posted: Wed Apr 18, 2012 8:46 am
by jesperbrannmark
I have a quiet similar laptop, so if you attach some code I can try it.

Re: Problem on Notebook w/ 2 Gfx-Kernels

Posted: Wed Apr 18, 2012 8:46 pm
by Captn. Jinguji
Thanks, Jesper.
Here's one example, derived from one of PB's sample codes
(since I mislaid the original code which was even simpler).

Code: Select all

;
; ------------------------------------------------------------
;
;   PureBasic - 2D Drawing example file
;
;    (c) 2005 - Fantaisie Software
;
; ------------------------------------------------------------
;
; fix for fullscreen multi monitor bug in PB DirectX9
;
; Fullscreen problem with dualscreen monitor:
; http://www.purebasic.fr/english/viewtopic.php?f=4&t=41281
;
CallFunction(OpenLibrary(#PB_Any,"dwmapi.dll"),"DwmEnableComposition",0)


InitSprite()
OpenScreen(1920,1080,32,"HHH")
If StartDrawing(ScreenOutput())
  Circle(100,100,50,RGB(0,0,255))  ; a nice blue circle...
  
  Box(150,20,20,20, RGB(0,255,0))  ; and a green box
  
  FrontColor(RGB(255,0,0)) ; Finally, red lines..
  For k=0 To 20
    LineXY(10,10+k*8,200, 0)
  Next
  
  DrawingMode(#PB_2DDrawing_Transparent)
  BackColor(RGB(0,155,155)) ; Change the text back and front colour
  FrontColor(RGB(255,255,255)) 
  DrawText(10,50,"Hello, this is a test")
  
  StopDrawing()
  FlipBuffers()
EndIf

; Create a gadget to display our nice image
;  
; ImageGadget(0, 0, 0, 0, 0, ImageID(0))

;
; This is the 'event loop'. All the user actions are processed here.
; It's very easy to understand: when an action occurs, the EventID
; isn't 0 and we just have to see what have happened...
;

Delay(1000)


End   ; All the opened windows are closed automatically by PureBasic

Re: Problem on Notebook w/ 2 Gfx-Kernels

Posted: Mon Apr 30, 2012 4:27 pm
by jesperbrannmark
Sorry this took so long.
I have tried it with auto-select, and also tried it with only integrated and also tried it with the real thing... and I cant reproduce your problem.

Re: Problem on Notebook w/ 2 Gfx-Kernels

Posted: Mon Apr 30, 2012 7:31 pm
by Captn. Jinguji
jesperbrannmark wrote:Sorry this took so long.
I have tried it with auto-select, and also tried it with only integrated and also tried it with the real thing... and I cant reproduce your problem.
Thanks, Jasper. I was busy myself, re-installing from scratch, but with win7pro instead of win7 home premium, since I had noticed that
w7 home premium wouldn't handle more than 16 GB of RAM; maybe, "excess" RAM was even responsible for that unexpected behaviour
(I kept the PB installation, since it lives on another drive, so, it seems like it wasn't the PB intallation's fault at all).
Now, all seems to be fine.
Thanks for trying, anyways.
Hope I'll be able to return the favour sometime.