1
SFML website / Re: New forum
« on: March 27, 2012, 01:09:18 pm »
Any ETA on new theme with better contrast?
not liking the grey on grey hard to readness
not liking the grey on grey hard to readness
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.
Elgan, I meant for you to mess with your monitor options.
//Window.Create(sf::VideoMode(DesktopMode.Width / devide, DesktopMode.Height / devide, DesktopMode.BitsPerPixel), "SFML Graphics", style);
Window.Create(sf::VideoMode(DesktopMode.Width , DesktopMode.Height , DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
Window.Create(sf::VideoMode(DesktopMode.Width , DesktopMode.Height , DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
sf::View view;
view = Window.GetView();
view.SetSize(640 , 480 );
view.SetCenter(640 /2 , 480 / 2);
Window.SetView(view);
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/OpenGl.hpp>
#include <iostream>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
sf::Texture texBack; //640 ,480 size
texBack.LoadFromFile("introback.bmp");
sf::Sprite sprBack;
sprBack.SetTexture(texBack);
//current video mode
sf::VideoMode DesktopMode = sf::VideoMode::GetDesktopMode();
std::vector<sf::VideoMode> modes = sf::VideoMode::GetFullscreenModes();
for (std::size_t i = 0; i < modes.size(); ++i)
{
sf::VideoMode mode = modes[i];
std::cout << "Mode #" << i << ": "
<< mode.Width << "x" << mode.Height << " - "
<< mode.BitsPerPixel << " bpp" << std::endl;
}
// Create the main rendering window
sf::RenderWindow App; //(sf::VideoMode(320, 224, 32), "SFML Graphics", sf::Style::None);
sf::View view;
// App.Create(sf::VideoMode(320, 220, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::None);
//App.Create(sf::VideoMode(DesktopMode.Width / 2, DesktopMode.Height / 2, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
//App.Create(sf::VideoMode(1024, 720, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::None );
App.Create(sf::VideoMode(DesktopMode.Width , DesktopMode.Height , DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
view = App.GetView();
//App.Create(sf::VideoMode(DesktopMode.Width , DesktopMode.Height, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
view.SetSize(640 ,480 );
view.SetCenter(640 / 2 ,480/ 2 );
App.SetView(view);
//
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.PollEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
// Resize event : adjust viewport
if (Event.Type == sf::Event::Resized)
{
//glViewport(0, 0, 640, 480);
view = App.GetView();
//App.Create(sf::VideoMode(DesktopMode.Width , DesktopMode.Height, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
view.SetSize(640 ,480 );
view.SetCenter(640 / 2 ,480/ 2 );
App.SetView(view);
}
}
// Clear the screen with red color
App.Clear();
App.Draw(sprBack);
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
sf::Vector2f CGameEngine::GetSize()
{
return Window.ConvertCoords(Window.GetWidth() / 2 , Window.GetHeight() / 2);
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
sf::Texture texBack;
texBack.LoadFromFile("introback.bmp");
sf::Sprite sprBack;
sprBack.SetTexture(texBack);
//current video mode
sf::VideoMode DesktopMode = sf::VideoMode::GetDesktopMode();
// Create the main rendering window
sf::RenderWindow App; //(sf::VideoMode(320, 224, 32), "SFML Graphics", sf::Style::None);
sf::View view;
App.Create(sf::VideoMode(320, 220, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::None);
view = App.GetView();
//App.Create(sf::VideoMode(DesktopMode.Width / 2, DesktopMode.Height / 2, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
App.Create(sf::VideoMode(DesktopMode.Width, DesktopMode.Height, DesktopMode.BitsPerPixel), "SFML Graphics", sf::Style::Fullscreen);
[color=red] view.SetSize(320 * 2, 220 * 2);
view.SetCenter(320 , 220 );
App.SetView(view);[/color]
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.PollEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear the screen with red color
App.Clear();
App.Draw(sprBack);
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
[color=red] view.SetSize(320 * 2, 220 * 2);
view.SetCenter(320 , 220 );
App.SetView(view);[/color]
If you are so interested in getting it integrated then why not try and do it yourself
SFML is open-source so if you have an idea of an addition and Laurent don't have time to do it right now. Why not try and help out? Worst case: You just put it up on the Wiki for others to use as well.
OpenVGQuotewill it ever?
I don't think so. There are so many things to do before that.