Assouan
04-03-2012 13:42:45
(sorry for my littel english, I'm french)
Hello, How to make a Hello World plyz :/ ?
I need a exemple (or sample) for get the viewing (or pixel) for draw in sfml, but I not find the solution
Thanks for you help !
Hello, How to make a Hello World plyz :/ ?
I need a exemple (or sample) for get the viewing (or pixel) for draw in sfml, but I not find the solution
#include <MyGUI/MyGUI.h>
#include <MyGUI/MyGUI_DataManager.h>
#include <MyGUI/MyGUI_OpenGLImageLoader.h>
#include <MyGUI/MyGUI_OpenGLDataManager.h>
#include <MyGUI/MyGUI_OpenGLPlatform.h>
#include <MyGUI/MyGUI_OpenGLRenderManager.h>
#include "OpenGLImageLoader_Devil.hpp"
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <windows.h>
#include <gl/gl.h>
#include <string>
#include <iostream>
using namespace std;
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
// Créate a Gui
MyGUI::Gui* mGUI;
OpenGLImageLoader_Devil* mIL = new OpenGLImageLoader_Devil();
MyGUI::OpenGLPlatform* mPlatform = new MyGUI::OpenGLPlatform();
mPlatform->initialise(mIL, "mIL");
mGUI = new MyGUI::Gui();
mGUI->initialise();
MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 10, 10, 300, 26, MyGUI::Align::Default, "Main");
button->setCaption("Hello World!");
// Start the game loop
while (window.IsOpen())
{
// Process events
sf::Event event;
while (window.PollEvent(event))
{
// Close window : exit
if (event.Type == sf::Event::Closed)
window.Close();
}
// Clear screen
window.Clear(sf::Color(255,200,0));
// Get Gui Image and Draw in SFML
// Update the window
window.Display();
}
return EXIT_SUCCESS;
}
Thanks for you help !