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
0 votes
0 answers
41 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
0 answers
28 views

Does an animation need to be loaded with a model?

I'm using assimp for my C++ rendering engine and I'm having difficulties with skeleton animations I've gone through a couple of tutorials/guides such as the skeletal animation chapter on learnopengl ...
Konjointed's user avatar
0 votes
1 answer
67 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
115 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
0 votes
0 answers
70 views

Matrices for OpenGL shaders

So I'm trying to figure out the model, view and projection matrices. I can, with some effort, find my drawings (3x3x3 structure of cubes) in 3D space and it looks like: The problem is, the cubes seem ...
Valtsuh's user avatar
  • 99
0 votes
2 answers
47 views

Custom matrix structure with OpenGL shaders

I have a MAT4 structure. ...
Valtsuh's user avatar
  • 99
0 votes
1 answer
37 views

OpenGL strange depth testing

Depth testing isn't working (hopefully the images below describe, I'll gladly describe more when asked) for me, and I can't seem to figure out why. GL initialization: ...
Valtsuh's user avatar
  • 99
0 votes
0 answers
69 views

When compiling shaders in OpenGL, I get random error messages

I am trying to follow LearnOpenGL while coding in the Zig language, and something that is very odd is that sometimes my shader compilation fails even though I changed nothing between executing the app....
user avatar
0 votes
1 answer
24 views

Frustum Culling Not Utilizing Entire Bounding Sphere in OpenGL

My frustum culling is detecting an object as culled even though not the entire object's bounding sphere is out of the frustum yet. It's like it believes the bounding sphere's radius is smaller than it ...
Duck Duck's user avatar
0 votes
0 answers
52 views

Pyglet - How can I add a bloom postprocessing step to my scene?

I have a simple Pyglet scene below. I would like to apply a postprocessing step to add bloom to the scene. How can this be done using pyglet? I've tried looking through all the documentation for ...
Ray Larone's user avatar
0 votes
1 answer
52 views

OpenGL texture not working

So I'm setting up texture creationg like so, for the data 3 pixels, 1 red, 1 green and 1 blue pixel: ...
Valtsuh's user avatar
  • 99
0 votes
0 answers
35 views

Glyphs are not being drawn [opengl + freetype]

I've followed this source from learnopengl.com for text rendering. It seems fairly simple, and only required this much code: ...
Scollier's user avatar
  • 124
1 vote
2 answers
121 views

How do you handle shaders/graphics while remaining cross-platform?

I'm building a C++ based game engine, and I have my ECS complete as well as some basic components for stuff like graphics & audio. However, I'm currently using a custom interface on top of SFML ...
Spencer Rosas-Gunn's user avatar
3 votes
0 answers
297 views

Avoiding z-fighting when reimplementing Freescape games

I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
Gustavo Grieco's user avatar
0 votes
0 answers
25 views

Cube gets squashed after applying perspective matrix

I'm trying to apply perspective to a simple, rotating cube. I created a perspective matrix using glm library, multiplied it with ...
Legolando's user avatar
0 votes
0 answers
79 views

SSAO Looks Like Depth Buffer

I have problem with ssao, i'm using vulkan and follow Sascha Willems vulkan ssao example here: https://github.com/SaschaWillems/Vulkan/blob/master/examples/ssao/ssao.cpp my ssao result looks exactly ...
Karim Hamdallah's user avatar
0 votes
0 answers
57 views

Lighting of clouds billboards

I created billboards of clouds that always face the camera in OpenGL. Now I want to add some lighting effects and maybe simulate a scattering light effect. I experimented with phong shading but my ...
JadGL's user avatar
  • 1
0 votes
1 answer
62 views

Textures still show as opaque even when alpha is multiplied by zero

I'm having a some problems with blending in OpenGLES2.0 I'm drawing a texture above a framebuffer (with ARGB channels). When I draw a transparent texture over a solid color, the alpha channel is ...
Gabriel Machado's user avatar
0 votes
0 answers
19 views

OpenGL, How should I pass the matrix using VBO and binding points?

I'm trying to make a simple example in OpenGL and C++ to draw a square and change position and size through an array. my problem lies precisely in the passage of the matrix to the shader. I initially ...
Alby's user avatar
  • 1
0 votes
0 answers
39 views

Screen coordinates in OpenGL shader

I have triangle in screen coordinates, and I have resolution 800x600. How I can put this vertex buffer (triangle with screen coordinates) into OpenGL shader and draw this triangle? Inside shader ...
black4's user avatar
  • 205
0 votes
0 answers
64 views

What is the best way to load models with support for multiple textures per mesh?

Currently, I have a model loader heavily inspired by the one made in LearnOpenGL, which works fine when loading regular models. I made a simple cube in Blender, exported it as an OBJ and I'm able to ...
KleberPF's user avatar
0 votes
1 answer
78 views

How do I interpolate light intensity for tilemap's lightmap?

I implemented lightmap creation for a tilemap, but I cannot figure out how do I interpolate light intensity values. For now, my lighted tiles create an obvious grid-like structure. It was pretty easy ...
Steyrix's user avatar
  • 225
1 vote
1 answer
46 views

Blinding flash. Set background color when creating new window

Using GLFW to create the main window Example c++ ...
Blindman67's user avatar
0 votes
0 answers
53 views

Why doesn't my Raycast detect AABB collision?

I have the following struct that calculates Raycasting: ...
Luigi Istratescu's user avatar
1 vote
0 answers
59 views

Pros and cons of caching uniforms

I am using LWJGL, and I have a ShaderProgram class that abstracts a GPU shader. I have a bindUniform(int location, Object value) ...
Eilan Laken's user avatar
0 votes
1 answer
75 views

Mouse Ray Picking: Z-Coordinate of Projected vector (glm::unproject)

I've run into a curious issue when implementing ray picking in my game engine. It seems the Z coordinate of the Projected matrix has to be ever so slightly more than ...
Josh McCord's user avatar
1 vote
1 answer
94 views

Does OpenGL have any automatic texture interpolation?

An image of a minecraft grass block in gimp: Loading from a texture atlas in OpenGL, gives a much blurrier image: I know that the actual image in my glfw window is larger than it is in gimp. (...
bbqribs's user avatar
  • 13
-1 votes
1 answer
47 views

Shader compilation error

This is the begin of my vertex shader code: ...
black4's user avatar
  • 205
1 vote
0 answers
25 views

Issue with Bullet3 contact points on triangle edges

I'm trying to build a character controller using Bullet3 with OpenGL. I currently have a kinematic body that uses a Ghost body to get all the manifold contacts. The issue I'm facing is in the ...
Aaron Z's user avatar
  • 43
0 votes
2 answers
93 views

Correctly packing an RGBA color to a single float

I am trying to render a colored quad with LWJGL and OpenGL. The vertices array is specified in interleaved format and look like this: ...
Eilan Laken's user avatar
0 votes
0 answers
101 views

Wrong Animation with OpenGL and Assimp

im currently trying to render an Animation with OpenGL. I load the Model and the animation with Assimp.net an C# wrapper from Assip. Rendering the Mesh works fine but everytime when i try to update ...
Wagner Andreas's user avatar
0 votes
1 answer
34 views

Having a problem with tangent/bitangent calculation for my meshes

Hy Guys, I have a very specific problem according to normal mapping. I am writing a very simple 3D engine just for fun, following the tutorials at "LearnOpenGL.com". So far, it is working ...
tmctiger's user avatar
0 votes
0 answers
89 views

Order-independent rendering of 2D sprites

I am using OpenGL to render sprites, using an orthographic projection. Each sprite has a position: (x, y, ...
Eilan Laken's user avatar
1 vote
0 answers
57 views

UV map shift for VFX & shaders

(I would like to say right away that I personally am not a programmer and may not be so competent in what is said below.) My friend and I are creating a small "game" engine. We have a task ...
InkCg's user avatar
  • 11
0 votes
0 answers
75 views

GLWpfControl and OpenTK force graphics adapter

I am using GLWpfControl and OpenTK for a Game that I'm developing. The game has a lobby which runs on WPF and C# and I used GLWpfControl for the OpenGL stuff. The problem lies on my laptop that has ...
Mike F's user avatar
  • 93
3 votes
1 answer
64 views

Running a standalone Godot application on a Yocto 2.6 system with OpenGL3.0/ES2.0 hardware

I have an application that displays construction machines like excavators or snow groomers. The application is built on my company's custom engine, but I am trying to find out if I can port it to a ...
Kadir Erdem Demir's user avatar
0 votes
0 answers
50 views

Bullet physics incorrect rotation with more than one axis

im try to integrate currently bullet into my game framework. But when i try to set the rotation for an rigidbody with more the 1 axis i recive the current result It looks that the rotation is ...
Andy's user avatar
  • 13
0 votes
0 answers
33 views

tangents and bitangents or larger textures?

This is more of a performance question than anything, but some time ago I learned that to put normal maps in OpenGL 3D rendering, I could do it in two ways... The first is generally what most people ...
Arthur Sally's user avatar
0 votes
1 answer
84 views

GLSL ported shader not working in HLSL

I have been working on an Infinity Grid shader for my engine. It was already implemented to Vulkan’s GLSL, so it worked great with OpenGL’s (4.6) GLSL. Here's a reference. This basic shader with ...
Kenny Tutorials's user avatar
0 votes
0 answers
99 views

Cmakelists.txt with sfml/glew/glm .exe doesn't work

I am working on a game in c++, i want to make a Cmakelists.txt file for build a .exe file. ...
Gaëtan S's user avatar
0 votes
1 answer
87 views

How to setup gradient lighting in OpenGL shader?

I setup simple single light source lighting around campfire object. However, as can be seen, the transition between lightened area and unlighted one is sharp. The GLSL fragment shader code: ...
Steyrix's user avatar
  • 225
0 votes
0 answers
39 views

How do I pick terrain in GLSL/OpenGL by picking 2D vertices positions?

Presumably the problem is with the internal formats and my understanding of that, but I've been stuck a while, got this sort of approaching working fine on a more straight forward colour picker, but ...
Paul's user avatar
  • 1
0 votes
1 answer
82 views

Setting up perspective projection in OpenGL

I'm trying to set up perspective projection in OpenGL but it doesn't work ...
DDD's user avatar
  • 11
0 votes
0 answers
45 views

Spherical Billboard Effect

I try to make a spherical billboard that follow the camera's direction. But, the result that I got is model get distorted or event twisted. If I'm using only a yaw/pitch quaternion per time, it works ...
oremx986a's user avatar
1 vote
1 answer
144 views

Is texture switching a good idea (OpenGL, 2D)?

Let's say I have two atlases for character animation. One atlas represent idle and walk. The other one represents striking. I usually combine atlases into one file, however I thought about using ...
Steyrix's user avatar
  • 225
2 votes
1 answer
49 views

I can't find what I'm doing wrong when rendering a point light that is clipped by the floor

I have a top down camera on my game, and I'm rendering a point light on my opengl fragment shader. When the point light is far away from the floor it looks like I would expect it should look, like a ...
ellipticaldoor's user avatar
0 votes
0 answers
76 views

GUI shader that draws different textures on corners, edges, and center?

I'm working in GLSL but feel free to write a solution using any shader language, or even pseudocode / language agnostic, I can translate it myself. I'm trying to create a shader that can draw a "...
Charanor's user avatar
  • 7,870
1 vote
1 answer
140 views

How do I make the joints and weights skinned with the variables I'm using?

For some time now I have been trying to do skeleton animation using Rust and OpenGL(specifically the gl library), I loaded the animation information correctly(with the gltf library), the bone ids and ...
Arthur Sally's user avatar
1 vote
2 answers
197 views

Seam visible on sphere or torus made in Blender when using a texture atlas

I'm making a game in OpenGL with C++. I have a problem with my vertices or texture coordinates - there's a seam visible on the sphere where the texture wraps around: If I use "nearest" ...
Gaëtan S's user avatar
1 vote
0 answers
52 views

Flipped normals and texture flickering on Motorola and Samsung Android phones

What is happening to the textures when playing on the Motorola Android phone? Deleting and creating new materials doesn't work, the problem persists even with new materials, material overlay or ...
Atsinganoi Dragon's user avatar

1
2 3 4 5
87