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

Pages: [1]
D / setRepeated() is not work. :/
« on: May 25, 2015, 01:42:29 pm »
Hello. ;D
I just got a problem when i copied a example code of  'SFML Essentials(38 page)' like this:

import derelict.sfml2.window;
import derelict.sfml2.graphics;
import derelict.sfml2.system;

void main(){
        sfVideoMode videoMode = {640, 480, 32};
        sfRenderWindow* window = sfRenderWindow_create( videoMode, "The title", sfClose, null );
        sfTexture* texture = sfTexture_createFromFile( "tile.png", null );
        //Set the texture in repeat mode
        sfTexture_setRepeated( texture, sfTrue );
        sfRectangleShape* rectShape = sfRectangleShape_create();
        sfRectangleShape_setSize( rectShape, sfVector2f( 128*3, 221*2 ) );
        //Bigger texture rectangle than the size of the texture
        sfRectangleShape_setTextureRect( rectShape, sfIntRect(0, 0, 128*3, 221*2) );
        sfRectangleShape_setTexture( rectShape, texture, sfTrue );
        while( sfRenderWindow_isOpen(window) ){
                sfEvent event;
                while( sfRenderWindow_pollEvent(window, &event) ){
                        if( event.type == sfEvtClosed ){ sfRenderWindow_close( window ); }
                        sfRenderWindow_clear( window, sfWhite );
                        sfRenderWindow_drawRectangleShape( window, rectShape, null );
                        sfRenderWindow_display( window );

yes. it's used Derelict-SFML. Execute is well, but not work tile repeated.
I don't know why. Is any problem with my code? reply please..
thanks. :)

D / Re: dub tutorial - compile error..
« on: February 20, 2014, 08:13:02 am »
Hi there!

It looks like there might be an issue or two with the 32bit pre-built binaries I put up. Try building from scratch, or wait a couple of days for me to get some newer ones while I get back into the groove of working on the library again.

Thanks for answer! I will try compile it. :)


D / dub tutorial - compile error..
« on: February 16, 2014, 09:20:57 am »

When i did this tutorial(https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28DUB%29), i got some errors.

/home/xky/project/D/SFML//libdsfml-graphics.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long, std::_Ios_Seekdir)'
/home/xky/project/D/SFML//libdsfml-graphics.so: undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)'
/home/xky/project/D/SFML//libdsfml-graphics.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: ld returned 1 exit status
--- errorlevel 1
Error: Link command failed with exit code 1

and package.json is here.
   "name": "dsfml-test",
   "description": "A minimal D application.",
   "copyright": "Copyright © 2014, xky",
   "authors": ["xky"],
   "lflags" : ["-L/home/xky/project/D/SFML/"],
   "dependencies": {
      "dsfml:graphics": "~master",

I used Xubuntu12 x86.. Did I make a mistake?


Pages: [1]