Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
37 views

OpenGL C++ Drawing particles instanced performance

In my 2D Game Engine I'd like to reduce the amount of draw calls. I used to do a draw call for every particle, which yields worst performance. I've tried instanced rendering in OpenGL but my ...
0
votes
0answers
17 views

GLDrawableFactory.getGLDrawable removed in JOGL 2

I have recently picked up an old project (not written by me), and I was tasked with updating it from JOGL 1 to JOGL 2, so it can run on Java 8. There are a few problems with this. First of all, most ...
0
votes
0answers
26 views

OpenGL render your own world using tiles from google maps

Goal: I would like to create a UI/GUI that has a Google Earth Panel. In this Google Earth Panel I would like to zoom in a 3D world and out and label additional objects like sattellites etc. To ...
0
votes
1answer
53 views

Bullet Physics DebugDraw Unexpected Results

I'm integrating Bullet Physics into my project for collision detection and have just gotten some debug draw functionality to work. However, the results are not what I'm expecting. I have tried to draw ...
1
vote
0answers
51 views

Why projection window is between -1 and 1

Is it a convetion ? What we achieve with this ? I am reading about how the perspective and orthographic matrix is getting calculated and everyone is trying to normalize the homogenous coordinates to [...
1
vote
0answers
66 views

Why is my openGL rendering faster when I time it with GL_TIME_ELAPSED

I have some code that was rendering too slowly, as in there was a noticeable lag in when updating the screen in response to user input. I tried profiling the CPU side code, but that did not seem to be ...
1
vote
1answer
29 views

Texture with transparency not rendered correctly in LibGDX

The title might be a bit misleading but I'm having a hard time to explain the problem so I'll try with pictures: Same tree from opposite site: I'm trying to create a voxel game and at the moment I ...
6
votes
3answers
14k views

Why does my machine render OpenGL using my onboard chipset instead of my graphics card?

I'm following an OpenGL tutorial series at opengl-tutorial.org, but have run into a problem: The following lines: ...
0
votes
0answers
50 views

OpenGL Context creation takes over a second

I'm rewriting an old 3D editor with the goal to make it faster and easier to use. I noticed the following method takes over one second to run. It's called in the app's initialization on the main ...
0
votes
0answers
22 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 ...
0
votes
0answers
62 views

something very strange in one of the collisions with OpenGL 3.3

As some of you know, I'm developing a game engine in C, and I came across a problem that left me kind of lost. When I was developing my collision system, I saw something very strange in one of the ...
0
votes
0answers
30 views

The X axis becomes the Y axis after a quaternion rotation

I am making a FPS game, and I have a for loop where I place out "ground" objects. (pseudo code) ...
-1
votes
0answers
25 views

Trying to understand quaternion rotations

So I have been making a FPS game where I want a weapon to follow the camera, and the weapon should rotate in the direction the camera is looking. I have been using normal euler angles for this, but ...
1
vote
0answers
38 views

Framerate limited by lack of mouse movement?

Using Torque, it appears that the program is running at around 25fps when the mouse is still, but as long as I keep the mouse moving, the framerate can hit well over 300fps. What in the world would ...
0
votes
1answer
39 views

what is the difference between the regular camera and the first person camera?

I'm asked to implement first person camera but all I know is the regular camera that moves when I hit specific keys and could anyone tell me the steps to implement it?
1
vote
0answers
22 views

Screen Space Reflections: Artifacts problem

I'm trying to implement a simple (so far) screen space reflections shader. Below is my code: ...
1
vote
2answers
79 views

Getting Model View Matrix by hand

Right now I'm trying to calculate the model view MAtrix by hand... The App is 2D. I have Somethign like this.. ...
1
vote
1answer
52 views

rotation matrix problems - opengl and own types

In an effort to learn things deeper I'm writing my own mathematics for the first time instead of using libraries. As far as I can tell my matrix multiplication is correct, and translation and scaling ...
0
votes
1answer
34 views

Apply 2D Texture on all faces of a 3D Cube

I am trying to render a 3D cube, and apply a single texture to all the faces of the cube. I feel like I am missing something critical here as it is applying to the front and back faces of the cube, ...
0
votes
1answer
53 views

Multiple glControl on same winform is not working - OpenTK C#

I have to show frames from two cameras in two openGl control separately at same time. For that I have put two opengl control in my form and pass those frames to opengl accordingly. But when running ...
0
votes
1answer
49 views

How to render a trimmed sprite?

I used TexturePacker to create an atlas for me and I've read it into my game. I can use unrotated and untrimmed sprites and it works fine. Now I would like to support trimmed sprites and I'm running ...
0
votes
0answers
35 views

C++ Mouse picking for ray to plane intersection

I'm making a C++/OpenGL application (decidedly without GLM), and I'd like to understand how to create a ray from the camera eye to the mouse pointer, as well as detect an intersection point from the ...
0
votes
1answer
108 views

Wrong angles given by atan2

I have a method to calculate angle between two vectors, but it is giving wrong values. here is the code : ...
0
votes
1answer
40 views

TBN matrix for normal and parallax mapping

I'd like to refer to this question because I didn't completely answer to my problem. I've implemented normal and parallax mapping but because of some assumptions I have to use two different TBN ...
5
votes
4answers
483 views

OpenGL lighting appears to be clamping

I'm experiencing an odd problem where everything placed in front of my light appears black in my scene. This happens on multiple axes. I've searched the depths of the internet to find a solution, but ...
0
votes
1answer
33 views

Set / Get UserPointer - What Do They Do?

I see a lot of talk about glfwGetWindowUserPointer() and glfwSetWindowUserPointer() but I can't for the life of me understand what these functions actually do. From http://discourse.glfw.org/t/what-...
0
votes
0answers
56 views

Quaternion Rotation after performing previous rotations

Have Quaternion \$ Q\$ which is rotated on the \$X\$ axis 90 degrees. \$Q\$ is now \$ (0.707106, 0.707106, 0, 0)\$. I want to rotate \$Q\$ another ...
0
votes
1answer
42 views

I can't make the cube map to use shadow mapping - or it seems so

Basically, I'm following tutorials as I'm very new to OpenGL. I managed to perform shadow mapping towards just one direction, meaning I created 2D texture depth map. Now with omnidirectional shadow ...
0
votes
0answers
41 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
0
votes
0answers
29 views

Draw sprite outline with sprite renderer in opengl

I'm using a scenegraph with the visitor pattern to draw sprites in my 2D GameEngine. It works great. Now I'd like to render the lines of the cube the sprite is rendered onto. ...
2
votes
1answer
2k views

Is it reasonable to use a 2D texture as a lookup table in GLSL

I need a lookup table in a shader. The input values would be color values and the output other color values. Something like: ...
0
votes
2answers
874 views

Opengl rotate around global axis

I want to create a game in which I rotate a cube around 2 fixed axes(x and y) using my mouse. Here is what I want to do. Just use the mouse to see what kind of rotation I want. I calculated my yaw ...
0
votes
1answer
47 views

OpenGL Tiled map texturing problem

Some Tiles in my map are drawn wrong, I think it might be a indexing problem. Here's the output : some tiles just look wrong!! I'm not sure where i'm going wrong with my code, so please take a look. ...
1
vote
1answer
84 views

OpenGL Lines between triangles?

I'm currently using marching cubes to generate a mesh, and have encountered this incredibly weird problem. Looking from below the terrain, these weird fully lit lines appear between every triangle. ...
2
votes
1answer
1k views

LibGDX Box2DLights shadow offset problem on bodies

Hello I just started to use LibGDX, and it's awesome. I looked at the Box2DLights library, and started to learn how the lighting work here. I got something up: (source: gyazo.com) As you can see, ...
0
votes
1answer
39 views
1
vote
2answers
856 views

Unresolved external symbol _glad_XXX

I am relatively new to C++ but I have a few years of java experience. I decided to try to make a game with C++, In contrast with the handful of games i have written in Java with lwjgl. I am having a ...
0
votes
1answer
69 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
375 views

FXAA Shader turns image upside-down

I'm trying to use an existing FXAA shader for anti-aliasing, which works, but when I try to run it, the filtered image is upside-down (vertically flipped) ...
9
votes
3answers
623 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
2answers
497 views

Nvidia RTX ray tracing OpenGL extension

I can't seem to find any OpenGL headers for the RTX ray tracing extension, seems like they only want you to use Vulkan and optix with RTX
1
vote
1answer
207 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
111 views

God rays shader - Trouble with sun position

I have found a shader that I like here: https://www.shadertoy.com/view/4dyXWy The code for the fragment shader from the link above is: ...
0
votes
1answer
500 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 ...
31
votes
5answers
34k views

What is the purpose of glScissor?

I know that it is more efficient than stencil test, but am I right assuming that the same functionality could be achieved using projection transformations with viewport?
0
votes
1answer
99 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 ...
2
votes
1answer
473 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 ...