1
vote
1answer
111 views

How do I flip upside down fonts in FTGL [closed]

I just use FTGL to use it in my app. I want to use the version FTBufferFont to render font but it renders in the wrong way. The font(texture?buffer?) is flipped in the wrong axis. I want to use ...
0
votes
2answers
206 views

Texture coordinates for a 3D box

I have a box model in my DirectX application, stored as 8 vertices: MyVertex vertices[] = { { DirectX::XMFLOAT3( - 1.0f, + 1.0f, - 1.0f ), /*,tex coord...*/}, //0 { DirectX::XMFLOAT3( + ...
0
votes
3answers
3k views

Spherical coordinate from cartesian coordinate

I am implementing a type for Ogre 3D rendering engine to provide spherical coordinates. So far everything is working fine, until I try to build spherical coordinates from a cartesian vector. Here is ...
0
votes
0answers
18 views

How to Point sprite's direction towards Mouse or an Object [duplicate]

I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off ...
1
vote
0answers
296 views

c++ opengl unproject not working

first of all, sorry for the bad english. I need to convert my mouse coordinates to world coordinates, I'm trying to use the glm unproject method. 1280x720 is the size of the window, It's hard coded ...
3
votes
1answer
710 views

Spherical to Cartesian Coordinates

Well I'm reading the Frank's Luna DirectX10 book and, while I'm trying to understand the first demo, I found something that's not very clear at least for me. In the updateScene method, when I press A, ...
4
votes
2answers
844 views

Get world coordinate under mouse (at a ground plane for Warcraft 3 like movement)

I want to let a unit follow the mouse like in any RTS (Warcraft 3, Starcraft, ...). For that I have a "ground plane" which is defined through 2 vectors, the X and Z axis. Now I need to get the world ...
2
votes
1answer
339 views

Detect if square in grid is within a diamond shape

So I have a game in which basically everything is a square inside a big grid. It's easy to check if a square is inside a box whose center is another square: *** x *o* --> x is not in o's ...
3
votes
3answers
449 views

The ship “shudders” in scrolling Asteroids

In my Asteroids game the user can scroll through space. When scrolling, the ship is drawn in the centre of the window. I use interpolation. I scroll the window uing glOrtho, centering it around the ...
2
votes
1answer
3k views

Converting 3D coordinates to 2D and back?

I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction. I'm using OpenGL(GLUT) in my C++ project. I am also ...