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

Pages: [1]
1
Graphics / how to draw UI over a 3d openGL space?
« on: May 31, 2012, 06:06:37 am »
Hello!

i have a project that uses opengl to show some 3d models, and you can navigate around them using a xbox 360 wireless controller

but i have no clue about how to make a 2d user interface that draws over the 3d space, i just want to show some labels and maybe some buttons...

the first thing i want to do is to create a label that says: "Loading model...", and then shows the model in 3d, but it will be nice to render the coordinates of the camera in a corner or something...

how to mix 2d context with my 3d project using SFML?

PS: i already read http://www.sfml-dev.org/tutorials/1.3/graphics-window.php, but i did not understood pretty well about mixing width opengl.
PS: after some googling, it seems like there is some GLUI libraries, but i dont know if SFML have a better way to do UI, show text, etc...
PS: sorry for my bad english

2
General / Re: xbox 360 wireless issue
« on: May 21, 2012, 10:52:38 am »
This might be a driver problem. Have you tried it outside SFML? There should be a small app to test joysticks on Linux.

no i have not tried outside SFML yet, but i think this is a driver problem... i dont know hot to test joysticks on linux yet, needs som googling yet by my side

in OP, i've attached my main.cpp, ready for compilation using SFML, and xbox360 camera navigation ready, but... AxisR have this problem..... starts in 0, an then jumps to [-100, 100]

Just a guess (not played around with SFML's non-keyboard controls yet) but I think the Xbox 360 gamepad has an issue where you can't use the Right Trigger and Left Trigger independently. They're treated as one axis unless you're using XInput. Not sure if that has any effect on Linux or it's just a DirectInput problem...

i have no problem using LT and RT triggers independently, but both, starts from zero, and not from -100 in first place, this is fixed immedately by just touching those triggers...

my intention is to move the camera in axis Y positive using RT, and Y negative using LT, now is working, i'll share with you:
https://github.com/joecabezas/SFML_Camera_xbox360

but works only because, initial value in AxisR (Xbox's RT) are substracted by initial value in AxisZ (xbox's LT)

PD: excuse me for my bad english! :), and Laurent, u are great, thank you for making SFML so easy and great :)

3
General / xbox 360 wireless issue
« on: May 21, 2012, 01:29:57 am »
Hello!

hello!, i am implementing a camera using opengl, and i want to control it using a box360 wireless controller

i am having an issue with AxisR using a xbox360 wirelles controller

some revelant code:


std::cout
        << "(AxisR) = ("
        << Input.GetJoystickAxis(0, sf::Joy::AxisR)
        << ")"
        << std::endl;

 

and this is the console output

Code: [Select]
...
(AxisR) = (0)
(AxisR) = (0)
(AxisR) = (0)
(AxisR) = (0)

that is not touching the controller, but when i sightly touch the R Axis (RT button) and then release, now the output is

Code: [Select]
...
(AxisR) = (-100)
(AxisR) = (-100)
(AxisR) = (-100)
(AxisR) = (-100)

is like, in first place, values are from [0,100], but when input is updated, jumps to [-100, 100], and this is causing some problems in my application

this is normal, or there's a way to make this work properly?

some information:

i am using sfml on ubuntu, instaled via repositories this way: sudo aptitude install libsfml-dev

if you need more code, i can share a public repo in github :)

[attachment deleted by admin]

Pages: [1]
anything