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 - AgonizingBroadcast

Pages: [1]
1
General discussions / Re: Modern OpenGL with SFML 2.0
« on: May 13, 2013, 07:13:40 pm »
Yes it is possible.

Oh. Is there any special function calls I need to do or does it just work out of the box when I include SFML/OpenGL.hpp and SFML/Graphics.hpp ?

2
General discussions / Re: Modern OpenGL with SFML 2.0
« on: May 13, 2013, 07:09:46 pm »
Is it possible to use modern OpenGL (4+) with SFML 2.0?

Not at the moment, but what is the reason that you want a newer version of OpenGL?

Ah okay, I wanted to use it as soon it's going to become a standard and it will help me understand graphics programming. Thanks for the fast reply.

3
General discussions / Modern OpenGL with SFML 2.0
« on: May 13, 2013, 06:59:41 pm »
Is it possible to use modern OpenGL (4+) with SFML 2.0?

4
General / Re: Linking Error
« on: May 06, 2013, 02:00:22 pm »
Next time you have an error, please write it in your post... How can we help if we don't know what's wrong? :P

Sorry! D: I completely forgot to post the error, my bad. Won't happen again I assure you.

5
General / Re: Linking Error
« on: May 06, 2013, 12:38:43 am »
You need to link sfml-window, and consider the correct link order. Please read the tutorial...

By the way, what should the negation operator in !sf::Style::Resize mean? And why do you need manual memory management and a destructor? Just define your class as follows:
class Game
{
    private:
        sf::RenderWindow window; // No pointer
    public:
        Game();
        void start();
};
Game::Game()
: window(sf::VideoMode(800, 600, 32), "Pong", sf::Style::Resize | sf::Style::Close)
{
    // Because of the constructor initializer list, the body remains empty
}

void Game::start()
{
}

Thank you for the quick response :) All works fine now. I'm sorry for being a noob at this, I don't fully understand the concept of pointers and memory management(I come from a Java background)

6
General / Linking Error
« on: May 06, 2013, 12:23:34 am »
I'm getting a linking error(I think) when trying to compile my program.

This is my Game.h file:
#ifndef GAME_H
        #define GAME_H

#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>

class Game {
        private:
                sf::RenderWindow *window;
        public:
                Game();
                ~Game();
                void start();
};

#endif
 

And this is my Game.cpp file:
#include "Game.h"

Game::Game() {
        this->window = new sf::RenderWindow(sf::VideoMode(800, 600, 32), "Pong", !sf::Style::Resize | sf::Style::Close);
}

Game::~Game() {

}

void Game::start() {

}
 

This is the build script I am using, the dll files are in the same directory as the code files.
g++ -o Pong.exe Main.cpp Game.h Game.cpp -lsfml-system -lsfml-graphics -lsfml-audio
 

Any way to fix this?

Pages: [1]
anything