Questions tagged [opengl]
OpenGL (Open Graphics Library) is a graphics standard and API which is platform independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering, and hence gives greatly improved performance over traditional software rendering. OpenGL is used for applications like CAD software and computer games. The OpenGL standard, as well as OpenGL ES, is controlled by the Khronos group.
opengl
38,103
questions
0
votes
0
answers
15
views
How to write a float hex literal in GLSL?
I'm trying to use lua gsub to modify a shader file for modding needs:
content = ModTextFileGetContent("data/shaders/post_final.frag")
ModTextFileSetContent("data/shaders/post_final.frag&...
-4
votes
0
answers
18
views
glGenBuffers() undeclared when using GLAD? [closed]
When trying to compile project that uses GLAD on Arch, I get the compilation error:
error: 'glGenBuffers' was not declared in this scope; did you mean 'glReadBuffer'?
5 | glGenBuffers(1, &...
-3
votes
0
answers
49
views
How do I create a window creation function for OpenGL? [closed]
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "OpenGL", NULL, NULL);
if (window == NULL) {
cout << "Failed to Create GLFW window" << endl;
...
-1
votes
0
answers
29
views
How to get glVertexAttribPointer to work with image and vertices?
I am attempting at displaying an image converted to a Python OpenGL texture on a screen (using pygame.image.tostring(image, 'RGBA')). However, an envelope is drawn instead, 75% of the screen being ...
-1
votes
0
answers
29
views
Enabling Game mode for own apps on Mac
I am currently making some rendering apps using OpenGL on Mac. The problem is that those games, even when I go to full screen mode, don't enable the game mode. Therefore my fps is pretty low.
Is there ...
0
votes
1
answer
45
views
Access violation inside glfwPollEvents()? [closed]
When I start my program:
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
struct ...
0
votes
0
answers
43
views
Rotate an object around a fixed point calculated from mouse click position
My model keeps jumping around my monitor screen after these steps:
Select a point.
Rotate.
Select another point.
I wonder if there is anything wrong with my transformations.
Here is how it looks:
...
-1
votes
0
answers
72
views
How do I avoid visual artifacts around text when taking a screenshot? [closed]
I'm working on a Qt application where the background is drawn using OpenGL, and the front is rendered by QPainter to a QImage that is then used as an OpenGL texture to be displayed at the top.
On ...
-2
votes
0
answers
15
views
pyassimp.errors.AssimpError: assimp library not found [closed]
(CGIP) ┏[vbk16] ┖[E:\6th Sem\CG\Mini_Project]> python .\Program.py Traceback (most recent call last): File "E:\6th Sem\CG\Mini_Project\Program.py", line 7, in <module> import ...
-3
votes
0
answers
61
views
+250
Alacritty - Can't see cursor after up launch on Ubuntu [closed]
Can't see a cursor when I launch alacritty via Linux making it unusable via a fresh install...
Am running a virtualized Ubuntu 24.04 Linux through UTM on my Apple M2 Macbook Pro.
Everything (...
-1
votes
2
answers
52
views
How to render text using FreeType and OpenGL
Currently I managed to render quads which look like their corresponding characters if I'm not multiplying by sampled, but whenever I do so then the quads turn fully transparent and disappear
Setup for ...
-3
votes
0
answers
49
views
Find Camera Location Using solvePnP [closed]
As part of a project I'm working on, I need to find a camera location using solvePnP.
The goal of this project is to find the position of the camera using solvePnP, and compare to the true camera ...
-2
votes
0
answers
64
views
Hard coding array working while passed array is not [duplicate]
float vertices[] = {
0.5f, 0.5f, 0.0f, // top right
0.5f, -0.5f, 0.0f, // bottom right
-0.5f, -0.5f, 0.0f, // bottom left
-0.5f, 0.5f, 0.0f // top left
};
...
-2
votes
0
answers
40
views
What is wrong with my mesh renderer in OpenTK? [closed]
Here is my Mesh class, where, as I've assumed, the indices are being stored incorrectly?
Due to that, the simple cube from blender is being renderer incorrectly:
Image of the cube
using Game.Engine....
1
vote
1
answer
37
views
Reading from `out` function argument in GLSL
In GLSL, is it legal for a function to read from an out argument, after it has already written to it?
For example
void f(out float x) {
x = ...
x = sqrt(x);
}
Or is it needed to write it as
...