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

Pages: 1 ... 55 56 [57]
841
General discussions / New graphics API ready
« on: December 29, 2011, 02:07:01 pm »
Just noticed something else by accident. I haven't had time to further investigate, but it seems reasonable (but still missing any notes in the docs then?):

By accident I loaded a texture before my window is created (no existing context yet). Under Windows 7, the texture still worked fine (so I didn't notice), but under Ubuntu 11.10 (inside VirtualBox) the texture always appeared with the contents of the first texture loaded after creating the window. It still used the scaling/mapping of the original texture (the one I tried to load) but used the first OpenGL texture created after creating the window.

Essentially something like this:
Code: [Select]
tex1.LoadFromFile(512x512px);
window.Create(...);
tex2.LoadFromFile(256x256px);


Trying to draw the top left 10x10 pixels of tex1 would now result in drawing the (upscaled) top left 5x5 pixels of tex2 (due to different tex coord scaling).

842
General discussions / New graphics API ready
« on: December 29, 2011, 10:59:32 am »
Okay, took me just 5 mins to adjust to the Drawable changes. Nice.

However, there are some downsides I wanted to mention here and I guess they're just some oversights or whatever:

The old one-liners like rt.Draw(sf::Shape::Rectangle(...)) are no longer available. I thought they're rather handy for quick debug drawings. sf::RectangleShape isn't a real perfect replacement due to lacking constructor parameter (you should still be able to set position, colors and thickness through the constructor).

Also, maybe I missed it, but it's (for now?) no longer possible to create a sf::Shape with different colors at different points? Tempted to reimplement that, cause I thought it's been rather handy for gradients and such.

Also, think we're definitely missing simple primites like a LineShape or something similar (well, probably not a shape, but still useful). Wouldn't like to abuse a rectangle or convex shape for this.

Edit:
(I also noticed that using Sprite::SetScale(-1,1) won't simply mirror the sprite, but also change its position? I'd expect the given coordinate/position to stay the top left corner, no matter how the sprite is scaled.) Okay, this can be "fixed" moving the origin, due to it being applied as a real transform, still not that happy about this change.

Edit 2:
How about changing CircleShape to be an EllipseShape and making CircleShape a specialization (i understand it can be done using scaling, but that's still a bit off)?

Pages: 1 ... 55 56 [57]
anything