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

Pages: [1]
1
Graphics / Re: possible bug with sprite and raw textured vertices?
« on: June 13, 2016, 09:13:18 am »
wow.....

ok.....

thx!

...


is there a way of saying "resolved" somewhere?

2
Graphics / Re: possible bug with sprite and raw textured vertices?
« on: June 13, 2016, 08:29:36 am »
hum....

Sorry to ask again but I'm not able to make it work... and I've copy pasted your solution.

it's like the sf::VertexArray are not behaving on my machine (a Linux system... if you ask).

isok -> sprite alone
isko -> dump+sprite -> dump give a grey square
isko -> sprite+dump -> dump give a grey square
isko -> dump+sprite+dump -> dump give a grey square
isko -> dump alone -> dump give a grey square

3
Graphics / Re: possible bug with sprite and raw textured vertices?
« on: June 12, 2016, 11:28:54 am »
wow....

thx!

I'll read the doc more carefully next time.

4
Graphics / possible bug with sprite and raw textured vertices?
« on: June 12, 2016, 09:33:43 am »
Hi eveyrone,

Sorry in advance as I'm not sure if it is the right place to ask that kind of question...

Anyway, I'm currently facing a problem I can't explain and it might (unless I'm wrong) actually be a bug within the sfml.

long story short, code + result:

code:
#include <SFML/Graphics.hpp>

void    dump_texture(sf::RenderWindow& rwindow, const sf::Vector2f& pos, sf::Texture& tex);

int main()
{
    //
    // INIT

        // Create the main window
        sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

        // Load a sprite to display
        sf::Texture texture;
        if (!texture.loadFromFile("cute_image.jpeg"))
            return EXIT_FAILURE;
        sf::Sprite sprite(texture);

        // scale to match a 200x200 size
        sf::Vector2u    tsize = texture.getSize();
        sprite.scale(200.0f/tsize.x, 200.0f/tsize.y);

    // INIT
    //

    // Start the game loop
    while (window.isOpen())
    {
        //
        // EVENTS

            sf::Event event;
            while (window.pollEvent(event))
            {
                // Close window: exit
                if (event.type == sf::Event::Closed)
                    window.close();
            }

        // EVENTS
        //


        //
        // RENDER

            window.clear();

            dump_texture(window, sf::Vector2f(200,0), texture);

            window.draw(sprite);

            dump_texture(window, sf::Vector2f(400,0), texture);

            window.display();

        // RENDER
        //
    }
    return EXIT_SUCCESS;
}

void    dump_texture(sf::RenderWindow& rwindow, const sf::Vector2f& pos, sf::Texture& tex)
{
    sf::Texture::bind(&tex);

    sf::Vertex vertices[] =
    {
        sf::Vertex(sf::Vector2f(pos.x+  0, pos.y+  0), sf::Color::White, sf::Vector2f(0,0)),
        sf::Vertex(sf::Vector2f(pos.x+  0, pos.y+200), sf::Color::White, sf::Vector2f(0,1)),
        sf::Vertex(sf::Vector2f(pos.x+200, pos.y+200), sf::Color::White, sf::Vector2f(1,1)),
        sf::Vertex(sf::Vector2f(pos.x+200, pos.y+  0), sf::Color::White, sf::Vector2f(1,0))
    };

    rwindow.draw(vertices, 4, sf::Quads);

    sf::Texture::bind(NULL);
}
 

result
https://drive.google.com/open?id=0BxUZ1JUO9QAbakJyWVhZWkZZRlU

Basically the sprite seems to "disable" the opengl texture2d state... which would make the second call to dump_texture to fail?

Any idea?

5
SFML projects / Re: Escape From Fog - 3D Maze game
« on: January 19, 2015, 07:59:23 pm »
Quote
I want to try to do procedural textures like wood or marble (mostly just for the sake of doing it).  :D

check Perlin Noise <3 (I'm sure you already know it)

Perlin noise 2d => texture bois/marble/etc.
Perlin noise 3d => volumetric fog/cloud/etc.

6
SFML projects / Re: [Game] Croger
« on: December 14, 2014, 06:48:07 pm »
Hi, everyone, very interresting project if you ask my opinion.

I just wanted to point something about this whole translating thing :

Even if it is done for children, is it a good idea to translate some "english commonly used words" in the programming ?

Or maybe find a way to put the to words (english/french) side by side... I honestly have no idea.

It's just that the french kids may have fun with this project buuuut they may not be able to connect what they learned with another programming language that is massivement using "if, else, ...".

7
SFML projects / Re: a small 3D maze game (working to become a shooter)
« on: December 09, 2014, 11:57:32 pm »
Sound's fun :)

I lack the time to join you on this "Just For Fun" project.

Anyway you remind me when I try to do something, always thinking bigger than previously.... mister I want 3d models from blender ;).

You can just try something fun at first, so maybe more focus on the game design and level design (secret rooms, special weapons/ammos, etc.).

It is not as simple as it may sound.... (just saying... in case you're really like me....)

Buuuuut it's just my opinion, I'm often wrong.

Anyway, have fun ;).

8
SFML projects / Re: Faux Car
« on: December 06, 2014, 12:10:58 am »
awsome O_o

PS : what about a minimapor something to peek what's next  ?

9
SFML projects / Re: Unnamed "Tug-Of-War" Strategy Game
« on: June 09, 2014, 05:27:57 pm »
Thanks for sharing this project :).

Make me curious about you're AI knowledge :)

Pages: [1]
anything