polygone
|
|
Reply #15 Posted on: May 27, 2013, 06:32:56 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
As for single buffering, yes that's going to work but it looks terrible as the drawing is done automatically. "That's going work" means you haven't tried it.
I have tried it, it just draws everything immediately which doesn't look good and isn't GM compatible either. It's not swapping any buffers so it's not going to experience any of the problems we're having with this. I'm not sure what's wrong but this source might be doing it right: https://github.com/vanfanel/SDL12-kms-dispmanx/blob/master/src/video/wincommon/SDL_wingl.c ie we should be setting wglChoosePixelFormatARB for WGL . I've also seen PFD_SWAP_EXCHANGE and PFD_SWAP_COPY that can be used with WGL not sure if copy might be needed? But I don't really know what I'm doing with any of this so you probably shouldn't expect me to be the one that fixes anything.
|
|
« Last Edit: May 27, 2013, 06:51:52 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Goombert
|
|
Reply #16 Posted on: May 27, 2013, 06:48:50 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Yep, if we are adding a frame buffer object, we need to set it up for anti-aliasing while we are at it so that it does not need written 2x.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
polygone
|
|
Reply #17 Posted on: May 27, 2013, 06:52:29 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
I don't support fbos
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Goombert
|
|
Reply #18 Posted on: May 27, 2013, 06:55:49 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Well then that will go into OpenGL3, and whatever you do support goes into OpenGL1, so Deus I guess just focus on the OpenGL3 implementation, polygonz is the only one who OGL1 is needed for anyway besides Tsumi, and a few others. I'm gone buy you a new computer polygonz
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
polygone
|
|
Reply #19 Posted on: May 27, 2013, 07:28:45 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Ha ha ha ha ha ha ha
ha
ha
ha ha ha ha.
OK Josh is gonna love this one. I got the screen_refresh back working for me!! I knew I wasn't crazy and it worked properly before. And here's how I did it: I turned Windows Vista Aero back on!
Turning it off (which I did a few months ago) is apparently what fucked it. Even though it probably shouldn't have seemed likely I just had this sudden flash of realization that, that was what caused it to stop working for me. So yeah erm, I guess we should sort of figure out wtf's going on with aero and double buffering.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
|
polygone
|
|
Reply #22 Posted on: May 27, 2013, 08:43:43 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Yeah but it gives an indication of where the problem lies. It also shows that ENIGMA might well not actually be set-up incorrectly.
Maybe try turning Aero off? See if that changes anything for you?
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
|
Reply #24 Posted on: May 27, 2013, 09:05:38 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Maybe it's related to your 60fps stuff?
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
|
Reply #26 Posted on: May 27, 2013, 09:36:50 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Well try uncomment set_synchronization back in. You will need to add the GL header back in that was removed .. look in the file history of Windowsstd.cpp.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #27 Posted on: May 27, 2013, 10:22:15 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
More specifically it's the "enable desktop composition" effect that needs to be turned on in System -> Advanced -> Performance -> Effects. You can only turn it on when aero is set on though.
Information About
The desktop composition visual experience feature, introduced since Vista, fundamentally changed the way applications display pixels on the screen. When desktop composition is enabled, individual windows no longer draw directly to the screen or primary display device as they did in previous versions of Windows. Instead, their drawing is redirected to off-screen surfaces in video memory, which are then rendered into a desktop image and presented on the display.
Desktop composition is performed by the Desktop Window Manager Session Manager (DWM) service. Through desktop composition, DWM enables visual effects on the desktop as well as various Aero features such as thumbnail previews, Aero themes, glass window frames (transparency), 3-D window transition animations, Windows Flip and Windows Flip3D, and high resolution support.
This will show you how to enable or disable Desktop Composition using different options in Windows 7 and Vista.
|
|
« Last Edit: May 27, 2013, 10:24:28 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #28 Posted on: May 27, 2013, 10:46:20 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
I'm trying to find information about it through Google and post what I find here. DWM's rendering of the screen is double-buffered. However, if it grabs your buffer between erasing and painting... it's going to show up as a visible artefact. So you still need to double buffer. The double buffering occurs on the desktop (i.e. it draws the next desktop view completely and then flips), not on the off-screen buffers that each window is drawn to. Windows 7 uses Desktop Window Manager in a different way than Vista, however, and if you disable Aero applications can't take advantage of the double buffering and resulting vertical sync improvements that DWM offers. So you actually are causing worse playback when you think you are turning off what appears to be a resource hog! Many IT pros routinely set up systems with all the pretty user interface options turned off for that very reason. What All This Means for the OpenGL Developer GDI compatibility notes GDI usage over 3D accelerated regions is incompatible with Windows Aero, so developers have two options:
Disable Windows Aero Do not use GDI on top of OpenGL rendering. Windows Vista introduces the new pixelformat flag PFD_SUPPORT_COMPOSITION (defined in the Driver Development Kit's wingdi.h as 0x00008000). Creating an OpenGL context for a pixelformat without this flag will disable composition for the duration of the process which created the context. The flag is mutually exclusive with PFD_SUPPORT_GDI.
If a developer must use GDI on top of an OpenGL context, use the following rules:
Create an OpenGL context using a pixelformat with GDI support (PFD_SUPPORT_GDI flag set). As this flag is mutually exclusive with PFD_SUPPORT_COMPOSITION, this will disable Aero for the lifetime of the current process. Don't use BeginPaint/EndPaint outside the WM_PAINT message handling. As on Windows XP, use the API synchronization calls whenever necessary: GdiFlush to synchronize GDI with OpenGL rendering and glFinish for the converse.
|
|
« Last Edit: May 27, 2013, 11:02:15 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #29 Posted on: May 27, 2013, 11:22:53 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
A separate bug I've just noticed with this raytracer is the rending is completely messed up in fullscreen mode. It's just coming out at these weird squares.
|
|
« Last Edit: May 27, 2013, 11:32:26 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|