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

Pages: [1]
1
General / Scale 9 Image in SFML?
« on: November 12, 2014, 04:50:32 am »
like CCScale9Sprite in cocos2d-x.

2
How to listen shape's touch event?

#import <SFML/Main.hpp>
#import <SFML/Graphics.hpp>

void main()
{
    sf::RenderWindow window(sf::VideoMode(640, 1136), "Putao Application");
   
    sf::CircleShape shape;
    shape.setPosition(100, 100);
    shape.setRadius(100.0f);
    shape.setFillColor(sf::Color::Cyan);
   
    while (window.isOpen())
    {
        sf::Event event;
       
        while(window.pollEvent(event))
        {
            // here example code?
        }

        window.clear();
        window.draw(shape);
        window.display();
    }
}

3
Graphics / Re: How to fit the screen resolution in iOS?
« on: October 28, 2014, 07:23:46 pm »
It's a retina screen, right? So I guess that the logical resolution is 320x568, which seems to match your result. So no problem here.

Note that the iOS port doesn't provide explicit support for retina screens yet (ie. rendering at physical resolution).
OK, thank you, i need real px :)

4
Graphics / Re: How to fit the screen resolution in iOS?
« on: October 28, 2014, 07:20:51 pm »
You mean it is too big?

Otherwise, something that a lot of people do wrong: The position of the circle is the left-upper corner of the bounding rect and not the circle's center. Set the origin if you need to change this.

And please next time post in the Help/Graphics forum, not in General Discussions.
yes, too big, this is 100px ...

thank you, next publish here :)

5
Graphics / How to fit the screen resolution in iOS?
« on: October 28, 2014, 03:14:45 pm »
How to fit the screen resolution?

My iphone is 640x1136, but look image in attachment!

my code:

#import <SFML/Main.hpp>
#import <SFML/Graphics.hpp>

void main()
{
    sf::RenderWindow window(sf::VideoMode(640, 1136), "Putao Application");
   
    sf::CircleShape shape;
    shape.setPosition(100, 100);
    shape.setRadius(100.0f);
    shape.setFillColor(sf::Color::Cyan);
   
    while (window.isOpen())
    {
        sf::Event event;
       
        window.pollEvent(event);
        window.clear();
        window.draw(shape);
        window.display();
    }
}
 

6
General / compile SFML in xcode for iOS, OpenGL/glu.h file not found.
« on: October 24, 2014, 11:22:03 am »
Why ... iOS not have glu support?
Code: [Select]
In file included from /Users/zoujiaqing/Projects/SFML/src/SFML/Graphics/Font.cpp:29:
In file included from src/SFML/Graphics/GLCheck.hpp:32:
In file included from src/SFML/Graphics/GLExtensions.hpp:77:
extlibs/headers/GL/glew.h:1163:10: fatal error: 'OpenGL/glu.h' file not found
#include <OpenGL/glu.h>
         ^
1 error generated.

7
General / Re: How to create sf::Window to iOS app?
« on: October 23, 2014, 05:09:37 pm »
not found ios example in dir:
SFML/examples/

8
General discussions / Re: FreeBSD SFML 2.1 Hello World!
« on: October 23, 2014, 05:07:46 pm »
Love FreeBSD.

9
General / Re: How to create sf::Window to iOS app?
« on: October 23, 2014, 05:06:58 pm »
here into code ?

Code: [Select]
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // here into code ?
}

...

10
General / How to create sf::Window to iOS app?
« on: October 23, 2014, 05:04:55 pm »
I compiled sfml-*.a :
Code: [Select]
cmake . -DSFML_BUILD_EXAMPLES=TRUE -DSFML_OS_IOS=TRUE
make

but, how to use it?

in my ViewController.m ?

thanks!!

Pages: [1]
anything