Page 1 of 1

10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 1:11 pm
by Olliv
Hello !

Here is a simple test code of OpenGLGadget(). I need you test it and you write below what configuration, and what result you see.

The normal process is a green square which changes sweetly from green to black and then from black to green near every second.

On Windows 8, it is okay, but if I change Windows themes on the system properties to high contrasted themes, whatever this black high constrasted or white high contrasted, the future restart of OpenGl is washing to, respectively black or white square, and the green square is only displayed when I update the window (i.e. moving the window).

Code: Select all

;******************************************************************************************************************************************
OpenWindow(0, 0, 0, 220, 220, "OpenGL Gadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenGLGadget(0, 10, 10, 200, 200)
Repeat
        Event = WaitWindowEvent(16)
        SetGadgetAttribute(Gadget, #PB_OpenGL_SetContext, #True)
        glClear_ (#GL_COLOR_BUFFER_BIT | #GL_DEPTH_BUFFER_BIT)
        t.D = ElapsedMilliseconds() / 100.0
        glClearColor_(0.0, (1.0 + Cos(t) ) / 2.0, 0.0, 1.0)
        SetGadgetAttribute(Gadget, #PB_OpenGL_FlipBuffers, #True)
Until Event = #PB_Event_CloseWindow

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 1:29 pm
by Lunasole
Olliv wrote: The normal process is a green square which changes sweetly from green to black and then from black to green near every second.
On Win7 it works fine both with regular or hi-contrast themes.

Generally I don't see how windows themes may affect OpenGL.
But you can try use different "OPENGL32.DLL" version with your .exe, instead one which is built-in in Win8, maybe problem is with it.

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 1:48 pm
by RASHAD
PB 5.61 x86 - Windows 10 x64
Works fine
Flashing green square

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 2:51 pm
by Kwai chang caine
Rashad wrote:Works fine
Flashing green square
+ 1
v5.61 x86 -W7 x86

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 3:06 pm
by #NULL
works fine.
Ubuntu 16.04.3 LTS
PureBasic 5.46 LTS Beta 1 (Linux - x64)

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 3:10 pm
by Bitblazer
works fine here
w7x64 with PB 5.61 x86

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 7:15 pm
by Shardik
Works fine on
- MacOS 10.6.8 'Snow Leopard' with PB 5.61 x86
- Windows 7 SP1 x64 with PB 5.61 x86 and x64 with option "Enable modern theme support" enabled and disabled and with a custom Aero desktop and a high contrast desktop theme ("Kontrast schwarz" or contrast black)

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 9:21 pm
by Olliv
LunaSole wrote:Generally I don't see how windows themes may affect OpenGL.
Neither do I...

The good news are in your answers. I thank you all for the own time everybody here has allocated to help me.

Re: 10 lines code test - I need your eyes

Posted: Mon Nov 06, 2017 10:14 pm
by Dude
Olliv wrote:the green square is only displayed when I update the window (i.e. moving the window)
You don't have to move a window to update it. You can use UpdateWindow_(WindowID(win)) or InvalidateRect_(WindowID(win),0,1) to do it.

Re: 10 lines code test - I need your eyes

Posted: Wed Nov 08, 2017 11:23 am
by RSBasic
Works fine on W10 PB 5.41 LTS x64.

Re: 10 lines code test - I need your eyes

Posted: Thu Nov 09, 2017 9:57 pm
by mark5009
Fine on PB5.61 on OSX 10.12.6 (Sierra)