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

Pages: [1]
1
General / Re: Edit: SFML works on FreeBSD very good
« on: August 27, 2016, 12:05:51 am »
SFML works better on FreeBSD now. And I wish it supports more BSD OS.

2
System / Re: [SFML 2.0 RC] - Threads
« on: June 09, 2012, 05:00:47 am »
I am sad it still can't run on FreeBSD.

3
General / FreeBSD is an Unsupported operating system?
« on: October 25, 2011, 03:11:46 pm »
I am sorry that it's hard for me to do something for SFML. It's a pity that FreeBSD users can't use SFML 2.0 now.

4
General / FreeBSD is an Unsupported operating system?
« on: September 19, 2011, 05:12:24 pm »
Maybe ois is a solution, I am not sure. A friend told me.
Quote
Object Oriented Input System (OIS) is meant to be a cross platform, simple solution for using all kinds of Input Devices (Keyboards, Mice, Joysticks, etc) and feedback devices (e.g. force feedback). Written in C++ using Object Oriented Design pattern

http://sourceforge.net/projects/wgois/
ois is in FreeBSD ports tree:
/usr/ports/devel/ois/

5
General / FreeBSD is an Unsupported operating system?
« on: September 16, 2011, 05:09:57 pm »
Quote from: "Laurent"
First, we need to find documentation for the joystick API on FreeBSD. It should be close the Linux one, but without a doc we can't do anything.

Then with a doc I think I'll be able to fix the code blindly, and you would test it for me.

So... do you know where I could find the documentation of the FreeBSD joystick API?


xf86-input-joystick  is in FreeBSD ports tree.
Code: [Select]

# cd /usr/ports/x11-drivers/xf86-input-joystick/
# make install clean
# pkg_info -Ix xf86-input-joystick
xf86-input-joystick-1.5.0_1 X.Org joystick input driver
# pkg_info -L xf86-input-joystick-1.5.0_1
Information for xf86-input-joystick-1.5.0_1:

Files:
/usr/local/man/man4/joystick.4x.gz
/usr/local/include/xorg/joystick-properties.h
/usr/local/lib/xorg/modules/input/joystick_drv.la
/usr/local/lib/xorg/modules/input/joystick_drv.so
/usr/local/libdata/pkgconfig/xorg-joystick.pc





This is the entire code of /usr/local/include/xorg/joystick-properties.h
Code: [Select]

/*
 * Copyright 2007-2008 by Sascha Hlusiak. <saschahlusiak@freedesktop.org>    
 *                                                                            
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is  hereby granted without fee, provided that
 * the  above copyright   notice appear  in   all  copies and  that both  that
 * copyright  notice   and   this  permission   notice  appear  in  supporting
 * documentation, and that   the  name of  Sascha   Hlusiak  not  be  used  in
 * advertising or publicity pertaining to distribution of the software without
 * specific,  written      prior  permission.     Sascha   Hlusiak   makes  no
 * representations about the suitability of this software for any purpose.  It
 * is provided "as is" without express or implied warranty.                  
 *                                                                            
 * SASCHA  HLUSIAK  DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
 * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
 * EVENT  SHALL SASCHA  HLUSIAK  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
 * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
 * PERFORMANCE OF THIS SOFTWARE.
 *
 */

#ifndef _JOYSTICK_PROPERTIES_
#define _JOYSTICK_PROPERTIES_

/**
 * Properties exported by the joystick driver. These properties are
 * recognized by the driver and will change its behavior when modified.
 */



/** To be used with property JSTK_PROP_AXIS_TYPE **/
typedef enum _JSTK_TYPE {
    JSTK_TYPE_NONE=0,      /* Axis value is not relevant */
    JSTK_TYPE_BYVALUE,     /* Speed of cursor is relative to amplitude */
    JSTK_TYPE_ACCELERATED, /* Speed is accelerated */
    JSTK_TYPE_ABSOLUTE     /* The amplitude defines the cursor position */
} JSTK_TYPE;


/** To be used with properties JSTK_PROP_AXIS_MAPPING, JSTK_PROP_BUTTON_MAPPING */
typedef enum _JSTK_MAPPING {
    JSTK_MAPPING_NONE=0,         /* Nothing */
    JSTK_MAPPING_X,              /* X-Axis */
    JSTK_MAPPING_Y,              /* Y-Axis */
    JSTK_MAPPING_ZX,             /* Horizontal scrolling */
    JSTK_MAPPING_ZY,             /* Vertical scrolling */
    JSTK_MAPPING_BUTTON,         /* Mouse button */
    JSTK_MAPPING_KEY,            /* Keyboard event */
    JSTK_MAPPING_SPEED_MULTIPLY, /* Will amplify all axis movement */
    JSTK_MAPPING_DISABLE,        /* Disable mouse and key events */
    JSTK_MAPPING_DISABLE_MOUSE,  /* Disable only mouse events */
    JSTK_MAPPING_DISABLE_KEYS    /* Disable only key events */
} JSTK_MAPPING;



/** Controls the verbosity of the driver */
/* 8 bit (0..20) */
#define JSTK_PROP_DEBUGLEVEL "Debug Level"

/** Number of buttons found on device */
/* 8 bit (0..MAXBUTTONS), read-only */
#define JSTK_PROP_NUMBUTTONS "Buttons"

/** Number of axes found on device */
/* 8 bit (0..MAXAXES), read-only */
#define JSTK_PROP_NUMAXES "Axes"

/** Generate pointer movement or button events */
/* 8 bit (0 or 1) */
#define JSTK_PROP_MOUSE_ENABLED "Generate Mouse Events"

/** Generate key events */
/* 8 bit (0 or 1) */
#define JSTK_PROP_KEYS_ENABLED "Generate Key Events"

/** Set the dead zone of each axis */
/* 32 bit (0..30000), for each axis*/
#define JSTK_PROP_AXIS_DEADZONE   "Axis Deadzone"

/** Set axis type to none, byvalue, accelerated, absolute */
/* 8 bit, one of enum _JSTK_TYPE per axis*/
#define JSTK_PROP_AXIS_TYPE   "Axis Type"

/** Set mapping of axis to none, x, y, zx, zy, key */
/* 8 bit, one of enum _JSTK_MAPPING per axis */
#define JSTK_PROP_AXIS_MAPPING   "Axis Mapping"

/** Set movement factor of axis (default 1.0f) */
/* FLOAT[MAXAXES], movement amplify per axis */
#define JSTK_PROP_AXIS_AMPLIFY "Axis Amplify"

/** Scancodes for axis in low position */
/* 8 bit, 4 per axis */
#define JSTK_PROP_AXIS_KEYS_LOW "Axis Keys (low)"

/** Scancodes for axis in high position */
/* 8 bit, 4 per axis */
#define JSTK_PROP_AXIS_KEYS_HIGH "Axis keys (high)"

/** Set the mapping of each button to
    none, x, y, zx, zy, button, key, speed_multiply,
    disable, disable_mouse, disable_keys */
/* 8 bit, one of enum _JSTK_MAPPING per button */
#define JSTK_PROP_BUTTON_MAPPING   "Button Mapping"

/** Set the logical button to report for this physical button */
/* 8 bit (0..32), logical button number per button */
#define JSTK_PROP_BUTTON_BUTTONNUMBER "Button Number"

/** Set amplify factor of button (default 1.0f) */
/* FLOAT[MAXBUTTONS], amplify value per button */
#define JSTK_PROP_BUTTON_AMPLIFY "Button Amplify"

/** Scancodes for button */
/* 8 bit, 4 per button */
#define JSTK_PROP_BUTTON_KEYS "Button Keys"


#endif /* _JOYSTICK_PROPERTIES_ */

6
General / FreeBSD is an Unsupported operating system?
« on: September 15, 2011, 06:22:44 pm »
Quote from: "Laurent"
First, we need to find documentation for the joystick API on FreeBSD. It should be close the Linux one, but without a doc we can't do anything.

Then with a doc I think I'll be able to fix the code blindly, and you would test it for me.

So... do you know where I could find the documentation of the FreeBSD joystick API?


sounds interesting. I will have a try.

7
General / FreeBSD is an Unsupported operating system?
« on: September 15, 2011, 05:21:39 pm »
Quote from: "Laurent"

Quote
...many errors with joystick API...

Ok, here is the interesting stuff :)
The joystick API on FreeBSD is undocumented and I was waiting for someone to help me for implementation and tests. Would you like to help?


I 'd like. How to do? (I have some level c and c++ skills. But I have a frew system and project build skills).

8
General / FreeBSD is an Unsupported operating system?
« on: September 15, 2011, 02:44:19 pm »
I downloaded LaurentGomila-SFML-bindings_removed-98-g78a625d.tar.gz just now and build it. I still failed to build it.
Code: [Select]

 elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
     # FreeBSD compile path is the same as Linux
     set(LINUX 1)

FreeBSD is not Linux.




Code: [Select]

LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:55: error: 'O_RDONLY' was not declared in this scope
LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:55: error: 'open' was not declared in this scope

So I add #include <fcntl.h> into src/SFML/Window/Linux/JoystickImpl.cpp



Code: [Select]

LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:63: error: 'ioctl' was not declared in this scope

So I ad #include <sys/ioctl.h> into src/SFML/Window/Linux/JoystickImpl.cpp



Code: [Select]

LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:64: error: 'JSIOCGAXMAP' was not declared in this scope
LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:92: error: 'JSIOCGBUTTONS' was not declared in this scope
LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:99: error: 'JSIOCGAXES' was not declared in this scope


Code: [Select]

LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:104: error: 'ABS_X' was not declared in this scope

...
Code: [Select]

LaurentGomila-SFML-a647c68/src/SFML/Window/Linux/JoystickImpl.cpp:126: error: 'js_event' was not declared in this scope

Which file defines JSIO*, ABS_*, js_event_* ?

9
General / FreeBSD is an Unsupported operating system?
« on: September 14, 2011, 05:52:57 pm »
but I don't know how to modify the cmake files.

10
General / FreeBSD is an Unsupported operating system?
« on: September 14, 2011, 05:07:02 pm »
Quote from: "Laurent"
In fact SFML supports FreeBSD, it's just the CMake file which is incomplete.


I see, thank you.

11
General / Segmentation fault
« on: September 14, 2011, 04:52:36 pm »
Quote from: "Laurent"
SFML 1.6 can't.
SFML 2 can.


I failed to build SFML 2.0 in FreeBSD.

12
General / SFML works on FreeBSD very good
« on: September 14, 2011, 04:21:31 pm »
Edit: I am sorry for this edit. SFML works on FreeBSD very good after years.

When I compile SFML 2.0 in my FreeBSD 8.2 with cmake:
Code: [Select]
CMake Warning at cmake/Config.cmake:20 (message):
   Unsupported operating system
 Call Stack (most recent call first):
   CMakeLists.txt:14 (include)



 CMake Error at CMakeLists.txt:190 (install):
   install FILES given no DESTINATION!

Part of the cmake/Config.cmake file:
Code: [Select]
# detect the OS
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(WINDOWS 1)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
     set(LINUX 1)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set(MACOSX 1)

Do you really don't want SFML to support FreeBSD?

Edit: I am sorry for this edit. SFML can be built on FreeBSD without suspense. It just run better. SFML works on FreeBSD very good after years.

cmake/Config.cmake
     19 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     20     set(SFML_OS_UNIX 1)
     21     if(ANDROID)
     22         set(SFML_OS_ANDROID 1)
     23         # use the OpenGL ES implementation on Android
     24         set(OPENGL_ES 1)
     25     else()
     26         set(SFML_OS_LINUX 1)
     27         # don't use the OpenGL ES implementation on Linux
     28         set(OPENGL_ES 0)
     29     endif()
     30 elseif(CMAKE_SYSTEM_NAME MATCHES "^k?FreeBSD$")
     31     set(SFML_OS_FREEBSD 1)
     32     # don't use the OpenGL ES implementation on FreeBSD
     33     set(OPENGL_ES 0)
 

And I wish more other BSD supports. Bitrig, NetBSD, OpenBSD, ...

13
General / Segmentation fault
« on: September 14, 2011, 04:19:38 pm »
Quote from: "Laurent"
This function is defined in GL3 or even 4, so you need:
- a 3.x or 4.x context (which SFML can't create -- but you can get one if you're lucky)
- GLEW or GLEE to handle extensions, as you probably don't have GL3/4 headers and therefore the function is not available directly


It's a pity that SFML can't create GL 3.x/4.x context.  :(

14
General / Segmentation fault
« on: September 13, 2011, 05:15:29 pm »
When I use glGenVertexArrays() with sfml 1.6, I suffer from segmentation fault. But when I use glGenVertexArrays() with glfw, everything is ok. I don't know how to solve it.

Pages: [1]