10 lines code test - I need your eyes

Just starting out? Need help? Post your questions and find answers here.
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

10 lines code test - I need your eyes

Post 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
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: 10 lines code test - I need your eyes

Post 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.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4663
Joined: Sun Apr 12, 2009 6:27 am

Re: 10 lines code test - I need your eyes

Post by RASHAD »

PB 5.61 x86 - Windows 10 x64
Works fine
Flashing green square
Egypt my love
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5353
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: 10 lines code test - I need your eyes

Post by Kwai chang caine »

Rashad wrote:Works fine
Flashing green square
+ 1
v5.61 x86 -W7 x86
ImageThe happiness is a road...
Not a destination
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: 10 lines code test - I need your eyes

Post by #NULL »

works fine.
Ubuntu 16.04.3 LTS
PureBasic 5.46 LTS Beta 1 (Linux - x64)
Bitblazer
Enthusiast
Enthusiast
Posts: 736
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: 10 lines code test - I need your eyes

Post by Bitblazer »

works fine here
w7x64 with PB 5.61 x86
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: 10 lines code test - I need your eyes

Post 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)
Last edited by Shardik on Mon Nov 06, 2017 9:25 pm, edited 1 time in total.
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

Re: 10 lines code test - I need your eyes

Post 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.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: 10 lines code test - I need your eyes

Post 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.
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: 10 lines code test - I need your eyes

Post by RSBasic »

Works fine on W10 PB 5.41 LTS x64.
Image
Image
mark5009
User
User
Posts: 22
Joined: Sun Oct 19, 2014 10:47 pm

Re: 10 lines code test - I need your eyes

Post by mark5009 »

Fine on PB5.61 on OSX 10.12.6 (Sierra)
Post Reply