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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Assigning left and right movement to A and D keys

I am trying to write an OpenGL code that moves an object based on keyboard input. The W key and the S key work for zooming in and zooming out, but the A and D key are not doing what they should. Both ...
0 votes
1 answer
53 views

How to fill up the side of a cylinder using triangles

I am trying to create six sides for a cylinder using OpenGL and two triangles for each side. I am currently using wireframe mode, so I can see the triangles that are being used. I finished by code for ...
-3 votes
0 answers
18 views

Understanding the sphere intersection (GLSL-shader)

I'm trying to implement the GLSL-shader (from oneshader.net) in C#. Can't understand the loop for SphereIntersect method. vec3 ro = vec3(0.0, 0.0, -2.0); for (float x = 0.0; x <= 1.0; x += 1.) {...
  • 1
0 votes
0 answers
18 views

OpenGL Triangle pipe around line segment

I would like to ask how can I render in geometry shader a triangle pipe from a line segment? I first compute perpendicular vector "perp" to the line vector "axis". Then I rotate ...
-2 votes
0 answers
29 views

I am Getting A Blank Window And Nothing Else [duplicate]

I just threw away the EBO AND VBO classes I had earlier and made a common Buffer class. I am rendering a square with some texture. It was all okay and I was getting a fine textured square before I ...
1 vote
1 answer
46 views

How to make the base of a cylinder with shaders in OpenGL

I am trying make a cylinder with using vertices and indices in OpenGL. I am still trying to build the base of a cylinder using triangles and cosine and sine functions and render it. But for some ...
1 vote
1 answer
25 views

Something in shader is messing the rendering function

#include <GL\glew.h> #include <GLFW\glfw3.h> #include <iostream> // GLM library #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/...
-2 votes
0 answers
29 views

error C5145: must write to gl_Position when creating shader program in open gl [closed]

I'm making a game engine right now, and I'm at the point of creating my first graphical object, though I'm encountering an error: when I run my program, the process of creating a shader program in ...
1 vote
1 answer
32 views

OpenGL Creating texture coordinates on the fly with a vec4

I'm following this site to learn OpenGL. In core profile mode to render a quad along with texture coordinates, I'm defining data like this: float vertices[] = { // positions // texture ...
0 votes
0 answers
21 views

Efficent Highlighting of Geometry with OpenGL [duplicate]

Task: Given a large Mesh or a collection of objects rendered with glMultiDrawElementsIndirect I would like to highlight single vertices in the mesh or instances of the MultiDraw as efficent as ...
  • 83
1 vote
0 answers
28 views

Are EGL extensions promoted to core still exposed via EGL_EXTENSIONS?

Are EGL extensions that were promoted to core (like EXT_platform_base & EXT_client_extensions were in EGL 1.5) still exposed via the EGL_EXTENSIONS string? I wasn't seeing anything obvious either ...
  • 49.9k
0 votes
1 answer
41 views

LearnOpenGL - Textures | Not seeing awesomeface.png

So even though I tried to load awesomeface.png the same way I did with wall.jpg, it is not visible (as you can see from the image). Honestly I think I did something wrong in the part where I activate ...
  • 1
-1 votes
0 answers
39 views

Why does my cube have some weird edges in openGL?

I'm having some issues with my .obj parser. My cube looks weird and I have no idea how to fix it. Here is my code: std::ifstream file(FileName); std::string line; std::vector<float> vp; std::...
0 votes
0 answers
19 views

Pass textures to a sampler2D array in GLSL shader?

I want to pass multiple textures to the shader as an array, like this: layout(binding = 0) uniform sampler2D uTextures[8]; And how should I assign values ​​to the array above using glsl's binding ...
0 votes
0 answers
22 views

What is the main difference between QT 4.8.7 and QT 5.15.2 regarding to GLEW and OpenGL code?

I work under the big QT project like OpenGL developer, so, i'm not clearly understand the problems, just trying to investigate them. When project was worked under QT 4.8.7 version their legacy OpenGL ...

15 30 50 per page
1
2 3 4 5
2504