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
1 vote
1 answer
51 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
0 votes
0 answers
27 views

How to do image anchoring in OpenGL?

I've looked at: How do I draw a zoomable image in OpenGL? and Scaling and locking SpriteRenderer Image to anchor points but neither fully helped. I am making a zoomable image in my OpenGL app. ...
shawn_halayka's user avatar
2 votes
0 answers
107 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
51 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
27 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
96 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
75 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
0 votes
0 answers
18 views

How to set matrices for different objects, in OpenGL?

Not sure how to do it, since I'm only seeing one instance of matrix-use drawn (only one of the objects has an energy bar): ...
Valtsuh's user avatar
  • 139
1 vote
0 answers
41 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
44 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
30 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
92 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
127 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
73 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
  • 139
0 votes
2 answers
52 views

Custom matrix structure with OpenGL shaders

I have a MAT4 structure. ...
Valtsuh's user avatar
  • 139
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
  • 139
0 votes
0 answers
148 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
27 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
58 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
61 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
  • 139
0 votes
0 answers
37 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
141 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
310 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
27 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
86 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
65 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
66 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
23 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
42 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
  • 215
0 votes
0 answers
89 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
87 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
56 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
57 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
65 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
95 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
104 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
49 views

Shader compilation error

This is the begin of my vertex shader code: ...
black4's user avatar
  • 215
1 vote
0 answers
28 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
106 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
121 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
39 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
103 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
72 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
90 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
71 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
52 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
90 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
118 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
102 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

1
2 3 4 5
87