Tagged Questions
-3
votes
0answers
45 views
How to multiply mouse coordinates by view matrix?
I'm working on mouse coordinates to convert them from window to openGL. I'm multiplying the mouse vector with x,y coordinates by the glm::lookAt matrix to rotate mouse vector. I start with 90deg. and ...
1
vote
1answer
45 views
Get the address of a matrix in GLM library
Is there a way to get the address of a matrix from a GLM matrix?
I'm using opengl 4 and glm library though I can't seem to find anything, which might help.
2
votes
1answer
50 views
How to rotate camera around some point?
I have screen with dimensions: 800x600.
The object that I want to rotate around is located at (400,300, -50) - center of the screen.
Orthogonal projection:
Near plan - 0.1f, far plane - 1000.0f
left - ...
-1
votes
0answers
136 views
Loading .obj file with my own parser; textures aren't mapped correctly
I have written a simple .obj parser for my OpenGL game engine that reads vertices, uv's and normals; but when I get to drawing the model in the texture isn't mapped correctly.
I have tried uv.y = ...
3
votes
1answer
118 views
Picking 3D with OpenGL ES 2
I'm trying to implement picking in my framework but I don't understand how I can do this.
I'm working with:
OpenGL ES 2.
GLM mathematic library.
What I have understand, picking can be made with ...
0
votes
1answer
85 views
gluLookAt strange behavior implementing camera
I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly ...
-1
votes
1answer
46 views
Transformations are not correct using GLM and OpenGL
The aim of my program is to render a simple colored triangle in rotation. The rotations are correct if all Z values of my vertices are equals to 0.0f. If one of these values are different of 0.0f the ...
-2
votes
1answer
67 views
Incorrect rotations using openGL GLM and shaders [closed]
The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...
1
vote
1answer
371 views
How to implement a basic arcball camera in OpenGL with GLM
I only just started learning OpenGL and even things like vector maths etc a couple of days ago, so I am having a bit of trouble figuring out exactly what to do to implement an arcball camera system.
...
1
vote
0answers
77 views
Box2D, OpenGL, resolution and matrix setup
Okay, my internal units are going to be meters, ranging between 0.1 and 10 meters for size.
First of all, my mind is all wrapped up in a knot trying to understand how to handle my game with multiple ...
0
votes
1answer
61 views
Box2D OpenGL debug renderer convert box2d coordinates to world space
I made an OpenGL 3.x renderer for Box2D's debug draw (b2Draw base class). Unfortunately I've tried for a while now to convert the box2D units, which are meters to my internal units which are pixels. I ...
0
votes
2answers
75 views
Translate camera position toward camera orientation
I have a camera position (Vec3) and camera horizontal/vertical angle. Now I want to translate my camera position toward the current camera orientation - what is the best way to do that? I am sure it's ...
0
votes
0answers
84 views
GLM Math: error: invalid cast from type 'const glm::detail::tvec3<float>' to type 'float'|
I'm casting a glm type to an normal array using glm::value_ptr() as follows
glm::vec4 position;
glm::mat3 orient;
...
glm::mat4 transformMatrix=glm::translate( glm::mat4(orient) , ...
0
votes
1answer
922 views
matrix 4x4 position data
I understand that a 4x4 matrix holds rotation and position data.
The rotation data is held in the 3x3 sub-matrix at the top left of the matrix.
The position data is held in the last column of the ...
0
votes
1answer
298 views
vector rotations for branches of a 3d tree
I'm attempting to create a 3d tree procedurally. I'm hoping that someone can check my vector rotation maths, as I'm a bit confused.
I'm using an l-system (a recursive algorithm for generating ...
1
vote
2answers
2k views
GLM: Quaternion SLERP Interpolation
I wish to interpolate two quaternion values. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports GLM (OpenGL Mathemathics) library, so ...
4
votes
4answers
3k views
GLM: Euler Angles to Quaternion
I hope you know GL Mathematics (GLM) because I've got a problem, I can not break:
I have a set of Eular Angles and I need to perform smooth interpolation between them. The best way is converting them ...