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

Pages: [1]
1
Graphics / Re: sfml sprite being obscured through pointer
« on: July 21, 2015, 04:06:31 pm »
Sorry this is my first time on the forum. :P.
But if I show all my code I'll go way over those guidelines.

Anyway the issue was with views, thanks!

2
Graphics / sfml sprite being obscured through pointer
« on: July 21, 2015, 07:31:00 am »
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

Pages: [1]