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

Pages: [1]
1
Graphics / texture.update() problem
« on: May 27, 2015, 01:56:17 pm »
I am making a mini zombie survival game in SFML, and what I'm trying to do at the moment is to render the map. However, when I try to use the line:

this->texture->update(tile1,x*64,y*64);


it crashes, and at first I thought it is because the image size is too big or something, or I made a derp in the development process, so I created a minimal code, and please note, I made sure the
"Stones.png"
is 64x64.


#include<iostream>
#include<SFML/Graphics.hpp>
#include<SFML/Window.hpp>

int main(){

    sf::Image image;
    sf::RenderWindow window(sf::VideoMode(800,600),"minimal code");
    sf::Texture texture;
    sf::Event event;

    while(window.isOpen()){

        while(window.pollEvent(event)){

            if(event.type == sf::Event::Closed){
                window.close();
            }

        }


        image.create(64,64);
        image.loadFromFile("Stones.png");
        texture.update(image,64,64);


    }


}

 


now that the context of the minimal code is given, I should also tell you that

 texture.update(image,64,64);
is what causes the problem.



here is the png, just so you can do a quick test.

2
SFML projects / space shooter
« on: April 07, 2015, 10:56:41 pm »


little game I have developed.

http://www.mediafire.com/download/xggge5cn9e2smd8/SpaceShooter.7z

^ that is the coding. I am still clumsy with SFML, but I am proud I managed to finish a project from scratch.

3
Graphics / Basic rendering crashing
« on: January 13, 2015, 11:41:40 pm »


I have followed all the tutorial and I have linked to every dependant files like the tutorial asked me to just like opengl32 and etc, and the creating the window works, but when I try to render a basic shape similar to the one in the tutorial my window crashes with no error, and this seems strange because nobody else seems to be having the same problem or if they do, they don't have the same complaints on debugging mode(shown above).
What could be the problem? I thoroughly apologise if this is a stupid question

Oh, also, my first post :D nice to meet you all

Pages: [1]
anything