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.


Messages - lotios611

Pages: [1] 2 3
1
Window / [SOLVED][Ubuntu]Invisible Window
« on: February 05, 2011, 09:17:58 pm »
Weird, changing sf::Window to sf::RenderWindow made the window appear. I tried adding _window.Display() where I create the window, but it doesn't show until I change it to a render window.
Edit: Changing it back to sf::Window seems to of fixed it. I have no idea why it didn't work before...

2
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;
}

3
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.

4
Feature requests / SetCursor() for sf::Window
« on: August 05, 2010, 10:32:15 pm »
Quote from: "Laurent"
Quote
I just think that it would be nice if it was easier than that

Do you really think it's difficult?

I meant it would be shorter.

5
Feature requests / SetCursor() for sf::Window
« on: August 05, 2010, 07:13:53 pm »
That's what I was thinking of doing for now, I just think that it would be nice if it was easier than that.

6
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.

7
Graphics / [SOLVED] Matrix3.inl
« on: August 05, 2010, 03:52:17 pm »
I upgraded to VC++ 2010, and the problem seems to be fixed.

8
Graphics / View and view moving
« on: August 04, 2010, 12:05:31 am »
Quote from: "vEjEsE"
That code draws the things that are in the view and then goes back to the view's default position, right?

Isn't that CPU expensive? And wouldn't it draw the scrolling backgrond objects from the default position?

I'm not sure how it's implemented, but I think that its just a simple variable change which would mean that it's not that CPU expensive. It's mentioned in the tutorial.
Quote from: "yEjEsE"
-- Thanks for the quick answer.
No problem.

9
Graphics / View and view moving
« on: August 03, 2010, 11:41:32 pm »
Here's some sample code.
Code: [Select]
sf::View example;
App.SetView(example);
//Draw the stuff that scrolls
App.SetView(App.GetDefaultView());
//Draw the HUD

10
Graphics / [SOLVED] Matrix3.inl
« on: August 03, 2010, 05:53:28 pm »
It appears my installation is screwed up epically. This simple code fails.
Code: [Select]
#include <iostream>
#include <math.h>

int main()
{
    std::cout << sqrt(9);
    return 0;
}

This reports:
Quote

c:\documents and settings\shane\desktop\messing around\main.cpp(6) : error C3861: 'sqrt': identifier not found


This also fails:
Code: [Select]
#include <iostream>
#include <cmath>

int main()
{
    std::cout << std::sqrt(9);
    return 0;
}

It reports over one hundred errors.

11
Graphics / [SOLVED] Matrix3.inl
« on: August 02, 2010, 06:39:20 pm »
I've checked in math.h and found the sin() and cos() functions defined.

12
Graphics / [SOLVED] Matrix3.inl
« on: August 02, 2010, 06:02:32 pm »
I'm using the Express version. I've searched some more and found that math.h is there, so I have no idea why it complains.

13
Graphics / [SOLVED] Matrix3.inl
« on: August 02, 2010, 05:02:36 pm »
Quote from: "Laurent"
You don't have them defined in math.h?? What compiler are you using?
I'm using VC++ 2008. I've tested it with the sqrt() function function also. It seems that my compiler didn't come with math.h.

14
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

15
Network / Creating a server list for online games
« on: December 19, 2009, 11:12:17 pm »
So what you want is a way to interact with a MySQL database from C++? I don't think you can do that with SFML. I think Qt has functions to do what you want.

Pages: [1] 2 3
anything