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

Pages: [1] 2
1
Graphics / Re: Drawing onto a surface
« on: January 18, 2014, 12:27:53 pm »
Dunno how I missed it  :o

Thanks a lot. Solved.

2
Graphics / Drawing onto a surface
« on: January 18, 2014, 11:41:47 am »
I'm not sure how to go about this, thought I'd try get a little input :)

Basically, I want to draw onto a surface, of which I can set the size and position of, which can then be drawn onto the render window buffer. I'm throwing together a small window class which I can draw stuff into, and then just move them all around at once by moving the 'surface' if such a thing is implemented?

Any help appreciated :)

Thanks

3
Graphics / Re: Rotating Texture
« on: March 02, 2013, 12:23:44 pm »
Hmm, ok I'll put it this way:

How should I go about drawing a textured 3D looking plane, similar to that of Mode 7 used in certain SNES titles. I've had a few attempts but it all seems to end pretty badly  :P

Am I able to use OpenGL through SFML?

Any help appreciated. Thanks (BTW: Using SFML 2.0)

4
Graphics / Rotating Texture
« on: February 26, 2013, 11:44:33 am »
Hey guys. Have a small problem, not sure if I'm handling it the correct way and I'm not a 3D expert yet =P

I'm trying to make a small Mode 7 project (And yes, I know it's not real 3D) http://en.wikipedia.org/wiki/Mode_7

It's looking good, but I need to rotate the texture (Not the sprite) so that it can be navigated in this mode, if you understand what I'm trying to say.

I haven't mucked with OpenGL in a long time, if that's even how it should be done. But yeah, confused, any ideas on how I can get what I'm trying to achieve? Any help appreciated!! :D

Thanks!

Pic: This is what I kinda have it doing currently: http://puu.sh/28DkV

5
Graphics / Re: Stretch Sprite/Texture
« on: January 14, 2013, 08:33:16 am »
Thanks guys, all working now  ;D

6
Graphics / Re: Stretch Sprite/Texture
« on: January 14, 2013, 08:04:06 am »
Hmm what sort of calculation? I've tried setScale  but it seems to stretch the image way beyond the size I'm specifying. But I also can't seem to find any documentation of setScale for 2.0 either, so I'm not sure what it's doing.

Any ideas?  :P

Thanks  ;D

7
Graphics / Stretch Sprite/Texture
« on: January 14, 2013, 07:49:45 am »
Hey, I can't find the answer to this anywhere (Well I could but not for 2.0)

How do I simply stretch a, say, 100x100 image to 1024x768.

sf::Texture/Sprites have no setSize() functions so I'm not sure, does it have something to do with views?

Thanks.  ;)

8
General / Re: Window Focus and Input
« on: December 04, 2012, 01:52:19 am »
Yeah.. I guess I could have some sort of pollData() function or something for my classes that need it, and then do that in a single event loop..  :)

9
General / Re: Window Focus and Input
« on: December 03, 2012, 06:52:03 am »
I've come from an old library called Allegro, and I've never really used event systems like this before in large projects like what I'm working on and I wasn't sure how to implement it.

So far, SFML has been really smooth sailing for me, but when it came to my text input class I ran into some problems where if I used a while(window->pollEvent(event)) in the class, and another while(pollEvent) somewhere else, text input would fail to recognize, say, 80% of keystrokes, so I resorted to a while(pollEvent) in the class and just a single pollEvent in the main loop (But now it takes several clicks to close the window) So yeah.

10
General / Window Focus and Input
« on: December 02, 2012, 01:53:09 am »
Hey guys. I've been reading a little on the forum about this problem, seems others have had it =)

I've been using events for things like text input, but not much else, I've stuck to the isButtonPressed() functions for mouse click, and I didn't realize that this function returns true even when the window is out of focus. I didn't really want to pull all my code apart to fix it, I was hoping that I've missed something,  maybe some mode I could set to disable input when the window is out of focus? I hope :(

Any suggestions?

Thanks guys

11
General / Re: Text Input
« on: October 28, 2012, 11:40:41 am »
So I was polling the event incorrectly. Thanks, working now.

12
General / Re: Text Input
« on: October 28, 2012, 10:25:49 am »
-_-

Event tInput;
window->pollEvent(tInput);
if (tInput.type == sf::Event::TextEntered) {
        if (tInput.text.unicode < 128) {
                str += static_cast<char>(tInput.TextEntered);                  
        }
}
cBox.setString(str);
window->draw(cBox);
 

Thats probably not exactly like the example that I found on this forum earlier, that is just what I had saved at the time I posted this after trying everything I could think of.

13
General / Re: Text Input
« on: October 28, 2012, 02:10:09 am »
Oh I have that =)

Yeah, it's like it's getting the unicode fine, but I can't get it to normal characters ascii

14
General / Re: Text Input
« on: October 28, 2012, 02:13:28 am »
Hmm no they're in scope. The strings are created outside of a while(window->isOpen()) loop.

Thanks :)

15
General / Text Input
« on: October 28, 2012, 01:42:39 am »
Hey guys. Having a little trouble with text input, using the TextEntered event.
I can't seem to get any characters added to the string. The only way I can is if I use Event::KeyPressed, which inserts unknown [] characters.

I'm using str += static_cast<char>(tInput.text.unicode); with SFML 2.0.

Thanks in advance =)

Pages: [1] 2