Questions tagged [glad]

GLAD is an open-source C/C++/D OpenGL function/extension loading library for C/C++/D generated by Python script from the Khronos API specification XML documents.

Resources:

131 questions
1
vote
0 answers

How can I use less ram? Texture and model loading

So I am following the opengl tutorial at https://learnopengl.com/Model-Loading/Model and when I run the application it is using a little more than half a gigabyte for textures and models! But when I check the size on disk of all the textures and the…
JohnJameson
  • 81
  • 1
  • 12
1
vote
1 answer

How does static linking opengl with glad work?

i use visual studio, and in all the tutorials on setting it up I have seen, they say to put opengl32.lib in the linker's additional dependencies. But where is opengl32.lib located? opengl32.dll is in my system32 folder, but I have not found…
desp_cl
  • 11
  • 2
1
vote
1 answer

Segmentation Fault GLFW3/GLAD

I have a really weird segmentation fault when trying to create a window using GLFW3. Linux kernel: 5.4.0-113-generic NVIDIA drivers: 510.73.05 OpenGL (from glxinfo): OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6 GLAD: C/C++…
Ty Q.
  • 207
  • 2
  • 13
1
vote
1 answer

Understanding the Datatypes in OpenGL

The way OpenGL Datatypes are used there confuses me a bit. There is for example the unsigned integer "GLuint" and is is used for shader-objects as well as various different buffers-objects. What is this GLuint and what are these datatypes about?
Pinguin
  • 11
  • 2
1
vote
1 answer

openGL handle VAO, VBO, and EBO creation inside another class

I created a simple program that draw a square to the screen. int main() { glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE,…
yardenK
  • 183
  • 1
  • 3
  • 14
1
vote
0 answers

Unknown reason for segfault in simple program to draw a triangle

I would like to draw a triangle with a C++ program. I compiled the program with g++, with the '-Wall' flags and it compiles with no warnings. However, I get a segmentation fault coming from the function glGenBuffers(1, &m_VertexBuffer);. I have…
Jia Geng
  • 11
  • 3
1
vote
1 answer

Xcode: "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" in GLFW / GLAD default C application

I am a newbie in GLFW and I tried to make the most basic application with GLFW and OpenGL in C. I took the example code from GLFW documentation: https://www.glfw.org/documentation.html. It worked. However when I include GLAD at the top of my program…
1
vote
1 answer

GLSL operands to arithmetic operators must be numeric

I have some old GLSL code that compiled fine previously, but after switching to Linux's gcc compiler it's suddenly throwing errors. From the fragement shader: #version 330 core out vec4 FragColor; in vec2 TexCoord; in vec3 Normal; in vec3…
agent25
  • 47
  • 9
1
vote
1 answer

Can't use glGenBuffers in .h file C++

I'm trying to learn OpenGL in C++. To clean up my code I was trying to create an header file with all variables, which decribe objects, in it. This header looks something like this: #pragma once #include #include #include…
Luke__
  • 227
  • 1
  • 9
1
vote
2 answers

Unable to compile OpenGL program in Ubuntu, due to GLAD errors

I installed GLWF succesfully. I can prove that since this program compiles: #include int main(void) { GLFWwindow* window; /* Initialize the library */ if (!glfwInit()) return -1; /* Create a windowed mode…
user1584421
  • 3,499
  • 11
  • 46
  • 86
1
vote
1 answer

glad.c unable to find glad/glad.h, but main.cpp can

I've been trying to set up a build environment for OpenGL using glfw3 and GLAD. I'm currently using WSL2 Ubuntu with an X Server for compilation and a makefile. However, when I run my make I receive the following error: src/glad.c:25:10: fatal…
1
vote
0 answers

Makefile for OpenGL with glfw3 and glad

I'm trying to make a cross-platform compilation to build a project on Linux, which will be used on windows. But I'm stuck with these linking errors: /usr/bin/ld: bin/Release-linux-x86_64/glad/libglad.a(glad.o):glad.c:(.text+0x2aa6): undefined…
Omegaelit
  • 23
  • 4
1
vote
1 answer

Can't Get Spinning Cube To Render In OpenGL

I'm trying to get a spinning 3D cube but I can't get it to render. There's no error, but it's just a black screen. Also, there's no checking whether the Fragment shader is working but I can assure you it is I just don't have it included here. Here's…
Nikhil Nayak
  • 91
  • 1
  • 5
1
vote
1 answer

Direct State Access (DSA) is Failing, but pre 4.3 OpenGL works

I currently have an OpenGL project in which I am using GLFW for the window and context creation, and GLAD for loading OpenGL functions. The GLAD version I am using is OpenGL 4.6, compatibility profile, with all extensions (including…
nick2225
  • 527
  • 5
  • 17
1
vote
2 answers

#include not finding files while the Visual Studio autocomplete suggestions can find the files

I am trying to include Glad (generated from here with the GL3.3 api (having similar include problem with GLFW as well)) as such #include I feel like this should work since I have my additional include directories for the file in the…
Michael
  • 11
  • 7
1 2
3
8 9