Skip to main content

Questions tagged [glm-math]

GLM is a C++ math library designed to mimic the OpenGL Shading Language's math functions and types (vectors, matrices) as closely as possible.

1 vote
0 answers
26 views

Camera movement on opengl project: sideways movement rotates and skews image

im trying to make a simple triangle mesh and look at it with a camera. The mesh should be in the x/y plane with z = 0, while the camera should be at the same plane but z = 10. The project is in this ...
link mira's user avatar
0 votes
0 answers
23 views

How to know the existing pixel value of the framebuffer [duplicate]

I am trying to make a heatmap and in my Fragment shader i want to know the existing color value of the pixel on which the shader will write. Based on the red color value i want to decide whether to ...
Summit's user avatar
  • 2,210
-1 votes
1 answer
34 views

How to translate point light and rotate directional light OpenGL?

I intend to implement Gouraud shading with two light.(point light and directional light) I want to translate the point light and rotate the directional light with keyboard callback function of OpenGL. ...
kkk's user avatar
  • 1
0 votes
0 answers
71 views

glm::lookAt - image is visually flipped both x and y axis

To better understand OpenGL pipeline, I wrote simple two dimensional demo with a "camera". The program displays a quad in the left half of a screen with "camera" at the center. ...
user14063792468's user avatar
-1 votes
1 answer
35 views

OpenGL Rendering Issue with VAO in Mesh Class - GL_INVALID_ENUM Error [closed]

I am rendering a rectangle using a mesh class to encapsulate the vertex and index data, as well as handle rendering. However, I've encountered an issue where the mesh object does not render, and I'm ...
Luka's user avatar
  • 17
0 votes
0 answers
39 views

Error: no user-provided default constructor when multiplying matrices

I have some pretty basic code that I wouldn't think would cause problems: #include <glm/ext.hpp> ... mat4x4 m = mat4x4(1.0f); m = rotate(m, (float) glfwGetTime(), vec3(0.0f, 0.0f, 1.0f)); ...
Christopher Gallegos's user avatar
-1 votes
1 answer
33 views

draw cubes with index buffer in openGL

I want to draw a 3D cube: #include <stdio.h> #include <stdlib.h> #include <string> #include <iostream> #include <fstream> #include <vector> #include <algorithm&...
kkk's user avatar
  • 1
-1 votes
1 answer
42 views

Frustum Culling Not Utilizing Entire Bounding Sphere in OpenGL [closed]

My frustum culling is detecting an object as culled even though not the entire object's bounding sphere is out of the frustum yet. It's like it believes the bounding sphere's radius is smaller than it ...
Duck Duck's user avatar
  • 154
0 votes
0 answers
108 views

GLM warnings after vscode update

After a vs code update (2024-05 update) my build using cmake did not work anymore. Somewhere along the way a include path in my Cmakefiles.txt got lost and wouldn't work anymore. This also happened ...
b.m.'s user avatar
  • 19
0 votes
0 answers
29 views

Invalid RayCast algorithm output

I am writing my own physics engine in C++ using the glm library. But when I wrote a RayCast function that should detect the intersection of a ray with a triangle, I found that it gives wrong results. ...
Dimas's user avatar
  • 21
0 votes
0 answers
96 views

Strange behaviour of GJK collision detection algorithm

In 1 image there is no collision, but in 2 there is I have a bug with GJK algorithm. I am using glm library and I am facing a problem that when I increase the size of the model using matrix, GJK ...
Dimas's user avatar
  • 21
0 votes
0 answers
49 views

Can I get my texture coordinates as pixel coords in 2D Game?

I have an issue with my 2D Game in C++/OpenGL. I need to somehow get the pixel coordinates (preferably the glfw coords) of a texture that has been rendered on the screen. The final goal is to be able ...
notfynnaf's user avatar
1 vote
0 answers
206 views

Converting Cannojs 3D world vectors to model-view matrix

I use glmatrix 3.4.0 . With position i dont have any problem. Event glmatrix last version have some support for QUAT i cant make correct way of converting from QUAT to AxisAngle or rotate mat4 ... I ...
Nikola Lukic's user avatar
  • 4,197
1 vote
1 answer
70 views

How does OpenGL std430 layout align elements in an array?

I have a PointLight struct in C++ struct PointLight { glm::vec4 position; // 16 bytes glm::vec4 color; // 16 bytes float intensity; // 4 bytes rounded to 16 bytes? float range; // ...
Dave's user avatar
  • 23
1 vote
1 answer
154 views

What is the difference between glGenRenderbuffers and glCreateRenderbuffers?

SPEC: glCreateRenderbuffers: glCreateRenderbuffers — create renderbuffer objects void glCreateRenderbuffers(GLsizei n, GLuint *renderbuffers); n: Number of renderbuffer objects to create. ...
rufuss's user avatar
  • 60

15 30 50 per page
1
2 3 4 5
91