A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
47 views

How to properly scale from natural coordinates to screen coordinate system in OpenGL?

I am working on a Physics Engine, and I have been using opengl to visualize what it's doing. I think I have a scaling issue when going from natural coordinate system to the opengl screen coordinate ...
3
votes
0answers
33 views

issue with Compute Shader macbeth chart

I'm trying to generate a macbeth chart using the compute shader, but there seems to be an issue with the output image. here is the glsl code: ...
0
votes
1answer
42 views

Graphic render speed in libgdx using many sprite sheets

I am currently working on a customizable Player-character for my top down view 2D pixel game. I am using libgdx and aiming for android devices as well as desktop applications. I am wondering about an ...
0
votes
0answers
33 views

Animated texture from movie file for pre-rendered custcenes

I'm at a point with my game/engine where I need to be able to display pre-rendered movies as cutscenes onto a plane as an animated texture, say something I rendered as an animation in a raytracer that ...
0
votes
1answer
61 views

JNI Error when Wrapping Jar with JOGL using Launch4j

I have been trying to wrap my fat JAR file into an EXE using Launch4j, but I have been running into problems when I try to execute the EXE. Here is the error log I get from Launch4j: ...
0
votes
1answer
54 views

Which is a better way for moving 3d objects in OpenGL?

I'm learning OpenGL, and I'm a bit confused. I've just learned about projection and modelview matrices which can be used for moving things. This is the first way, which is convenient if I want to move ...
0
votes
2answers
131 views

How to decorate the floor with a grid?

I got this photo from mixamo.com — I want to draw grid lines similar to this on my floor. I'm sure this is easy by using textures, but I'm trying to avoid using textures as much as possible. Is there ...
0
votes
1answer
72 views

Soft Body rendering from OBJ model

As part of my master thesis I have to do an softbody simulation. I 'm using Bullet Physics engine. I'm trying to render softbody, create from Meshes, with Shaders in OpenGL but the object doesnt ...
0
votes
0answers
37 views

LWJGL 3 - problem with flickering when rendering terrain with colors

For while now I m trying to built a terrain generator for my game engine and again I'm stuck with problem. I'm trying to generate a terrain using colors, so no textures. In short my problem is ...
0
votes
1answer
27 views

Do UV coordinates need correction for moving object?

The image above is a static capture of a dynamic OpenGL project I created in which I wrapped a NASA albedo, i.e., sans clouds, image on an OpenGL generated sphere. In so doing, I also generated the ...
0
votes
2answers
115 views

How to load assets into the game engine editor fast?

I am making a game engine with C++ and OpenGL. Currently I'm stuck making the asset explorer. I would like to be able to import assets into an engine project and then when I open the project just use ...
0
votes
0answers
100 views

Assimp scale model, bones and animations

I'm trying to import animated models from Mixamo, but their unit scale is centimeter while in my application I use meter. In Assimp-4.1.0 it is possible to perform scaling when importing a model with ...
2
votes
1answer
117 views

Flat Shading does not work correctly (openGL)

So currently I'm trying to implement flat shading into my engine using glsl's flat qualifier, and I have encounterd a really weird bug. Somehow the lightning on terrain isn't spread correctly, I want ...
0
votes
0answers
279 views

OpenGL.error = 1282 How to fix it?

I'm running a python script in Nvidia xavier board using a pyqtgraph.opengl and I installed python3-pyqt5 (5.10.1 installed, and qt 5.9.5) When I run this script below ...
3
votes
1answer
326 views

GLSL shader algorithm to render a sprite map with a single draw call (on a single sprite mesh)

I'm trying to render a tile map world on a single sprite mesh (instead of one sprite per tile.) This significantly reduces the array vertex bus labor for extremely large worlds: In order to do this, ...
2
votes
1answer
161 views

How to preserve Arcball rotation in c++ OpenGL?

Firts of all want to say that I've already searched for other people's answers here as same as Google and didn't found anything about it there. Also tried some others arcball implementations but none ...
5
votes
1answer
142 views

instancing and GPU skinning

I'm trying to render a large number of identical rigged entities with independent animation. Compared to standard skeletal animation, I can't compute the pose of each entities and send it to the GPU ...
0
votes
1answer
94 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
0answers
38 views

glDrawArrays: Erasing the buffer between calls?

I have two VBOs, assigned to names 1 and 2. Only 2 is being drawn. However, if I comment out VBO 2, VBO 1 is drawn with no problem. Here's the relevant code. ...
0
votes
0answers
36 views

I need help debugging this Spotlight implementation

I'm hoping someone can help me debug this wacky implementation of a Spotlight done in Java LWJGL that I found online. Basically, I found the bug, but I cannot figure out how to fix it so that the math ...
0
votes
1answer
36 views

OpenGL: glTangent? [duplicate]

In the glext.h header there is the group of functions with the prefix glTangent. It has signatures similar to the ...
0
votes
0answers
46 views

Qt opengl glTexImage2D in a widget

I was doing an OpenGL display, where I render in an opengl context (GLUT). But now I would like to integrate it into a big project that does not use the Qt OpenGL API at all (QGLWidget, QOpenGLWidget,...
2
votes
3answers
171 views

Replacement for glMatrixMode() in OpenGL 4?

In OpenGL version 3.x the function glMatrixMode() specifies which matrix is the current matrix, i.e., which matrix stack is currently the target of all matrix ...
0
votes
0answers
81 views

Using a PBO glTexSubImage2D with GL_PIXEL_UNPACK_BUFFER gives GL_INVALID_OPERATION

I plan to develop a tool for realtime video manipulation using C++, QT 4.7.4 and OpenGL and i'm on visual studio 2008. I check many web site but my code doesn't work since I try with PBO. At the ...
2
votes
1answer
87 views

How to store noise in a GL texture

I find that my procedural simplex noise in my fragment shader hurts performance, so I thought I would just use a stored noise texture instead. I would like my noise values to have better than 8 bits ...
0
votes
1answer
57 views

Rendering multiple textures on same image for terrain with index buffers (LWJGL 3)

I have started with LWJGL3 and trying to built game engine. I'm stuck on generating terrains and this is my second big problem and I'm exhausted so I need some advice on how to solve my problem. What ...
2
votes
1answer
39 views

Problem with rendering multiple textures from same image (LWJGL 3)

I have started with LWJGL3 and trying to built game engine. I'm stuck on generating terrains. I have one image that contains two textures. So now for example I want to generate terrain with only ...
0
votes
1answer
77 views

JWJGL Multi-threading to separate update and render

Introduction: I am currently designing a game in Java using the LWJGL 3.0, with Gradle. I have quite an advanced knowledge on multi-threading, and I am aware how GLFW does/doesn't implement multi-...
1
vote
1answer
36 views

OpenGL: Shader using wrong layout location

It's actually taking the color vector instead of the vertex vector. I noticed because I set the colors to random(), and the triangle clusterfudge that is my cube keeps changing shape when I reload the ...
1
vote
1answer
400 views

OpenGL tile map rendering with 1 quad for all tiles and 1 texture atlas

I'm using lwjgl to experiment with 2D games. I made some maps with Tiled (small 30x30 maps) and currently I draw them by loading the tileset image as one texture and extracting from it the texture ...
2
votes
1answer
70 views

How can I make an OpenGl/GLSL varying vary throughout a quad instead of a triangle in OpenGl 3.3?

I am, like many others, currently working on a block-based game in C++ and OpenGl. Recently, I added ambient occlusion support. This ambient occlusion is created by modulating the brightness of a ...
1
vote
1answer
42 views

Translate operation is rotating?

...
1
vote
1answer
81 views

Opengl Airplane Camera

I am making a game in opengl and am trying to get a camera to follow an airplane. How can I get the camera to match the roll, pitch, and yaw of the plane? I am using glm as my math library. Thanks!
0
votes
0answers
43 views

Screen to world raycast imprecision

I am trying to convert screen point (mouse position) to ray in world space. It works, but it lacks precision. Here is the code: ...
-1
votes
1answer
88 views

object changing position when scaled

These are my matrices. when i move the pivot point to one unit in x and if the scaling is set to 1 than everthing works fine. the pivot point has moved to one unit and the cube has stayed in its ...
-1
votes
1answer
25 views

Cube not square and being clipped horrendously, color doesn't apply

I'm trying to create my own object-oriented graphics library and use it to make a ping-pong game. I am following some tutorials online, and one uses old-style code with individual calls to ...
3
votes
1answer
83 views

OpenGL Fragment shader: not all fragments showing colors

I'm writing a simple 3D renderer and while the model loads fine, the colors are off. Quite a few fragments in the model show no color at all. Here is the render: The locations of the blacked out ...
1
vote
1answer
82 views

How to use Pivot Point in Transformations

How to translate object using Center point I have a rectangle which has a center point away from the position of rectangle. when i rotate rectangle it rotates around its center axis. if i multyply ...
0
votes
1answer
118 views

OpenGL concatenate vertex data into one big VBO

I successfully can render two triangles (with a texture) that looks like the side of a crate and also "walk" around it. Also, a small .obj file parser is available which gives me a float array of the ...
2
votes
1answer
90 views

OpenGL Textures: Texture contains color lines when object is further away that some distance

I tried searching on the web but couldn't find a reason for this. When I render an object close to the camera, the object and texture renders fine. But further away from a fixed distance, it starts ...
-1
votes
1answer
98 views

OpenGL performs very bad on laptop

I'm trying to write a game using C and OpenGL, I wrote some rendering code and camera, but the game is very laggy, framerate is so low (probably around 10-15fps), however, if I launch the game through ...
-1
votes
1answer
110 views

When should MRT (Multiple Render Targets) be used?

I had a question about exactly when I should use the MRT. This is not about rendering models, but about post processing. For example, I need to draw some cubic textures (something like skybox ...
0
votes
0answers
81 views

Reconstruct world position from depth

I am trying to restore the position from the depths. I separately created a position map in view space, which I use as a basis for tests. But I can not get the same result when I try to reconstruct ...
0
votes
1answer
135 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
24 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
54 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
84 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
60 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 [...
2
votes
1answer
123 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
97 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 ...