Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Topics - lotios611

Pages: [1]
1
Window / [SOLVED][Ubuntu]Invisible Window
« on: February 05, 2011, 07:25:16 pm »
I am trying to create a game engine, and have hit a little snag. Whenever I try to create an sf::Window, the window is invisible. I can interact with it and the name of it appears on the taskbar, but I can't see any part of the window. Here's my code:
main.cpp
Code: [Select]
#include <SE_Engine.hpp>

int main()
{
SE::Engine engine;
engine.createWindow("Pickin' Gems", 640, 480, 32);
return engine.run();
}

SE_Engine.hpp
Code: [Select]
#ifndef SE_ENGINE_HPP
#define SE_ENGINE_HPP

#include <string>
#include <SFML/Window.hpp>

namespace SE
{
class Engine
{
public:
void createWindow(std::string name = "Solstice Engine", int width = 640, int height = 480, int bitsPerPixel = 32);
int run();
private:
sf::Window _window;
bool _running;
};
}

#endif //SE_ENGINE_HPP

SE_Engine.cpp
Code: [Select]
#include "SE_Engine.hpp"

void SE::Engine::createWindow(std::string name, int width, int height, int bitsPerPixel)
{
_window.Create(sf::VideoMode(width, height, bitsPerPixel), name);
}

int SE::Engine::run()
{
_running = true;
while (_running)
{
_window.Display();
sf::Event event;
while (_window.GetEvent(event))
{
if (event.Type == sf::Event::Closed)
{
_window.Close();
_running = false;
}
}
}
return 0;
}

2
General / [SOLVED]Error while using SFML 1.6 in Eclipse on Linux
« on: January 29, 2011, 04:54:37 pm »
I'm trying to set up SFML in Eclipse on Linux, but I can't get it to work. I followed the gcc installation tutorial but when I compile the code, I get this error:
Quote
make: *** [Pickin'Gems] Error 2   Pickin' Gems      line 0   C/C++ Problem

I have added -lsfml-system to the linker. I got SFML from Synaptic, if that make a difference.

EDIT: I tried just using the command line, and it compiles + runs with this output:
Quote
7.08364e-06
0.500229
1.00037
1.5005
2.00064
2.50078
3.00092
3.50105
4.00119
4.50132
Which means that it's an Eclipse problem.
Edit2: I seem to have fixed it. Apparently Eclipse is to dumb to realise that "Pickin' Gems" should be formatted as "Pickin\'\ Gems". I solved the problem by having Eclipse build it as PickinGems.

3
Feature requests / SetCursor() for sf::Window
« on: August 05, 2010, 06:44:31 pm »
I think it would be nice to be able to set the window's cursor.

4
Graphics / [SOLVED] Matrix3.inl
« on: August 02, 2010, 01:04:42 am »
I'm trying to develop a game engine, and have recently switched from SDL to SFML. I'm having a little trouble with sf::RenderWindow. The errors I'm getting are:
c:\sfml-1.6\include\sfml\graphics\matrix3.inl(58) : error C3861: 'cos': identifier not found
c:\sfml-1.6\include\sfml\graphics\matrix3.inl(59) : error C3861: 'sin': identifier not found

5
Window / [SOLVED] Window Crashing
« on: December 05, 2009, 04:00:06 pm »
Hello, I am trying to run the code on the tutorials about events using a window. I have the linker set up, but it still doesn't work. The most annoying thing is that I can get the System to work, but not Window.

Pages: [1]
anything