Questions tagged [glm]
GLM is a C++ math library based on the GLSL language.
154 questions
2
votes
1
answer
190
views
Shaders wont bind to the uniform block
I'm having an issue with interface block binding.
Example shader:
...
3
votes
1
answer
1k
views
Make Camera Look at point using a World transformation matrix?
Variants of this question might have been asked on this site, but none of the answers I found worked in my case.
I am trying to make a Camera look at a point. The camera has a world transformation ...
1
vote
1
answer
461
views
Smooth matrix rotation
I have a coded a simple example for a matrix rotation. The example rotates a sphere around its center. The problem is that the rotation is not running perfectly smooth and I'm wondering why.
Here is ...
1
vote
1
answer
779
views
Using glm to rotate the modelview matrix based on the cursor position
I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
1
vote
2
answers
11k
views
How to find the "up" direction of the view matrix, with GLM
Using OpenGL and the GLM matrix library, I want to translate my camera relative to the world coordinate system. This requires me to compute the necessary view matrix. To initialise the view matrix, I ...
0
votes
1
answer
329
views
issue with ray/physics collision detection
All,
I am trying to pick object using ray collision and bullet physics
I am initializing my projection and view matrix only once, here is the code
...
2
votes
2
answers
10k
views
How can I set up an intuitive perspective projection/view matrix combination in OpenGL, using GLM?
Could anyone help me set up an intuitive perspective camera matrix using OpenGL and the GLM library?
By "intuitive" I mean that I want the camera to be looking at the middle of the screen down the -Z ...
0
votes
0
answers
2k
views
OpenGL - Arcball camera rotation
I'm implementing arcball camera rotation, whereby a camera is looking at a coordinate and rotates around it in the x-axis or the y-axis such that the camera is circulating around it; the y-axis will ...
1
vote
2
answers
3k
views
Weird GLM perspective problems with my 2D Game
I am trying to create the graphics system of a 2D game using OpenGL 3.3.
To help me in this task I am using the GLM math libraries.
However I am having some trouble. When my objects (for now they are ...
1
vote
1
answer
3k
views
Compute billboard rotation
I'm trying to compute a matrix to have object always facing the camera. For the moment, my result look pretty good, the problem is that my original billboard scale isn't preserved (Every billboard ...
3
votes
2
answers
801
views
GLM/OpenGL: How Can I Prevent Vector Magnitude From Increasing While Rotating Bones in Skeletal Rig?
ANSWER AT THE BOTTOM OF THIS QUESTION
I have been reading tutorials, articles, questions on StackExchange and books all with the subject of skeletal rigging. I have boiled my program down to just the ...
2
votes
1
answer
5k
views
OpenGL - have object follow mouse
I want to have an object follow around my mouse on the screen in OpenGL. (I am also using GLEW, GLFW, and GLM). The best idea I've come up with is:
Get the coordinates within the window with ...
1
vote
1
answer
4k
views
How Extract Frustum Planes from Clip Coordinates?
I'm having some problems with my Frustum Culling and I want to debug it, so I'm trying to render it's planes, to see exatly the Frustum. But I'm using the Clip Coordinates to do the culling (like ...
6
votes
2
answers
4k
views
Skeletal animation with Assimp and glm
I'm trying to implement skeletal animation using assimp and glm. Everything seems to work, except for rotations.
This is the code I use when packing assimp data into my own engine's format. I THINK ...
1
vote
1
answer
5k
views
glm quaternion camera rotating on wrong axis
I'm trying to get my camera implemented with a glm::quat used to store the rotation.
However, whenever I do circles with the mouse, the camera rotates along the ...
6
votes
1
answer
14k
views
Combining rotation,scaling around a pivot with translation into a matrix
In short: I need to combine rotation (in the form of a quaternion), scaling around a pivot point along with translation into a transformation matrix.
The long:
I am trying to implement a proprietary ...
1
vote
2
answers
901
views
What ways are there for making vector types available in scripting?
I use Google V8 engine to embed Javascript into my game for scripting. As interface to my native code, I already registered some C++ functions to the scripting context.
In the native code, I make ...
0
votes
1
answer
1k
views
Trying to convert as3 Matrix to C++ glm matrix
I am trying to convert a library called DragonBones to C++ Opengl which allows you to use Flash based skeletal animation. I'm almost done but I am running into a problem. I am trying to transform the ...
1
vote
1
answer
277
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.
4
votes
1
answer
1k
views
Rotating and Translating a Node in Horde3D with Matrices and Quaternions
I have been trying to learn how to use the Horde3D rendering engine for the past couple of days,
and so far I have managed to learn a decent amount and integrate <...
4
votes
1
answer
2k
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 two ...
-1
votes
2
answers
4k
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 ...
8
votes
1
answer
16k
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 ...
1
vote
2
answers
3k
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 ...
1
vote
2
answers
2k
views
Matrix Rotation with three Angles
I want to rotate a form with three given angles fo each of the three axis. But the GLM rotation function takes only one angle and a vector as arguments.
How can I ...