46
SFML projects / SFML Light System - Let There Be Light
« on: February 14, 2012, 02:39:15 pm »
lolz123, sorry for disturbing, any news?
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.
void DrawLine(sf::Vector2f a, sf::Vector2f b)
{
sf::Vertex line[2] = {a, b};
window.Draw(line, 2, sf::Lines);
}
OIS::ParamList params;
std::string window = boost::lexical_cast<std::string>(mWindow->GetSystemHandle());
// Logging of window variable shows 6-digits number
params.insert(std::make_pair(std::string("WINDOW"), window));
mInputSystem = OIS::InputManager::createInputSystem(params);
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 7
Current serial number in output stream: 9
Antialiasing level: 0
size_t mWindowHandle;
ogreWindow->getCustomAttribute("WINDOW", &mWindowHandle);
boost::shared_ptr<sf::Window> = mInputWindow = boost::shared_ptr<sf::Window>( new sf::Window(mWindowHandle) );
sf::Event localEvent;
while(mInputWindow->GetEvent(localEvent))
{
using namespace Engine::Events;
sf::Event::EventType type = localEvent.Type;
if (type == sf::Event::MouseButtonPressed) { cout << "Mouse bbutton pressed!"; }
else if (type == sf::Event::MouseButtonReleased) { cout << "Mouse button released!"; }
}
if (mInputWindow->GetInput().IsMouseButtonDown(sf::Mouse::Left))
{
cout << "Left mouse button is pressed!";
}
size_t handle;
OgreWindow->getCustomAttribute("WINDOW", &handle);
sf::Window winHandle;
winHandle.Create(handle);
winHandle.SetCursorPosition(GetWidth()/2, GetHeight()/2);
winHandle.ShowMouseCursor(false);