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
1answer
50 views

Parts of OpenGL rendering area missing/transparent until resize

I am having a weird transparency issue when running my game in windowed mode. Parts of the window, left and top parts in normal window mode, right and bottom when in maximised window, become ...
0
votes
2answers
49 views

How to make player seem bigger / world smaller, without changing world coordinates

I am making a voxel game with OpenGl, I've got the major parts working, except the camera seems small compared to the the blocks. How do I make the camera bigger? Do I do a scaling on the model ...
0
votes
0answers
67 views

How to load a PNG in pure C

PNG loading: I've been creating a game engine for almost a year, and since the start of the development, I have been using stb_image for loading images. It ...
5
votes
1answer
781 views

How to make Volume Heat Distortion effect in OpenGL?

I'm working on adding volume effects to an existent, open-source game engine. At the moment, the engine only supports two dimensional "thruster" bitmaps with a planar heat distortion drawn over the ...
13
votes
4answers
9k views

Why does clip space in OpenGL have 4 dimensions?

I will use this as a generic reference, but the more i browser online docs and books, the less i understand about this. ...
0
votes
1answer
59 views
0
votes
1answer
158 views

Animate some tiles of tile map

I have a game where each "tile" of the terrain is a triangle (Settlers 2). Those are placed next to each other and in way creating an infinite world (right/bottom jumps back to left/top). There is a ...
1
vote
1answer
60 views

OpenGL approach to depth-testing-like combination of a large buffer of fragments

I have a depth buffer and color buffer created by another effect. The buffer is more than double my screen size. It is not rendered from geometry, but as a whole it resembles a rendered scene with an ...
11
votes
3answers
846 views

How to hide a post-processed mesh outline when/where the mesh is hidden

I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
0
votes
0answers
25 views

Repeat/Scroll texture on CubeMap

I need a method to scroll an image across all sides of a cube map in a way similar to scrolling a UV texture across a water's texture to give the appearance of movement by shifting the normals. I want ...
1
vote
1answer
296 views

Show only some parts of a point cloud. OpenGl4

I am developing an opengl 4.0 app which is showing a point cloud. In the other hand, I have an array "pos" where I have some x,y,z positions: ...
0
votes
1answer
189 views

How to deal with VBO and obj files for physics simulation?

I'm having a hard time struggling with obj files and clothing simulations. I first made the obj file processor class that deals with the typical obj file problem: having multiple indices for vertex ...
0
votes
1answer
26 views

Texture flipping behaviour

I was having this problem with OpenGL where I'd have all my textures being rendered upside down. I did the most logical thing I could think of and tried reversing the order of the mapping and that ...
0
votes
1answer
737 views

LibGDX - Draw multiple textures with different positions with one shader?

currently I'm optimizing my render calls by drawing multiple textures with one shader. The background textures who all share the same position are no problem. But now I want to draw some Textures with ...
3
votes
1answer
654 views

Specular Light not working (Phong Lighting)

There seems to be a problem with my current Phong Shading implementation. I have been using the per fragment approach. The specular highlight aspect of the technique is not rendering as it should, as ...
0
votes
1answer
226 views

How can I access an OpenGl buffer from within a GLSL 330 shader?

I am currently attempting to create a simulation using OpenGl's GPU acceleration for both the simulation computations and rendering. The rendering portion of my simulation is complete and working, but ...
5
votes
1answer
3k views

Drawing fonts with LWJGL3 with OpenGL

I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here. My goal is to somehow render some text on the ...
4
votes
1answer
784 views

Render Stutter - OpenGL or loop timing?

For some time now i have no been able to pinpoint the nature of the rendering stutter shown above(by not clearing the screen, not using SwapBuffers and drawing only to the front buffer). See the big ...
3
votes
2answers
992 views

Why is enabling GL_FRAMEBUFFER_SRGB making the colours brighter?

My understanding of gamma correction is as follows: We want to do colour math in linear space so we can lerp etc. between colour values and get the results we expect. But human eyes don't have a ...
0
votes
1answer
191 views

OpenGL Parallax Displacement Mapping Not Working

I am attempting to implement parallax displacement mapping into my OpenGL code but it is not working as it should. https://imgur.com/a/9yIQL As I move around, double-lines moves around and if I am ...
4
votes
1answer
1k views

Why is my model rotating opposite direction around the Y axis?

I have a simple scenario. I have a simple scene, and in it I'm drawing a grid and a model, with some axis for orientation. I noticed when I rotate the model about it's local Y axis, if I rotate the ...
0
votes
1answer
207 views

Offset on camera following object that accelerates

I have camera a that is actively following an object (a plane) from behind. This object can accelerate or decelerate. I would like to have a camera offset when I move the plane, so it doesn't look so ...
10
votes
2answers
16k views

Taking advantage of multithreading between game loop and openGL

Talking in context of a game based on openGL renderer : Let's assume there are two threads : Updates the game logic and physics etc. for the in game objects Makes openGL draw calls for each game ...
1
vote
3answers
324 views

Where did I lose vertex binding?

I make OpenGL render framework for my bachelor graduate work. I created simple Model and Shader classes. But when I tried to render some vertices, they do not render. I saw with an OpenGL profiler, ...
0
votes
2answers
228 views

How can I represent a 2d UI?

So, I wanted to start building a desktop application, which is of course with an interface, and I thought that OpenGL would be best. The problem is, once I started following TheChernoProject's ...
0
votes
0answers
47 views

How real time volumetric light beam effect could be achieved in opengl?

Here is 1.5 mins long video to give you an example of what I meant. From research that I did , regarding lighting effect, usually it is done offline (post-processing) using algorithms like "god ...
0
votes
1answer
75 views

How to correctly reset vertex attributes after modification

I am trying to use the same vertex shader for two different use cases to preserve memory, but I am having issues where the modifications of one shader run are passed on to the next run, even after ...
2
votes
1answer
34 views

No local transform with skinned mesh with assimp?

I'm trying to add skeletal animation to my engine and I'm importing meshes with assimp, but I think I misunderstood the skinned mesh concepts (or don't understand assimp). When I import a model, ...
1
vote
1answer
295 views

Frame Buffer Object (FBO) is not working. What is the right way to use?

I am trying to use FBO but i am living some problems. I will show you my steps but first i will show my running screen ,so we can compare them. Like before fbo after fbo. My running screen and Draw() ...
0
votes
1answer
592 views

Adjusting view matrix when glViewPort & resizing

I have an issue when my window resizes. I have a simple MVP shader like this gl_Position = projection * view * model * vec4(in_Position, 1.0); to render a map ...
4
votes
1answer
42 views

Issue with specular light at highly oblique angles with Blinn-Phong

I'm having an issue with my basic Blinn-Phong renderer, when looking at objects at very oblique angles: I don't think this is an issue with my code, although I'll post my fragment's GLSL below. ...
0
votes
1answer
29 views

Efficiently color a procedural mesh?

I'm creating a procedural world with LWJGL and GLSL. I want to better visualize the biome map being produced and the height map it creates, but my attempts so far have been very inefficient. My first ...
4
votes
2answers
1k views

OpenGL GLSL using projection,view and transformation

I have been trying to get a simple triangle to render on the screen. I am using Projection, View and Transformation matrices but am unable to get anything to the screen. Main loop ...
0
votes
1answer
139 views

Replacement for glDrawElementsBaseVertex in OpenGL ES?

I am porting my game engine(c++) to Emscripten, which unfortunately only supports OpenGL ES 3.(Not 3.2) Therefore I don't have access to glDrawElementsBaseVertex, which is needed by my renderer(...
0
votes
1answer
99 views

How can I create multi objects in modern OpenGL?

I am trying to do make a 3D game in modern OpenGL where the player throws a ball and when it hits a cube, the score will be increased by one. I created a 3D object and camera. Right now I'm stuck ...
0
votes
1answer
261 views

Synchronizing with monitor refreshes without vsync

What is the preferred way of synchronizing with monitor refreshes, when vsync is not an option? We enable vsync, however, some users disable it in driver settings, and those override app preferences. ...
0
votes
1answer
156 views

opengl bump mapping (normal mapping) problem with VBO and GLSL

hi i am beginner i am trying to implement bump mapping with vbo and glsl. My question is: did i make bump mapping ? if i did why these edges didnt disappear ? high and low meshes (i used low meshes ...
1
vote
1answer
91 views

OpenGL texture2d/image sampling issue. Strange artifacts in texture

I have an issue when using textures in OpenGL, strange artifacts occur where geometry overlaps, but not always. Video Reference. I am using a GL_TEXTURE_2D with <...
0
votes
1answer
98 views

Can we flip znear and zfar so that positive z values increase away from the viewer?

I am confused about the projection matrix in OpenGL. i have a habit of writing the code as follows. ...
0
votes
1answer
23 views

Cannot Draw a triangle without VAO on MacOS

So I was watching Cherno's Video on Vertex attributes and he was successful in drawing a triangle without a VAO, but in tutorials from learnopengl.com they specifically say they we need a VAO to draw ...
0
votes
0answers
21 views

Rendering a quad using VAOs and VBOs in LWJGL 3 doesn't work

So, I just started learning LWJGL 3 and I used a mixture of a couple of tutorials and example code to make something that should render a rectangle to a magenta screen using VAOs and VBOs. There are ...
0
votes
0answers
14 views

Stencil not working processing

With jogamp I can create the following stencil: ...
1
vote
1answer
962 views

Depth texture white in shader

I am trying to implement shadow mapping into my project and am stuck at this problem: If I'm reading the shadow map values with glReadPixels and linearize those ...
1
vote
1answer
51 views

PyBullet & OpenGL - Rotations are reversed in OpenGL [closed]

Project description: I am writing a basic game engine to help with my PhD topic on multi-agent learning. I am using PyBullet as the backend physics engine and OpenGL for visual display. I have OpenGL ...
4
votes
1answer
2k views

SDL2, OpenGL, Nvidia laptop screen tearing

EDIT 2017-05-14 dvb. Issue still active to this very day, see geforce forum link in main question. Note 3: "Stoltverd" has posted a "fix guide" on geforce forum. It has workarounds for non-OpenGL ...
2
votes
1answer
932 views

Converting Euler rotation angles from Z up to Y up (Max to OpenGL)

I'm working on pulling geometry and it's transformation from a 3DS Max exported FBX (Z-up) to an OpenGL model format (Y-up). The main problem is I intend to keep the transformations as Translation and ...
4
votes
2answers
231 views

Fine tuning light shader mechanics

I'm currently trying to implement the lighting technique described in this article. I've done pretty much exactly what is done in the article. My technique is the same, and my shader is the same. ...
4
votes
2answers
154 views

GLSL: How can I optimize this lighting (fragment) shader? Basic 2D game, 30+ light sources cause significant frame loss

I am using a fragment shader to create circular light sources in my 2D game. Full code at the bottom. Essentially, an array of light source objects (called Lights in the code) are passed into the ...
1
vote
1answer
480 views

Difference and interaction between Viewport and Camera

I'm very very confused about some very basic concepts in game/grafical developing. The interaction between the individual components (camera, viewport, window-sizes, gameworld-sizes, ...) when ...
1
vote
1answer
270 views

opengl shadow map peter panning effect

I am implementing the shadow map in opengl with opentk everything works fine except I have a peter panning effect that I can't solve it by changing the face culling to front then render to the depth ...

1
2
3 4 5
81