Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
11 views

OpenGL: Depth Stencil buffer won't write underlying texture attached

I'm currently developing an emulator and I got some games using GL_DEPTH24_STENCIL8 (D24S8) as depth buffer. The depth buffer works fine and all but the underlying texture does not seem to be written. ...
0
votes
1answer
22 views

I add a straight big plane over terrain(3d). Vibrations are happening when i move camera

I have this problem in my OpenGL project but i will show you the same thing over blender3d with video. So I believe that I will better explain the problem. it is just 30 seconds. Take a look. Youtube ...
0
votes
0answers
15 views

Compiling a simple shader in PyOpenGL

I am starting with OpenGL and I am translating the code from learnopengl to python and for some reason I am not being able to compile the Vertex Shader. This is all that I have: ...
0
votes
1answer
87 views

Game Engine Renderer Architecture

I'm currently building a game engine renderer but I got stuck when I had to separate engine and client code. I had been following OpenGL tutorials to learn about buffer creation, etc so all my code ...
2
votes
1answer
81 views

Mesh rendering performance optimisation

I'm working on a libgdx implementation of mesh terrain and running into some performance issues. The terrain is represented by a number of mesh tiles, each mesh is made of vertices laid onto a 2D ...
0
votes
0answers
18 views

scale on z axis move

At the position z = 0 my box has size on one side 0.2. When, for example, I move it to z = 1.5, size of it scale up. I've trided to calculate it by using triangle formula z*tan(fov/2), but it does ...
0
votes
0answers
40 views

Render Pygame sprites with PyOpenGL

I am using Pygame for rendering my sprites, however that work is done on the CPU side. For performance reasons I would like to change to drawing those sprites using PyOpenGL. How can I take textures ...
0
votes
0answers
31 views

Perspective projection matrix with a non-orthogonal near plane

I'm trying to figure out a way to provide such a perspective projection matrix to a shader that the "near" plane wouldn't necessarily be orthogonal to the camera vector. More specifically, I'm ...
0
votes
0answers
32 views

Specular/Diffuse light on an icosahedron opengl

I'm having a problem with my model here. I draw an icosahedron using GLUT, and the edge length is set to 0.8. The info of the coordinates are listed below: (X and Z are calculated since our edge ...
0
votes
1answer
25 views

split/divide/extract/separate mesh indices&vertex in n

I'm totally lost. I'm trying to split/divide/extract/separate a mesh into sub-meshes via bbox test. But I just realized that I need to properly split indices and vertex and I have no idea how o.o... ...
0
votes
0answers
19 views

Using .3ds smoothing groups in OpenGL

I would like to use some sort of a software to create 3D assets and put them in a binary file so that I could extract the necessary data and use it in OpenGL. I only need the vertex attributes and ...
0
votes
0answers
20 views

Drawing simple shapes in OpenGL ES 1.1

I'm having an issue getting OpenGL ES 1.1 to draw anything. All I get is a black screen every time. I have the following working OpenGL 2.1 code, which I'm trying to change over: ...
0
votes
0answers
49 views

OpenGL mouse to world position

I'm trying to implement an editor like placing mod with opengl. When you click somewhere on the screen an object get placed in that position. So far this is my code ...
0
votes
1answer
24 views

OpenGL orthographic projection rendering quarter of screen

I'm trying to set up an orthographic projection so I can draw a rectangle using screen coordinates, but even if I draw a rectangle using the width/height of the window, it only fills a quarter of the ...
1
vote
1answer
43 views

Difference between two perspective projection representations

When researching perspective projections on the web, I've come across two different representations. One is unrelated to OpenGL and the other is strictly associated with it. What is the relation of ...
1
vote
0answers
57 views

How can I solve the jerky images when camera positions were calculated and sent from another computer?

I'm working on a simulator project. Computer A which uses a stick as a controller to produce operation data and calculate simulate data which will be sent to computer B as camera positions to render ...
0
votes
0answers
25 views

inter process communication in opengl

I have a process A that starts OpenGL programm with empty world, and need to populate this world from process B that start as separated programm, also all events (like raycast, etc ) has to be ...
0
votes
0answers
17 views

How to align a particle billboard to the floor of the world

I'm using https://github.com/squarefeet/ShaderParticleEngine and THREE.js to manage particles in my scene. I have a special case where some particle emitters need their particles to align to the ...
0
votes
1answer
65 views

Running OpenGL app on Windows XP x86 produces incorrect texture colors

I'm working with the Cen64 emulator and I compiled from source a x86 version that operates fine on Windows 10 x64. As soon as I run it on a Windows XP x86 machine the colors are then all incorrect. ...
0
votes
0answers
13 views

combine two translation/rotation/scale triplets without matrices

Let t1/2, r1/2 and s1/2 be two sets of transformations. Translations are vec3, rotations are quaternions and scales are vec3. Lets assume that all common operations are defined (overloaded operators ...
0
votes
0answers
28 views

SDL2-CS and Gtk Sharp like SDL2-CS and WinForms in C#

who knows SDL2-CS embeds in Gtk Sharp 2/3? Similar example by Ethan Lee with Winforms But I really want know how do I fix with SDL2-CS in Gtk Sharp because I am working under Ubuntu 18.04 SDLWidget....
0
votes
1answer
80 views

Is Frustum Culling and Occlusion Culling used together, or separately?

I am taking a 3D game programming course and my professor provided the class with already-implemented graphics code with OpenGL. The graphics uses frustum culling to remove primitives outside the view ...
0
votes
0answers
34 views

About uniform block alignment

I am working on a project need programming in GLSL, and new to this. I need create a uniform block holding members of scarlars, vectors, matrices and structures. I read the guideline of uniform block ...
0
votes
0answers
10 views

rayTest for cutted by stencil objects

I have red rectangle based on which I am cutting (using opengl stencil) all of the green rectangles, like shown in the following screenshots a) before cut b) after cut When I run rayTest(bullet ...
1
vote
1answer
26 views

What's the best practice to use the pbo to upload multi textures?

I have a basic model to upload textures as shown in the following picture. I design this for several reasons: Only the primary thread owns the OpenGL context, so I choose to create buffers, map ...
0
votes
0answers
16 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 ...
0
votes
1answer
28 views

Order of rotation in Euler angles

I'm want to control the direction my camera looks, so I'm using Euler angles, so rotating around an axis is relative to rotation around previous axis. Something like this. I want to always rotate ...
0
votes
2answers
24 views

cutting part of object

How to cut part of the object if it is inside a specific area? like showed on attached image. PS Looks like stencil should be used, but I am not really sure how to do it.
0
votes
1answer
21 views

Detect collision with bullet physics, to make a character controller

I inherited from btCollisionWorld::ContactResultCallback but I really have no idea how to use this virtual function: ...
0
votes
0answers
28 views

OpenGL texture management

I have an OpenGL engine built using bindless textures, which allows me to store all materials in an UBO and drawing thousands of instances with different materials in one pass, by accessing the ...
1
vote
2answers
64 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.. ...
0
votes
1answer
77 views

Should I throw out game heavily using OpenGL 2.0 and rewrite it from scratch?

I've picked up one old open source game (done with C++/Lua) with a lot of features and chosen to continue its development. It use SDL2 (ported by me from 1.2) and OpenGL 2.0. Now when I look at futher ...
0
votes
0answers
27 views

btRigidBody world transform and scale issue

When I create a collision shape for rigid body (in this case box) I use vertices positions and scale from the opengl matrix, the code looks this way: ...
0
votes
1answer
32 views

How to change object details based on zoom

I have created the map of a huge terrain (10,000 x 12,000) vertices, which results in about 240 million triangles. Loading all these is very heavy and slows down the scene significantly. To make it ...
0
votes
1answer
59 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
0answers
27 views

OpenGL outline of clip plane

I've implemented a clipping and capping view similar to the example called "simplecap.zip" in this page: http://users.polytech.unice.fr/~buffa/cours/synthese_image/DOCS/trant.sgi.com/opengl/examples/...
-1
votes
1answer
76 views

How OpenGL running without GPU?

Every tutorial on OpenGL mentions that, OpenGL codes are commands executed by the GPU. Few days ago, my GPU cashed and I removed it from my computer. But the same OpenGL programs are still ...
0
votes
1answer
30 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
68 views

Using GLFW and GLUT together

I'm new to OpenGL Lets say I create an OpenGL window using glfw and I need the UI feature from glut (such as popup menu). Is it possible to use glfw and glut in one program? Thank you
0
votes
0answers
51 views

How can I make this tile map correctly?

I'm having the following problem creating this hexa tiled map. this is what I wanted : [EDIT] Ok I've Managed to do this: ...
0
votes
1answer
22 views

Pygame OpenGL init causes an X Error

...
0
votes
0answers
25 views

Light matrix issues

I have a simple school task, I need to draw an octahedron and a sphere with light in it. It works, but works weird I use this code 8 times with different coordinates to draw an octahedron ...
0
votes
1answer
28 views

FBO lack of 3D Precision

I am trying to do some post processing on my 3d scene. When I render directly to the screen edges are sharp, however when I render my scene to an offscreen FBO then render that to a texture that is ...
0
votes
0answers
21 views

What are these circles in the Phong model I'm implementing?

I haven't implemented the Phong model for many times but I'm confident it's correct. The only problem I've noticed is this. Seems like a quantization is taking place somewhere : I'm not sure if it's ...
0
votes
0answers
35 views

Why does this work in the fragment shader but not in the vertex shader?

I'm doing some model view and projection transforms in the vertex shader and I want to determine whether the current vertex will end up on the viewport or not. After searching a bit I found that ...
0
votes
1answer
34 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 ...
1
vote
1answer
78 views

Individual Skeletal Animation with OpenGL

I have been able to implement a pipeline in OpenGL which reads Collada files and can animate them through interpolating the keyframes. However, as somebody brand new to graphics, I don't quite know ...
0
votes
1answer
38 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
56 views

GLSL C++ Only first sampler array index is accessible

I have the following shader, which whose fragment shader contains a sampler array of 16 elements. Fragment ...
0
votes
1answer
47 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 ...