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

Pages: [1]
General / Code of sfml book?
« on: October 11, 2014, 03:25:43 pm »
Code of sfml book and the actual tutorial is different?

Im on chapter and i got one error where VS can is saying the my TextureHolder is undefined. I cant figure out how to solve it. I declare all the header on my aircraft.h

But when i look on the code of sfml book there is this ResourceIdentifiers. Its not event mentioned in the book

Here is my whole code
#include "Entity.h"
#include "ResourceHolder.h"
class Aircraft : public Entity
        enum class Type{

        Aircraft(Type type, const this_undefined& textures); <--------- this is the error; its undefined
        virtual void drawCurrent(sf::RenderTarget &target, sf::RenderStates states) const;
        Type mType;
        sf::Sprite mSprite;
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <iostream>
#include <memory>
using namespace std;

namespace Textures{
        enum class Type{

template<typename Resource, typename Identifier>
class ResourceHolder{
        void load(Identifier id, const std::string &filename);

        template<typename Parameter>
        void load(Identifier id, const std::string &filename, const Parameter &secondParam);

        Resource &get(Identifier id);
        const Resource &get(Identifier id) const;

        typedef ResourceHolder<sf::Texture, Textures::Type> this_undenfined;

        std::map<Identifier, std::unique_ptr<Resource>> mResourceMap;

This is the code im following on the book. But i dont know why the "this_undefined" variable is undefined in my IDE

NOTE: I change it to the word "this_undefined"  to highlight the error

General / understanding scene graph better?
« on: October 06, 2014, 03:26:04 pm »
Im having a trouble visualizing scene graph in my head. I read some blogs and it said that scene graph is like a stage? If this is right then what is scene node?

In Cs terms its a tree data. But in game how can you visualize it? In SFML book it said

A scene graph contains a root scene node, which exists only once in a world.

The term world makes me think to visualize this scene graph as a world? is this right? So this root scene node is the origin? Like for example the (0,0) top-left coordinate?

General / SFML book code?
« on: October 04, 2014, 03:56:14 pm »
I think the codes on SFML is not complete.

The two overloaded get() member functions are generalized using the same principle, that is why they are not listed here. You can refer to the online code base for a complete implementation.

I tried to look at the code sample i downloaded but i still cant find the ResourceHolder class. The book and the online code base is not the same.

General / clion and sfml?
« on: September 10, 2014, 04:50:08 am »
I am using mac osx. I hate xcode and eclipse. They are super slow. Just wanna try the new jetbrains IDE for c++ named clion. Im not a c++ PRO and just only started learning it so i dont know how to integrate sfml in clion

Can you guys help me?


Pages: [1]