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
20 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
63 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
43 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
51 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
17 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
33 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
  • 175
0 votes
0 answers
35 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
70 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
  • 213
1 vote
1 answer
44 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
49 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
48 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
45 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
82 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
43 views

Shader compilation error

This is the begin of my vertex shader code: ...
black4's user avatar
  • 175
1 vote
0 answers
24 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
76 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
68 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
28 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
69 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
41 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
45 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
52 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
49 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
31 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
74 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
85 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
72 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
  • 213
0 votes
0 answers
38 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
60 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
40 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
124 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
  • 213
2 votes
1 answer
46 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
65 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,840
1 vote
1 answer
135 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
183 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
0 votes
1 answer
61 views

Normal map lighting is just slightly off

I've been trying to implement normal mapping into my custom OpenGL shader. The result I'm getting is almost there, but it looks like the Point Light is not ...
Tom Tsagkatos's user avatar
0 votes
1 answer
85 views

What is this jitter caused by moving at high speed?

I used jumping real high as an example to show the jitter. what is causing the jitter issue? I can provide code for various parts of my engine if requested.
ZeunO8's user avatar
  • 699
0 votes
0 answers
44 views

Moving a texture with a vert shader

I'm working on a mod for a game and trying to add my own shader. I know practically nothing about shaders, but another similar shader exists and with their modding teams permission im using it as a ...
JoshB's user avatar
  • 1
0 votes
1 answer
509 views

Int vs Float, which one is faster for gpu?

My game need to loop through massive amount of data, and the amount of data can increase by a lot depending on world settings set by player. The data is too big for CPU so i need to use GPU for it ...
aaa's user avatar
  • 117
0 votes
0 answers
27 views

LibGDX Table rendering order draw calls

I'm using LibGDX Table for drawing some simple structure but I am having problem with draw calls and texture binding handling. For clarification, I have a ...
glz's user avatar
  • 31
0 votes
0 answers
43 views

Some faces of mesh are showing much darker than they should be

Hello, My traffic light model has some dark faces and I can't seem to understand why? I am using OpenGL. This is my fragment shader: ...
DragonYT's user avatar
1 vote
1 answer
233 views

Is OpenGL 2.0 possible in unity?

I want to develop a game in unity, just a small scale simple game without heavy computation nor complicated feature, and does not use a lot of ram either (2-3 GB). I want player with "outdated ...
aaa's user avatar
  • 117
1 vote
1 answer
120 views

GLSL 9-Slice (or 9-Patch) working with single texture, but not with atlas texture

I've been able to implement 9Slice for textures when the texture is just itself, that means, it does not contain any subtexture except itself. This is the code I'm using: ...
borja vazquez's user avatar
0 votes
0 answers
42 views

Manual calc of perspective projection and getting point on the screen

I'm need to draw the red rect on the first vertex of gray platform. To begin with, I draw a gray platform with a perspective projection and set it using gluPerspective: ...
ladno's user avatar
  • 1
1 vote
0 answers
62 views

LWJGL3. A strange graphic artifact of OpenGL 3.x

I work in java with lwjgl3. I came across a strange artifact, the source of which I have not been able to determine for a very long time. I'm drawing a large surface. When I approach this surface and ...
alfabouh's user avatar
0 votes
0 answers
46 views

Clarification on scene graph implementation. Adding object/node to a root node or container?

I learned about scene graphs from this chapter on learnopengl and using this I'm trying to make a simple imgui window that can display the scene graph, but one thing that wasn't made clear/I'm having ...
Konjointed's user avatar
0 votes
1 answer
79 views

Skybox not texturing

I have looked for a solution for a little while now however I'm not sure if other people have encountered my same problem. I am trying to draw a skybox in a blank opengl window, I have camera controls ...
Ben Duguid's user avatar
21 votes
2 answers
7k views

What is a "normal" in game development

I'm new in Game development and probably this is a silly question. I had a look online but haven't found a clear answer, I did it bit quick but enough to evaluate that this is a confusing topic ...
Federico Baù's user avatar
1 vote
0 answers
116 views

Is there a reason that we have to use homogeneous coordinates in rasterization?

Looking at the pipeline of games, I am confused about the necessity of homogeneous coordinates. For gameplay logic, a 4x3 matrix is enough to handle translation, rotation, and scale. I can't think of ...
lotsof one's user avatar

1
2 3 4 5
87