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
0
votes
1 answer

The glad header can't be located when compiling

I'm attempting to create a window in GLFW and everything was working as expected until after I reset my PC (the reason for the reset is unrelated to this problem). I had my project stored on a separate drive so it was unmodified and I re-installed…
befd
  • 13
  • 2
0
votes
2 answers

glReadPixels() read wrong value

currently, I am trying to read back the data I transfer to texture in OpenGL. However, I do not receive the correct result. Where do I wrong? #include #include #include const int SCR_WIDTH = 600; const int…
Minh Le
  • 1
  • 1
0
votes
1 answer

Segmentation Fault on OpenGL application with GLAD and GLFW3 (openGL 4.1/pureC/MacOS)

I'm trying to learn OpenGL and C by following the learnopengl.com tutorial and the JDAH series of videos about OpenGL in C. I especially got really inspired by this project of him : minecraft in one week. I had a perfectly working code up until the…
Artcann
  • 15
  • 1
  • 4
0
votes
0 answers

OpenGL with SRgb color space no longer works in Qt6.4+

I have an OpenGL application with a QWidget-based (no QtQuick/QML) Qt UI that I ported from Qt5 to Qt6. Most of it works fine, except that with Qt 6.4 and the Qt 6.5 beta (Qt up to 6.3 works fine!), the QSurfaceFormat color space setting no longer…
Joe
  • 6,497
  • 4
  • 29
  • 55
0
votes
0 answers

glGetAttribLocation() returns -1 on the position attribute of the vertex shader

I'm making an OpenGL program. However, whenever I run it, the "vertexIn" attribute of the shader returns negative when getting its location. I've searched several stack overflow posts as well as docs and other websites. Still, I could not find any…
Alex Gama
  • 1
  • 4
0
votes
1 answer

Why is linking to opengl32.dll required?

In order to use modern OpenGL functions above legacy version 1.1, a loading library is required (unless you manually load the function pointers from the GPU drivers yourself of course). If opengl32.dll only contains a software legacy OpenGL 1.1…
Bitmapper
  • 17
  • 1
  • 3
0
votes
1 answer

OpenGL GLFW + GLAD Program cannot draw triangle

I'm trying to draw a triangle with GLFW and Glad. But it doesn't display anything on screen. I'm able to open window and make the screen to any Color but cannot draw triangle. It show like this enter image description here I'm doing this program in…
prasad
  • 3
  • 1
0
votes
0 answers

Why is OpenGL telling me that terminate called after throwing an instance of 'int' after running it?

So I tried to make an OpenGL project with GLFW and glad in visual studio code, but it would throw and error when I would compile and run the program. I tried to make 3 triangles in a window, it worked so I tried organizing the VBO, VAO, EBO,…
0
votes
1 answer

Why is there a blank white screen rendering?

I am trying implement GLAD-GLFW-IMGUI version of renderer. I am just trying to display two Imgui windows with docking system. I am using docking branch of Imgui, GLAD(core) and glfw. Below is my code for it. I am getting a blank white…
Avi Garg
  • 11
  • 3
0
votes
1 answer

How to use cmake and vcpkg to import GLAD/GLFW3/ImGUI libraries on MacOS?

My goal is to write a simple, portable application using ImGUI. I also want a platform-agnostic build experience using cmake, and vcpkg to install dependencies. I got the program built and running on my Windows machine, but it's failing on my…
pom_jam
  • 115
  • 6
0
votes
1 answer

How to include Libraries without an IDE

I just downloaded the MingW Compiler and the glfw and glad libraries. i set up Notepad++ to compile with mingW and now i cant figure out how to include the above mentiond libraries. do i have to put the .h files in my folder with my main.cpp file or…
noname
  • 3
  • 1
0
votes
0 answers

Error while including glad with glfw in c++

Can anyone please tell me what wrong in this picture because for some reasons it did not work at all image I tried GLFW_INCLUDE_NONE already and yes, I tried everything I found in the internet already but the error still there
0
votes
0 answers

Why do i have to call gladLoadGL() after glfwMakeContextCurrent()?

Hello it took me two days to figure out why my window always closed instand. It was because i called gladLoadGL(glfwGetProcAddress) before glfwMakeContextCurrent(window). This does NOT work: int main() { glfwInit(); …
CloudBeta
  • 1
  • 2
0
votes
1 answer

how to implement 3D model rendering By different indexes?

I have a problem with rendering 3D models in OpenGL - The problem is that I can't implement rendering by single index buffers (I mean rendering: vertex by vertex indices, normals by normal indices, texcoord by texcoord indices) Because of this, at…
0
votes
0 answers

.NET & C++ DLL - OpenGL won't render a triangle

I've been trying to make a simple game engine from scratch using OpenGL 3.3 (GLFW 3.3.8 and glad) alongside with .NET and C++ just for fun. However, when I try to render a simple triangle with a background, it won't. It only shows the background…
1 2 3
8 9