Ok so I have a class called Render, a class called RenderMap, and another one called Collider.
This is my issue:
void Render::drawMap() {
mapRender.DrawMap (map.getWindow()); //mapRender is an object of type RenderMap
}
//passes the window into the function
void RenderMap::DrawMap (sf::RenderWindow *map) {
test.draw (map); // test is an object of type Collider
//test.draw(map);
}
//takes the window and passes it into another function
void Collider::draw (sf::RenderWindow* map) {
map -> draw (tile); //tile is an sf::Sprite
}
//finally the last function draws a grass tile to the window
Obviously this isnt nearly all of the code in my program, but this is where the issue is coming from.
The sprite draws to the screen , but it draws as a rectangle that looks like a squashed version of my sprite.
Can anyone help me?
I have a feeling this is some issue with sfml 2.3...
EDIT: i also tried showing a sprite in int main() and it worked perfectly, and i tried resizing the window to something with an x to y ratio of 1. Ex. 500x500