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

glad causes glfwSwapBuffers to return error message

Code #include #include #include int main() { glfwInit(); GLFWwindow* window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); while (!glfwWindowShouldClose(window)) { …
RoBoCoden
  • 11
  • 2
0
votes
0 answers

C++ compiler throws an C3861 "identifier not found" even after linking the corresponding include files

I'm trying to build both an opengl script and a qt GUI window at the same time for a small project of mine. Even after linking the glad, glfw header files and the glfw3.lib file to my compiler settings and importing glad.c to my project. Here is the…
ayy_chemixd
  • 113
  • 10
0
votes
1 answer

EXC_BAD_ACCESS (code=1, address=0x0) when calling "glClear(GL_COLOR_BUFFER_BIT);" in hello world program of glfw

I'm trying to install OpenGL in CLion on MacOS. My program compiles but when I run it I get this crashreport: Time Awake Since Boot: 6200 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue:…
Gian Laager
  • 474
  • 4
  • 14
0
votes
1 answer

OpenGL changing uniform changes previous draw

I have this sample code // EBO is just a rectangle // copypasted from learnopengl glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(shaderId); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,…
Masafi
  • 151
  • 2
  • 15
0
votes
0 answers

Why the graphic shown when the primitive is triangle but it disappeared when the primitive is quad?

I'm new to OpenGL.I want to render a simple rectangle, and the rectangle is shown when the primitive is GL_TRIANGLES, but when I use GL_QUADS, the rectangle is disappeared. I don't know why. Here are some of the core codes: // set vertices float…
luckintt
  • 63
  • 6
0
votes
0 answers

Program crashes when using Opengl functions (GLFW + GLAD)

I had started studying Opengl from tutorials and for that I used GLFW and GLAD. I created this code to draw a simple triangle: #include #include #include void error_callback(int error, const char*…
0
votes
0 answers

Function glGetString not found during explicit linking

As it seems to be a larger problem to understand my question: It is NOT about any source code or programming implementation, it is about linking an existing and working program! So let me try that again: I have an application which runs on both,…
Elmi
  • 5,899
  • 15
  • 72
  • 143
0
votes
0 answers

Problems with Shader in OpenGL in C

I´m trying to render a rectangle, using shaders. But when I start the programm, OpenGL renders the Rectangle but not in the right color. I´m watching a youtube tutorial about OpenGL which is in C++ but I want to code it in C, so the OpenGL commands…
0
votes
1 answer

Struct moves his memory address in OpenGL

main.c #define APIENTRY __stdcall #include #include #include #include "VertexBuffer.h" //GLuint bufferID; //GLuint vao; struct VertexBuffer buffer1; struct VertexBuffer *buffer1Ptr; void display(void) { …
0
votes
1 answer

How do I fix this compile issue that I'm having with GLFW under Ubuntu 19.04?

So I am trying to compile a basic application and when i try and compile it, it throws an error: $ g++ -g -Iinclude -ldl -lX11 -lstdc++ src/*.cpp src/*.c `pkg-config --cflags --libs glfw3 glib-2.0` /usr/bin/ld: warning: librt.so.1, needed by…
Slendi
  • 157
  • 1
  • 13
0
votes
1 answer

How come no cube is drawn on my screen with this code in a GLFW window?

I have a bunch of code (copied from various tutorials) that is supposed to draw a random color-changing cube that the camera shifts around every second or so (with a variable, not using timers yet). It worked in the past before I moved my code into…
Zach K
  • 264
  • 3
  • 10
0
votes
0 answers

glad.o using -fPIC is missing symbols

For a GUI project, we have a makefile which builds a library (.a) from all the .o files, which is then linked for each test. When doing so, any function not used is thus not included in the executable. In order not to have to rebuild every test…
Dov
  • 8,000
  • 8
  • 46
  • 75
0
votes
0 answers

Fail to render in SFML after rendering to an opengl framebuffer

My goal is to create noise, render with a shader on a framebuffer, and pull the data on the CPU. I don't need to do further rendering with opengl in the loop, I only need it once, at the beginning. I load glad after initializing my SFML window, and…
jokoon
  • 6,207
  • 11
  • 48
  • 85
0
votes
0 answers

Xcode can't find header files in xcode10.3

I'm following a tutorial to learn opengl on Xcode 10.3. But I always get <'glad/glad.h' file not found> issue. I can't find where have problem. (1) I use cmake to install glfw and use glad web generator to generate glad.zip. I put glfw headers in…
0
votes
1 answer

How to enable SLI in OpenGL?

I am running openGL 4.6 with glad and GLFW with the latest nvidia driver. Sli is enabled in nvidia control panel and I'm running on a x299 platform with dual 1080ti's in SLI. Currently only GPU1 is running at 100%, while GPU2 is at 0%. I have tried…
Xardas105
  • 85
  • 13
1 2 3
8
9