Skip to main content

Questions tagged [opengl]

OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for applications like CAD software and computer games. It is also cross-platform. The OpenGL standard is controlled by the Khronos group, which also controls OpenGL ES.

Filter by
Sorted by
Tagged with
2 votes
1 answer
122 views

Is there an equivalent to GL_TEXTURE_WRAP_R on GL ES 2.0?

I've been trying to write code that can run on multiple GL versions, since I mostly only use very basic features, and one of the versions I am targeting is GL ES 2. Since I know you're supposed to ...
Hypatia of Sva's user avatar
0 votes
0 answers
151 views

C++ Assimp Library Animations

I want to use Assimp skeletal animation in a GLUT program using the least possible libraries. I want to do the interpolation of the animation myself. How do I render a frame of the animation by doing ...
Opengraphicspros12's user avatar
0 votes
0 answers
32 views

AABB algorithm in C++ no vec3 [duplicate]

Hi im trying to select voxels in a voxel world that are at the center of the cameras view. The players camera X,Y,Z position and its rotations are known. The camera works in this program. I tried ...
Opengraphicspros12's user avatar
1 vote
1 answer
179 views

Are VAOs in OpenGL just a trick to make fewer bind calls?

From everything I've researched, Vertex Array Objects (VAOs) are essentially just a trick, based on the fact that OpenGL keeps some kind of internal stack, so that when you bind the VAO, which ...
user29889977's user avatar
0 votes
0 answers
113 views

What is the best way to draw chunks?

I'm developing a voxel engine with OpenGL and C++ and searching how Minecraft-like games set up VAO, VBO, and EBO. I'm also dealing with transparency geometry and depth testing issue. There are 3 ...
crunch toast's user avatar
0 votes
0 answers
36 views

Help utilising obj indices [duplicate]

I'm working on an obj parser its mostly complete but ive run into a problem. I can access all the indices that are in the file but i cant figure out how to use all of them. i can use the vertex ...
whateverthisis's user avatar
0 votes
1 answer
146 views

How to efficiently construct model matrices in a vertex shader from a small amount of data, for instanced rendering of many moving 3d game characters

I am trying to efficiently render many 3d game characters: many instances of the same 3d model which can change their positions and z rotations each frame. For reference I'm using OpenGL but this ...
greenlagoon's user avatar
1 vote
0 answers
100 views

Page curl effect

I am trying to simulate a page curl effect in my custom OpenGL based rendering engine. I initially implemented the version described in the paper "Turning pages of 3D electronic books" where ...
Chaos's user avatar
  • 153
0 votes
1 answer
81 views

Tesselation and Geometry shader do not render anything

I am experiencing an extremely odd situation with the introduction of the tesselation control and evaluation shaders in my OpenGL rendering pipeline. I defined an instanced indexed mesh whose ...
Chaos's user avatar
  • 153
0 votes
0 answers
157 views

My fragment shader is being run on every pixel of the screen

This is my first time using this website and I'm a beginner too, so sorry if what I'm asking doesn't make sense. I am using C++ and OpenGL to make a basic platformer. My issue is that the fragment ...
Zuper Potato's user avatar
0 votes
2 answers
307 views

How can I efficiently render lots of moving objects in a game?

I'm using OpenGL but this question should apply generally to rendering. I understand that for efficient rendering in games, you want to minimize communication between the CPU and GPU. This means pre-...
greenlagoon's user avatar
0 votes
1 answer
130 views

OpenGL doesn't render even though all Objects and Data seems to be correctly set up

No shape seems to show up on screen even though I have meticulously verified everything. The data set I use which is parsed by my code CORRECTLY(I checked that) to be loaded into a generic array ...
Syntax Error12's user avatar
1 vote
1 answer
170 views

How the intersection of BVH boxes can determine whether or not a triangle appears?

I'm programming a Ray Tracer using Rust and OpenGL, I've already made Ray Tracing work in the basics by converting the data to an SSBO and sending it to the Shader in a basic way... The problem is ...
Arthur Sally's user avatar
0 votes
1 answer
1k views

Cross product in any number of spatial dimensions?

I am fitting an ellipse to determine a Kepler orbit for 3 sequential input points along the orbit's path. Let's say that I'm using this for a space simulator. One important thing to note is that the ...
shawn_halayka's user avatar
0 votes
1 answer
176 views

Broken animation in OpenGL using ASSIMP

Working on a small project, currently trying to implement animation. Like most beginners I am simply following tutorials, this one being the LearnOpenGL Skeletal. All code for Bone/Animation/Animator ...
Robert Baillie's user avatar
2 votes
1 answer
260 views

When should binding and unbinding happen in opengl?

I am learning through opengl playlists of the cherno. In the tutorial, He unbound everything including the VAO, VBO, IBO, but he only rebound VAO and IBO. Should unbind buffers? In this post, the ...
Phước Thắng Đinh's user avatar
0 votes
1 answer
91 views

Having trouble setting opengl version to 3.3

I'm trying to understand how different versions of opengl work. I am developing a game aimed to support opengl3.3 here are the specifications of my system: OS: Manjaro linux Renderer: Mesa Intel(R) ...
cuppajoeman's user avatar
0 votes
0 answers
57 views

OpenTK (C# OpenGL) Coordinate mistake

I am trying to make a 2D renderer using OpenTK and I am having trouble with the coordinate system. I have followed an opengl sprite tutorial and the Size vector is ...
flowxrc's user avatar
0 votes
1 answer
119 views

Do I need vertex array object in this case?

In the case of having the vertex attributes (i.e. position, color, etc) hardcoded in the shaders, why do I need to explicitly create a vertex array object (VAO)? If I remove the VAO, nothing is drawn. ...
CroCo's user avatar
  • 255
1 vote
0 answers
71 views

Weird artifacts on heightmap

so i have this compute shader in glsl that creates a heightmap: ...
Barzoius Mecca's user avatar
0 votes
0 answers
215 views

Struggling with stuttering in my 2D C++/OpenGL game

I'm building a 2D game from scratch using C++ and OpenGL, but I've run into a frustrating issue: a simple sprite moving from left to right occasionally stutters. Tracking down the cause has been ...
Liddelfranks's user avatar
1 vote
0 answers
81 views

How to access methods of a character class from outside the application after compiling it into an EXE?

I’m working on a closed-source C++ application: an OpenGL-based simulation game with aircraft (friendly and enemy). I want to integrate autonomous behaviors such as Hierarchical Task Networks (HTN) to ...
Charlie's user avatar
  • 11
0 votes
0 answers
19 views

How to snap an object to a grid? [duplicate]

I am trying to emulate something like Factorio's train system and a core component involves placing rails. One of the game's mechanics has objects snapping to a grid. Another example would be Fortnite ...
user187415's user avatar
1 vote
1 answer
138 views

Icosahedron missing triangles

I'm trying to create an icosahedron (I've been trying to figure this out for about a week). Basically, I followed this article to create an Icosahedron mesh in code, and the positions of the vertices ...
Jax's user avatar
  • 474
0 votes
0 answers
68 views

OpenGL vertex normalization issue on MAC OS;

I am trying to learn OpenGL and this is my attempt to create a hello triangle program but no matter what the vertices are not normalized I when I have the set to 1,0,0 or something the vertex is not ...
Divyansh undley's user avatar
0 votes
1 answer
171 views

Ugly output with openGL

I just started to study openGL and I wrote this "Hello World" program to draw a triangle. ...
matteogost's user avatar
0 votes
0 answers
87 views

Make textures look blocky, without antialiasing

I'm interested in how to fix my OpenGL source code so that there is a blocky appearance to the textures - without antialiasing and multisampling, as it was in MS-DOS games. For example, I want the ...
black4joss's user avatar
0 votes
1 answer
86 views

What's wrong with the TBN map?

I'm trying to import 3D models into OpenGL using Rust and GLFT models, the problem is that this function used to work... Now it doesn't work at all! It's working to load the 3D model, with the texture ...
Arthur Sally's user avatar
1 vote
0 answers
77 views

glBufferData on GL_DRAW_INDIRECT_BUFFER causes rendering isues

I've been writing a renderer in C++ using OpenGL. Recently I wanted to implement indirect batch rendering using glMultiDrawElementsIndirect. When I try to test this ...
LaElijah's user avatar
0 votes
1 answer
102 views

How to make a texture glide in the terrain slope direction

I would like to make a water texture glide on the terrain (heightmap), in the direction of the slope of the terrain, to make a flowing water effect. In the fragment shader used to draw the terrain, I ...
HenriV's user avatar
  • 67
0 votes
0 answers
48 views

Shadow Artifacts on Plane Below a Sphere

I am having this minor issue implementing shadow mapping. The plane below the sphere has these strange artifacts. I can fix it by offsetting the position slightly but I'd rather have it work ...
Jambo's user avatar
  • 1
1 vote
2 answers
114 views

Initial FBO creation and render in SDL app failing ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

My voxel renderer app fails to create a framebuffer object only during launch / initial window resize event. It is an ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT ...
zachaz35's user avatar
0 votes
0 answers
101 views

Convert R8 texture to R32F

I have a single channel 2D image (for instance, R8). I would like to use this data as a texture. However, the texture internal format should be R32F since I need accurate linear sampling in my shader. ...
0x2207's user avatar
  • 101
2 votes
1 answer
445 views

What is the concept of a "camera" in game development?

What is the concept of a "camera" in game development? It seems that OpenGL and Vulkan don't explicitly have a concept of a camera. However, engines like Unity, Unreal Engine, Godot, Flutter ...
shingo.nakanishi's user avatar
1 vote
1 answer
116 views

Alpha problems when sprites are moving in 3d

I have run into a weird problem. The Alpha values of sprites are not respected when the sprites are in motion. I was trying to do particles in 3d, and so for the start I just rendered them onto a quad(...
Sown Leon's user avatar
0 votes
1 answer
71 views

Differences between rotations and translations of different camera properties in LiBGDX

I am trying to understand the camera API (applicable to perspective camera ONLY) of LiBGDX. It really does not make sense that you can call rotate and translate on many different properties of the ...
i_o's user avatar
  • 131
0 votes
1 answer
90 views

Rotate modelinstance node about its own centerpoint y axis in LiBGDX

I am trying to rotate the node of a modelinstance as follows: Note: the node and modelinstance are rotating BUT not about their own center Y axis! ...
i_o's user avatar
  • 131
0 votes
1 answer
105 views

Object rotation around pivot point issue

I'm trying to rotate the model based on my mouse click position. Each time I click the mouse, the rotate point is recalculated, but after I rotate the model and choose another rotate point, the model ...
nghia_pham's user avatar
0 votes
1 answer
814 views

How to create a SIMPLE Skybox using OpenGL and SDL

As the title is saying I'm trying to make a simple skybox to learn how it works. Using, of course OpenGL and SDL. I have tried read some sites, here are them: link 1 link 2 link 3. None of them were ...
ガブリエル Gabriel's user avatar
1 vote
0 answers
145 views

Multiple Shaders With Sprite Batching

I have coded a game in OpenGL and for rendering I used a Sprite Batching technique to draw many sprites in a single call to glDrawElements(). But as soon as I ...
Pyr0Guy's user avatar
  • 11
1 vote
1 answer
121 views

Strange scaling on my textures when they are upscaled or zoomed into

I am having a strange issue with my sprites, which is kind of difficult to describe, but hopefully the attached images will illustrate. I have drawn two 1 pixel lines on my sprite to help with this, ...
starrider's user avatar
2 votes
1 answer
320 views

9 Slicing in OpenGL, want to have the center of the texture repeat instead of stretch

I have some sprites in my game, mostly though not entirely UI related, that I would like to be able to scale to different sizes without warping the borders of the sprite. Looking around I was able to ...
starrider's user avatar
0 votes
0 answers
123 views

Box2d into opengl/opengl es?

I recently learned a little bit of OpenGL through learnopengl.com. I've got through the window, gone through the triangle, then shaders along with interpolation, textures, and now transform. When I ...
Bobby Neal's user avatar
0 votes
0 answers
354 views

How do I fix java.lang.ClassNotFoundException: org.lwjgl.glfw.GLFW

I have not used Java in a while and thought I might try LWJGL with OpenGL and GLFW. I am using Apache Maven as a Build System. It lets me compile the program, but when I run it, it says: ...
Doggo4's user avatar
  • 1
1 vote
1 answer
403 views

Is OpenGL Shader a CUDA kernel?

I am working on sone articles, and need a bit of clarity on following question. Is the OpenGL Shader a CUDA Kernel? When searching the web, I have seen information on differences between kernel and ...
armagedescu's user avatar
1 vote
2 answers
109 views

Missing faces at ends of voxel chunks

I'm having problems generating faces in a chunk in OpenGL C++. For example, when I generate faces, they are generated correctly but always at the end of the chunks some faces are not generated. ...
FandoraStudio's user avatar
1 vote
0 answers
72 views

Cannot transform vectors from viewport to world

I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions. However, i stumbled upon a very ...
Bellaedris's user avatar
0 votes
0 answers
59 views

Opengl ES color blending is not accurate

I am developing a drawing app and I encountered a problem. As you can see the color blending feature in opengl es is not accurate. On the left side of the picture is blended through standard equation. ...
coel's user avatar
  • 1
0 votes
1 answer
409 views

How to render frustum shape for debug visualization?

I've been implementing frustum culling in an OpenGL application that appears to be working correctly. The issue I have been having when trying to render the frustum shape from the camera, my debug ...
Josh's user avatar
  • 1
3 votes
1 answer
308 views

Is it possible to use a pre-existing texture buffer containing vertex data to initialise a vertex buffer for rendering in OpenGL v4.6?

I'm generating a heightmap in a compute shader in OpenGL v4.6 and storing it to a texture. Lets say I actually store the full vertex data in that texture instead of just the height, which is a trivial ...
Iron Attorney's user avatar

1
2 3 4 5
87