1
System / Re: Can't hide fullscreen window
« on: July 04, 2013, 03:25:33 pm »
oh well stupid me
thank you
![Cheesy :D](https://www.sfml-dev.org/forums/Smileys/default/cheesy.gif)
thank you
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
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.
It's a known bug, that you can find in the (SFML) bug tracker.
I guess only people who understand what you're talking about should be interested in this, right?Well, yes. Anyone who considers OpenGL 3.x+ development.
GlxContext.cpp around line 240
if (glXCreateContextAttribsARB)
{
int nbConfigs = 0;
GLXFBConfig* configs = glXChooseFBConfig(m_display, DefaultScreen(m_display), NULL, &nbConfigs);
if (configs && nbConfigs)
{
/*
* CORE OR COMPATIBILITY PROFILE
*/
int profile = GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
int flags = 0;
if(settings.core_profile)
profile = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
if(settings.debug_context)
flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
if(settings.forward_context)
flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
//end
// Create the context
int attributes[] =
{
GLX_CONTEXT_MAJOR_VERSION_ARB, m_settings.majorVersion,
GLX_CONTEXT_MINOR_VERSION_ARB, m_settings.minorVersion,
GLX_CONTEXT_PROFILE_MASK_ARB, profile,
GLX_CONTEXT_FLAGS_ARB, flags
};
m_context = glXCreateContextAttribsARB(m_display, configs[0], toShare, true, attributes);
}
if (configs)
XFree(configs);
}
ContextSettings.hpp around line 35
struct ContextSettings
{
////////////////////////////////////////////////////////////
/// \brief Default constructor
///
/// \param depth Depth buffer bits
/// \param stencil Stencil buffer bits
/// \param antialiasing Antialiasing level
/// \param major Major number of the context version
/// \param minor Minor number of the context version
///
////////////////////////////////////////////////////////////
explicit ContextSettings(unsigned int depth = 0, unsigned int stencil = 0, unsigned int antialiasing = 0, unsigned int major = 2, unsigned int minor = 0, bool profile = false, bool debug = false, bool forward = false) :
depthBits (depth),
stencilBits (stencil),
antialiasingLevel(antialiasing),
majorVersion (major),
minorVersion (minor),
core_profile (profile),
debug_context (debug),
forward_context (forward)
{
}
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int depthBits; ///< Bits of the depth buffer
unsigned int stencilBits; ///< Bits of the stencil buffer
unsigned int antialiasingLevel; ///< Level of antialiasing
unsigned int majorVersion; ///< Major number of the context version to create
unsigned int minorVersion; ///< Minor number of the context version to create
bool core_profile;
bool debug_context;
bool forward_context;
};
sf::Window the_window;
the_window.create( sf::VideoMode( SCREEN_WIDTH,
SCREEN_HEIGHT,
BPP ),
TITLE, MODE,
sf::ContextSettings( 24, 8, 0, 4, 2, false, false, false ) ); //relevant bit, notice the "false" parameters
std::cout << "Vendor: " << glGetString( GL_VENDOR ) << "\n";
std::cout << "Renderer: " << glGetString( GL_RENDERER ) << "\n";
std::cout << "OpenGL version: " << glGetString( GL_VERSION ) << "\n";
std::cout << "GLSL version: " << glGetString( GL_SHADING_LANGUAGE_VERSION ) << "\n";
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5670
OpenGL version: 4.2.11631 Compatibility Profile Context
GLSL version: 4.20
sf::Window the_window;
the_window.create( sf::VideoMode( SCREEN_WIDTH,
SCREEN_HEIGHT,
BPP ),
TITLE, MODE,
sf::ContextSettings( 24, 8, 0, 4, 2, true, true, true ) ); //relevant bit, notice the "true" parameters
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5670
OpenGL version: 4.2.11631 Core Profile Forward-Compatible/Debug Context
GLSL version: 4.20
Quoteyou should definitely decide it nowHum? It's decided, and it's changed now. So what do you mean?
#ifndef header_h
#define header_h
#define ZERO 0
const int global_variable = 1;
namespace a_name_space
{
class a_class_name
{
private:
int this_is_a_long_variable;
protected:
public:
a_class_name() : this_is_a_long_variable( 1 )
{
do_some_stuff();
}
};
}
#endif
sound_stream asound;
asound.load("resources/test.flac");
asound.play();
while (asound.get_status() == sf::Music::Playing)
{
// Leave some CPU time for other processes
sf::Sleep(100);
// Display the playing position
std::cout << "\rPlaying... ";
}