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

GLSL - list of changed pixels when drawing a line on a texture

How can I use GLSL (along with OpenGL 4.3+) to figure out which pixels in an image will change color when I draw a line over it? Explanation. I have an image (texture) of size 600x500 for example. I ...
Roman Zuev's user avatar
-1 votes
0 answers
22 views

GLSL ShadowMap Depth Clamping or Over Sampling Issue [closed]

I'd like to remove or fix the shadow that is outside the shader texture. From what I have read, it seems to be called depth clamping or oversampling. Here is my working shadowmapping fragment shader ...
LazerBlazer's user avatar
-2 votes
0 answers
43 views

Strange behaviour after throwing an exception [closed]

I am writing some openGL code in c++. As I try to render big models I have to catch an exception at one point: try { glDrawElements(GL_TRIANGLES,3*count,GL_UNSIGNED_INT,&(_glTRIANGLES[...
Romanoir's user avatar
0 votes
1 answer
41 views

Does a reversed depth buffer in OpenGL require vertex shader changes?

I've read many articles about what is and how to set a reversed depth buffer in OpenGL (just search for opengl reversed depth on Google and I've read 6 positions). None of them mentioned any vertex ...
Shout's user avatar
  • 628
-1 votes
0 answers
56 views

OpenGL texture not showing correctly [closed]

I am using tinyobjloader to load 3D .obj file into OpenGL application with textures loaded with stb_image library. My problem is that the texture is looking quite not like I provided in .jpg file, and ...
Marcin Bator's user avatar
0 votes
0 answers
24 views

Why the triangle is not displayed using glm 0.9.9.8, but it works using glm 0.9.8.5? [duplicate]

I am learning opengl and the following code is displaying a blank screen when using glm 0.9.9.8, but it works correctly using 0.9.8.5. The expected behavior is to display a triangle moving left to ...
Mike's user avatar
  • 29
-1 votes
0 answers
23 views

get texutre BaseColor from assimp GLTF/GLB [closed]

im tring to parse a .glb file with a assimp but i cant figure it out how to get the texture data of BaseColor.
Alberto Zanovello's user avatar
-1 votes
0 answers
12 views

PyOpenGL nullfunction error using linux in virtual environment [duplicate]

EDIT: The answers to the question this has been marked a duplicate of are for windows, not linux, and do not work in my case. I am trying to get the PyOpenGL and PyOpenGL_accelerate modules working ...
JD Allen's user avatar
-1 votes
1 answer
69 views

Obtain real OpenGL texture format [closed]

In my application I need to update a texture every frame and to do this very fast I am using CUDA, also because my initial data are 24bit BGR. I created a texture this way: glTexImage2D(GL_TEXTURE_2D, ...
Perry's user avatar
  • 1,111
-4 votes
0 answers
36 views

Artifacts when using temporal reprojection [closed]

When I move the camera, there are incomprehensible artifacts, in them you can separately see triangles, incomprehensible lines and squares. The temporal reprojection itself works correctly. Here's ...
Kondra 's user avatar
-3 votes
0 answers
68 views

Transforming minecraft like Chunks into a Planetary Surface [closed]

I'm in the process of developing a voxel engine in C++ using OpenGL, aiming to render a blocky planet reminiscent of Minecraft. Currently, I'm grappling with the challenge of transforming a plateau of ...
Raukie's user avatar
  • 6
-4 votes
0 answers
48 views

To rotate with respect to the desired axis in opengl [closed]

In OpenGL, create the x and y axes of the cross in the middle of the screen and click on the screen to create a dot, and I want to rotate the dot based on the axis I made in the middle of the screen, ...
KSY's user avatar
  • 1
-2 votes
0 answers
24 views

OpenGL.error.GLError: GLError {err = 1282 baseoperation=glnamedframebuffertexture} [closed]

class Framebuffer(object): def __init__(self, attachements): self.__id = np.empty(1, dtype=np.uint32) glCreateFramebuffers(len(self.__id), self.__id) for k in list(...
Tomato's user avatar
  • 1
-2 votes
0 answers
59 views

Rendering Text using msdfgl returns in a flipped image when bottom left or center of the window is the origin

I recently learned about msdfgl and found out that it renders text way faster and more better than I learned about text rendering on Learn OpenGl. I used glfw and tested it and it worked as it should ...
Shreeyash Shrestha's user avatar
-1 votes
0 answers
41 views

how to make a spotlight in old opengl

I am trying to make a spot light in a quad but what happens is that the light spread all over the quad, although i am specifying light position to be a directtional light this what i am getting this ...
Nour Ashraf's user avatar
-2 votes
0 answers
24 views

Xcode upgrade has broken OpenGL cmake build [closed]

As in the title, upgrading from 'MacOSX13.3.sdk' to 'MacOSX14.0.sdk' has broken cmake's ability to find OpenGL (and possibly other framework libraries but that's the first one it's stuck on) On ...
Luther's user avatar
  • 1,794
-1 votes
1 answer
31 views

GLSL Tesselation Shader drawing triangles in different orientations for each patch

I'm building a simple terrain on OpenGL using Tesselation Shaders and patches, but I'm having trouble with how OpenGL draws these patches. The triangles generated by OpenGL are being drawn in a ...
Juliano de Mello Pasa's user avatar
0 votes
1 answer
44 views

Not able to get precise float values from fragment shader output [closed]

I am using OpenGL on desktop (using PyOpenGL) for some image processing operation and doing some floating point operations per pixel in fragment shader.After that when I read the pixels using ...
bsguru's user avatar
  • 462
-1 votes
0 answers
37 views

Drawing a textured circle on OpenGL [closed]

I am trying to draw a circle on OpenGL. This is a part of the cylinder formula. I updated the formula to add texture to the shape, but when I did a triangle appeared at the origin that seemed to ...
Jose's user avatar
  • 1
0 votes
1 answer
60 views

Calculating distance from a camera to a plane of a cube in opengl

I am trying to get transparency blending to work properly on my cube and I have hit a bit of a roadblock. I have gotten blending to work on multiple cubes by simply drawing them in the correct order ...
Grusen's user avatar
  • 43
1 vote
1 answer
40 views

JOGL Passing Integer Value to Fragment Shader

In my OpenGL application I am trying to pass an integer to the vertex shader and then forward it to the fragment shader to use as a zIndex in a texture array. However when I pass the value using a VBO ...
andromda's user avatar
-1 votes
0 answers
47 views

OpenGL: Texture Loading

I'm creating a 3D pyramid and loading it with a brick wall texture. I had the pyramid working originally, but when I attempted to add the texture it fails to load and I'm left with a black window: #...
Nicholas Phelps's user avatar
-4 votes
0 answers
21 views

libfreeglut.a & libfreeglut_static.a Error: no such file or directory [closed]

I just tried to setup freeglut on my codeblocks 20.03 64-bit pre-packaged mingw-gnu-compiler, I created the glut project in codeblocks and tried to compile, it gives error: Error I went to directory ...
salah mohammed's user avatar
0 votes
1 answer
41 views

OpenGL causing issues when opening window

My code is not opening the window properly its just showing me blank page #include <iostream> #define GLEW_STATIC #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm....
yassir alrawi's user avatar
-1 votes
0 answers
37 views

Retrieve large arrays from Shader Storage Buffer Object OpenGL compute shader

I am having trouble with the stack memory overflowing when i try to create large arrays to retrieve data from my buffers. I have the warning "Function uses '5062744' bytes of stack. Consider ...
Eekk2k2's user avatar
  • 44
0 votes
0 answers
30 views

Interpolating between 3 textures in GLSL using height

I'm working on some simple terrain texturing, and I am quite confused on how you go about interpolating between 3 different textures for a terrain, where you'd interpolate based on the height value of ...
Nexi's user avatar
  • 9
0 votes
0 answers
17 views

Problem with getting array of vec3 from SSBO in OpenGL 4.3 Compute Shaders [duplicate]

I was making a terrain-mesh-generating compute shader which would have a buffer like this: // Buffer for the final mesh data layout (std430, binding = 0) buffer Data_OUT { dvec3 data[]; }; which ...
Eekk2k2's user avatar
  • 44
2 votes
1 answer
66 views

Why my attribute values are implicitly cast to float in OpenGL?

I am currently meet with a strange behavior. Details: In vertex shader, I declare the attribute at location 1 to be uint: layout (location = 1) in uint VS_In_ID I declare it as GL_UNSIGNED_INT in C, ...
Nekomiya Kasane's user avatar
-1 votes
0 answers
31 views

Why is gl_FragCoord suddenly scaled by 2?

I'm using OpenGL to render a scene to a framebuffer using a deferred renderer. I render my geometry, then do ambient, sunlight, and finally point lights. To render point lights i transform a sphere to ...
foddex's user avatar
  • 529
-3 votes
0 answers
35 views

Integrating Bullet Physics after Learning OpenGL [closed]

Introduction This is more of a soft question, but so far I've learned how to operate opengl by following the set of tutorials at https://learnopengl.com/ I have a few questions and concepts I want to ...
cuppajoeman's user avatar
-2 votes
0 answers
34 views

How to Load TensorFlow-Generated Depth Map Into Cross-Platform Scene: iOS and Android? [closed]

I've acquired a depth map from an image using TensorFlow and intend to develop applications for both iOS and Android. While I'm still exploring Android solutions, I'm curious if there's a preferable ...
Guoba's user avatar
  • 37
0 votes
1 answer
38 views

How to set to specific scale in OpenGL?

I am using C++ and OpenGL. But I need the object to scale to a certain scale. For a game engine. My goal is just for the scale to be SET not CHANGED. #define GLFW_INCLUDE_NONE #include <glm/glm.hpp&...
kai's user avatar
  • 29
-4 votes
1 answer
50 views

Calculating roll in an OpenGL camera class

I am trying to add a roll to an OpenGL camera, but when I add a roll using a previous Stackoverflow question the camera rolls, but, the roll affects the yaw and pitch direction. When should I apply ...
Swatcat's user avatar
  • 117
0 votes
1 answer
23 views

OpenGL texture is fainter than it should be, kind of mutliplied by top right pixel

I had an idea for optimizing my program, by converting the screen to a texture, and updating the texture when the computer is done calculating, assuring a smooth zoom. I implemented the texture part, ...
iogamesplayer's user avatar
-1 votes
0 answers
49 views

How can I overlay a Pygame UI like a Rect() on an OpenGL window? [duplicate]

I am having an issue where Pygame's draw functions seem to not work when updating my OpenGL 3D graphics. Pygame sets up the window and enables OpenGL context using this line: self.screen = pg.display....
EricPlayz YT's user avatar
-1 votes
0 answers
24 views

after using glm::scale to an object matrix, the object moves(using glm::translate) faster than the object which wasnt scaled

Im making a game using openGL for graphics and glm for math. I have to adjust a bounding box to the size of a model it belongs to. I decided to use glm::scale, but after scaling the bounding box, it ...
Trenbolone Acetat's user avatar
0 votes
0 answers
49 views

OpenGL crash when compiled in gcc

I've been trying to build an OpenGL program without using any libraries, but OpenGL functions would always eventually crash my program. When I put opengl functions before the main loop, they work fine,...
DragonH's user avatar
0 votes
0 answers
18 views

OpenGL Placing billboards at height of a terrain

I'm working on some simple terrain generation in OpenGL and I have it so I render the terrain first and then I render billboards. The billboards are created by generating random points in my world ...
Nexi's user avatar
  • 9
0 votes
0 answers
30 views

GLSL: Separate sources and standalone validation

I want to be able to do these things: Write GLSL shaders Separate my sources for reusability purposes Validate all my sources before building the main application, and exit if anything fails The ...
Devsman's user avatar
  • 456
-1 votes
0 answers
48 views

The problem of not being able to set the thickness of more than one line from the shader program in OpenGL

I am just learning opengl 2.0. I want to draw many lines with different lengths, colors and thicknesses. Instead of calling the draw function for each line one by one, I thought it would be more ...
user17328284's user avatar
-1 votes
0 answers
27 views

GLSL Phong lightning model Blue light color trouble

I have fragment shader that sums up all lights of different types (0 -- point, 1 -- directional, 2 -- spotlight) in scene. Trouble occurs when I have blue color ( 0, 0, 1, 0) #version 450 in vec4 ...
wybot's user avatar
  • 343
1 vote
1 answer
47 views

16-bit texture through PyOpenGL

I am trying to create a 16-bit texture in PyOpenGL using below statement. img_data = cv2.imread("Texture.png",cv2.IMREAD_UNCHANGED) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16UI, width, height, ...
bsguru's user avatar
  • 462
0 votes
0 answers
34 views

Why use MakeCurrent() with NULL parameters?

I already know that xxxMakeCurrent(...), -let me call it "MC-par"- must be used before any gl command. My question is about xxxMakeCurrent(null parameters), let me call it "MC-null"...
Ripi2's user avatar
  • 7,079
-2 votes
0 answers
34 views

OpenGL | Unwanted jiggle of a model after moving the camera

I'm making a school project in OpenGl and I can't figure out what's causing this issue. When I move my camera with my mouse the top sphere in my project seems to jiggle, or it has like a delay to the ...
KrystofJan's user avatar
0 votes
0 answers
34 views

Invalid float value error in GLSL compilation for a particular float value

I am doing OpenGL developement on PC (OpenGL version 4.6). While compiling fragment shader I get an error for a particular float value , but not for other float values. float test = 0....
bsguru's user avatar
  • 462
0 votes
1 answer
42 views

Can I get the viewing angle of a pointcloud using SceneWidget in Open3D? [closed]

I would like to get the camera viewing angle of a pointcloud which is displayed using SceneWidget() whose scene is set like this: self.window = gui.Application.instance.create_window("Open3D"...
ajktym94's user avatar
-1 votes
1 answer
65 views

Why my C# syntax doesnt register in vscode? [closed]

so i when i use vs code for c# the syntax wont work example: ' using System; ' it wont do anything if tried to run it it wont work, i alredy tried to reinstall vs code and still not working, the ...
Rass's user avatar
  • 1
0 votes
0 answers
36 views

OpenGL draws a black triangle instead of coloured vertices

I try to implement a trivial graphical engine for my app based on OpenGL (glutin + glow). Below is my draw_object() function: fn draw_object(&mut self, object: &Object) { unsafe { ...
Denis Steinman's user avatar
1 vote
1 answer
38 views

GLAD #defines hidden behind #ifndef GL_VERSION_X_X, using Visual Studio 2022

I have started learning engine development and have decided to use GLAD and SDL2 for my project. I have followed various tutorials and have successfully linked both SDL2 and GLAD to my project. But I ...
Grusen's user avatar
  • 43
-1 votes
0 answers
38 views

OpenGL/C++ cube with cylinder inside only renders first half of cylinder's circular base

I'm stumped as to why this doesn't render the whole solid. This is my cylinderClass.cpp: #include "cylinderClass.h" #include <glad/glad.h> #include <vector> #include <glm/...
JS2023's user avatar
  • 1

1
2 3 4 5
761