1
Window / Context Settings Help
« on: May 27, 2011, 06:22:21 pm »
Yes, I'm running Scientific Linux.
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.
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
int main(int argc, char** argv)
{
sf::ContextSettings Settings;
Settings.DepthBits = 24; // Request a 24 bits depth buffer
Settings.StencilBits = 8; // Request a 8 bits stencil buffer
// Opens window and passes in my context settings
sf::Window App(sf::VideoMode(400,400,32), "Test Window", sf::Style::Close, Settings);
// Prints out the Depth Bits and Stencil Bits of the Window
std::cout << "DepthBits: " << App.GetSettings().DepthBits << std::endl;
std::cout << "StencilBits: " << App.GetSettings().StencilBits << std::endl;
while ( App.IsOpened() )
{
sf::Event Event;
while ( App.PollEvent(Event) )
{
if (Event.Type == sf::Event::Closed)
App.Close();
if (Event.Type == sf::Event::KeyPressed)
App.Close();
}
App.Display();
}
return 0;
}
DepthBits: 16
StencilBits: 0