Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Acumen

Pages: 1 2 [3] 4
Window / Re: OpenGL Context Flashes on Screen when Created
« on: February 10, 2014, 07:02:39 pm »
Oh amazing! Definitely a big improvement thank you very much.

I still have a bunch of issues/questions, this is what I currently get. When I say OS event what happens is all monitors flash black then return to normal.

When creating a new window:

1) Fullscreen window appears with white background*
2) Background changes to black
3) OS event
4) Displays my draw call

1) Framed window appears with white background*
3) Displays my draw call

*White background stays long enough to see it even if next line is a display call.

sf::Style::None with size < Desktop:
1) Frameless window appears when I make my first draw call

sf::Style::None with size == Desktop:
1) OS event
1) Frameless window appears when I make my first draw call

When I close a sf::Style::None with size == Desktop or a Fullscreen window there are 2 OS events.

When exactly does the OS event occur?
Is it possible to use sf::Style::None with size == Desktop without the OS event, as it behaves when size < the desktop?
Is it possible to use sf::Style::Default without the white background appearing?

Window / Re: OpenGL Context Flashes on Screen when Created
« on: February 10, 2014, 03:41:33 pm »
Can anyone confirm what happens with their context when a new window is created?

I submitted a bug report but as the issue is not confirmed it was closed. This happens to me every time I open a window, so it is definitely a bug for me, with my minimal example above. I have not had anyone confirm this happens or DOES NOT happen to them either. Coming up on 3 weeks into this thread, anyone?

Window / Re: OpenGL Context Flashes on Screen when Created
« on: February 08, 2014, 08:31:40 pm »
Still very interested in this, and still have not heard either way what happens with other people in regard to this issue. Anyone have a comment?

I was poking around in the source and possibly have a lead.



1) WindowImpl::create which makes a new WindowImplType which is a WindowImplWin32 which calls CreateWindowA() then calls then calls switchToFullscreen() which calls ShowWindow(m_handle, SW_SHOW);

2) GlContext::create which calls:

2A) ensureContext(); calls  getInternalContext() calls sf::priv::GlContext::create() calls GlContext* context = new ContextType(sharedContext); which is a WglContext that calls CreateWindowA() then  ShowWindow(m_window, SW_HIDE);

2B) GlContext* context = new ContextType(sharedContext, settings, width, height); which calls CreateWindowA() then  ShowWindow(m_window, SW_HIDE);

3) window::initialize() which calls setVisible(true); which calls ShowWindow(m_handle, SW_SHOW);

So it looks to me like the important part is the:


that is possibly called every time a fullscreen window is created? I may be way off the mark but this is the best I could find so far. Not sure what the best solution is, but personally I would rather have a window not show at all unless I told it to as part of my initialization instead of the switchToFullScreen and window::create automatically showing.

Window / Re: OpenGL Context Flashes on Screen when Created
« on: January 27, 2014, 06:48:09 pm »
The way I think Laurent intended it to work, is by creating the window with the version you want, SFML will then automatically choose the next best context (i.e. it will downgrade if the requested version isn't available) and then you check what version you actually got and react accordingly.
Yeah that makes sense, but it eliminates being able to log the users actual supported version if it is above the target. I guess that is less important than removing a flash to me though and I don't use that number for anything in the program only metrics so I can live with that

SFML doesn't have all the control over how a window gets created, thus I'd have to look at the source to see whether one could ensure that it stays black through the whole process. ;)
To me it seems like during .create() it creates a window, displays it, clears it in white, then hides/destroys it. Possibly to pull the system variables? I would much rather leave it open! Or maybe have a flag to? Also would much much rather have it black, or be able to pass a color. I am not at my dev machine so I can't peek at the source right now.

Is this the kind of thing I should open a ticket for?

Does anyone else even have this issue? Could it be system dependent? Still haven't heard from anyone.

Window / Re: OpenGL Context Flashes on Screen when Created
« on: January 27, 2014, 05:06:02 pm »
If you create an sf::Context it always initializes as OpenGL 2.0. You have to create the window without passing a context specifying OpenGL version and read the system OpenGL version with window.getSettings(). Then if the system is capable of handling your program you have to create a new window with your correct OpenGL version. At least as far as my testing has shown.

It would be nice to find the OpenGL version without creating a temp Window, but even then I would still get a flash when I create the actual Window for my program.

Window / Re: OpenGL Context Flashes on Screen when Created
« on: January 27, 2014, 07:14:15 am »
Using SFML 2.1 running on Window 8 this does it for me:

#include <SFML/Window.hpp>

int main()
        sf::Window testWindow;
        testWindow.create(sf::VideoMode::getDesktopMode(), "TEST WINDOW", sf::Style::Fullscreen);

Window / Re: OpenGL Context Flashes on Screen when Created
« on: January 26, 2014, 06:11:07 pm »
Can anyone confirm that this happens on their systems/builds as well? Still not sure exactly what is going on here.

Window / OpenGL Context Flashes on Screen when Created
« on: January 25, 2014, 12:24:48 am »
So I am trying to make my program cleaner, and this is one issue that has been bother me for a while.

When I call create() for a new OpenGL window, it displays with a black background, flashes a white background for a second then disappears. This happens as soon as it is created even if I never initialize OpenGL or call display(), also if I do.

This is doubly frustrating as I create a test context to pull OpenGL version and check for the systems compatibility before creating the 'real' context with my OpenGL version as part of the create() call. So I get window->flash->disappear->window->flash->disappear->real window as my start up sequence. It is jarring. I would LOVE to just have a black screen throughout this process!

Anything I can do?

Why would it run fine in compatibility every time, and crash in non compatibility every time? I think it was more likely some sort of openAL conflict no?

A bit more on the computer, it was a Dell Alienware M17x, which I believe has an onboard soundcard and a Sound Blaster Recon3Di. Possibly there was a problem associated with the fact there were two cards?

It crashed on the very first instance of my function, which looking at the code will only do the following:



Not much to go wrong there, and everything initialized just fine. There were no warnings in my console window so that should mean it loaded the music file.

Audio / SFML 2.1 Crashes somewhere in my Audio Function on Windows 7
« on: October 10, 2013, 09:13:54 pm »
So I am just looking where to start on this one and to see if anyone else has the same issue. It is hard for me to debug as I no longer have access to the machine and was only running a release, but I did see it with my own eyes.

I could tell from my log file that my program crashed from something in my audio function, but only with a new version of my program created with SFML 2.1. I had an older version of my program from one of the 2.0 release candidates and was able to run that without crashing. I am 99% sure none of the code in the audio function changed, only the SFML version.

The interesting thing is that the new version ran just fine if I set it to Windows 7 compatibility mode, or any other version of Windows for that matter. This was on a 32 bit Windows 7 home premium machine, no I am not even sure why there is a Window 7 compatibility mode on it.. I was thinking it might have been from a conflict with installed openAL or libsnd dll's that were already on the machine, but I changed their names temporarily and had the same issue. Maybe that wasn't the right way to accomplish anything but it was the only thing I came up with at the time.

Anyway I have the dmp file and pdb so I should be able to track it down a bit more if nobody has any ideas, although I have no experience with dump files so it will probably take me a while to figure out how to read anything useful, maybe I should just bite the bullet and learn how to do it anyway.

Please advise!

Window / Re: Window is Completely White in Windows 8
« on: July 09, 2013, 01:11:27 am »
Apparently the high contrast themes turn off the desktop window manager? And for some reason certain OpenGL programs wont display then? Is this something that can be coded around?

Window / Re: Window is Completely White in Windows 8
« on: July 09, 2013, 12:49:17 am »
So I figured it out finally. It was the high contrast Windows 8 theme. Of all stupid things! Not sure why it breaks OpenGL, but it does.

Window / Re: Window is Completely White in Windows 8
« on: July 04, 2013, 12:22:08 am »
Yeah I uninstalled and reinstalled the latest driver, no help. Thing is it is a laptop, and just came out, so there are not any versions other than the one available.

It is an MSI GE70 2OE-017US with an NVIDIA GeForce GTX 765M 2GB DD5 for those wondering.

The drivers on NVIDIA's site are not compatible, so I have no options it seems? I guess its not that big a problem, because it means my game should run fine on windows 8 machine which is what I was really worried about, and I will just have to run it fullscreen for now.

I also disabled the dedicated card and tried the integrated Intel HD4000. That did not work correctly either, but in a differnet way. It works fine fullscreened, but when windowed only shows one frame, and will update that one frame if you move/resize the window. No idea if its related or not.

I spent some time on the phone with MSI tech support and made them aware of the issue. They said they would email me back later today so hopefully there will be a fix in the pipeline.

Window / Re: Window is Completely White in Windows 8
« on: July 03, 2013, 10:25:43 pm »
Ok! SFML is off the hook, it seems to be some issue just with my computer/Windows 8? I have the latest drivers. I tried to run the demos, white screen, then tracked down an OpenGL game that can run in a window, which also  just gave a blank white screen, so for some reason my computer does not want to display windowed OpenGL.

It is just weird that it runs full-screen... Guess this is a question for a different forum though. Sorry and thanks!

Window / Window is Completely White in Windows 8
« on: July 03, 2013, 07:09:48 pm »
So I just got a new Windows 8 computer, and I am having a few issues with SFML or OpenGL (3.2). When in a window (not full-screen) the entire window is white, but the game is still playing. Secondary symptom is that when my program starts, while 'loading' its sound assets (full-screen) the screen is white.

This does not happen on my Vista machine.

Pages: 1 2 [3] 4