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

Pages: [1]
1
Graphics / virtual void Render(RenderTarget& Target)
« on: May 03, 2010, 12:05:58 am »
Oh, thanks.
Button is now inheriting from Drawable.
And it has a Sprite, Image, and String member.
And they're being drawn correctly now.
In the .hpp:
Code: [Select]
protected:
virtual void Render(RenderTarget& Target) const;

In the .cpp:
Code: [Select]
void Render(RenderTarget& Target) const
{
     Target.Draw(sprite);
     Target.Draw(text);
}

2
Graphics / virtual void Render(RenderTarget& Target)
« on: May 02, 2010, 11:26:20 pm »
Yo,
I made a class called Button.
It inherits from String, but also has an Image and Sprite member.
I assumed if I wanted my RenderWindow to draw the Sprite and then the String,
I needed this in the .hpp file:
Code: [Select]
protected:
virtual void Render(RenderTarget& Target);

And this in the .cpp file:
Code: [Select]
void Render(RenderTarget& Target)
{
     Target.Draw(sprite);
}


It draws the String, the parent class, but does nothing with the sprite, the member. What is the most appropriate way of doing this?

3
General discussions / ^_^
« on: June 28, 2009, 10:41:16 pm »
Ah, I got you.
Seems pretty cool anyways, I'd like to learn it.

4
General discussions / Excellent Point
« on: June 28, 2009, 07:44:43 pm »
Quote from: "Hnefi"
Your benchmarks are severly flawed. You are comparing the software, 2D library that ships with SDL to OpenGL. Of course you are going to get a huge difference in performance - you don't even need to perform a benchmark to understand that.

What would be really interesting is to see how an SDL-driven OpenGL application performs compared to SFML. That would be a meaningful test, for two reasons: it compares similar technologies and it benchmarks against SDL the way SDL is almost always used.


After seeing SDL_DisplayFormat optimize its performance, I'm worried about these benchmarks. I support the development of SFML, but you should measure the true performance by fully optimizing both sides like this guy mentioned.

Pages: [1]