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
0answers
21 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
59 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
39 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
48 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
62 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
26 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
70 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
15 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
32 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
87 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
35 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
11 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
34 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
20 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
47 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
26 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
28 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
29 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
68 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
28 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
33 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
64 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
38 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
103 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
32 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
107 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
53 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
23 views

Pygame OpenGL init causes an X Error

...
0
votes
0answers
26 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
30 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
35 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
94 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
41 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
64 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
54 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 ...
0
votes
1answer
71 views

How Frustum Culling and Sky Box Working Together ? The skybox appears where it should not appear

When i did frustum culling, far parts of land not rendering. It is good like i want. But after I see sky box instead of these parts. My question is, is this normal ? Or what i need to see or what i ...
0
votes
1answer
51 views

nvidia SSAO visible errors

I am trying to add ssao effect to a visualization application but there are errors in resulting image. I am using code from https://github.com/nvpro-samples/gl_ssao . Errors occur in rapidly changing ...
0
votes
1answer
20 views

Transparency problem, phong model

It's the first time I'm trying to implement the Phong lighting model. I'm pretty sure everything is working fine. I was experimenting using different materials, meaning I played with Kd,Ks,Ka and Ns ...
1
vote
1answer
113 views

OpenGL draw functions and multi-threading. How they work together?

I want to apply multi-thread in a simple way to control and draw 4000 objects. I am using SDL and OpenGL. control : locations, collisions, calculations ... etc draw : OpenGL draw functions ...
0
votes
1answer
201 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
0
votes
1answer
37 views

Help finding coordinate for left of screen in this frustum

I have a frustum with l=-2, r=2, n=0.5, f=10, ...
0
votes
1answer
42 views

Which part of the frustum sits at the eye position?

In Java I create a frustum projection matrix via Matrix.frustumM(projMatrix, 0, left, right, bottom top, near, far); and a view matrix via ...
0
votes
1answer
80 views

How to generate or smooth really large procedural terrain?

I'm currently trying to generate a really large procedural terrain in WebGL. I use a quadtree for LOD and plan to generate 1 heightmap for each quadtree node (terrain patch). The heightmaps are ...
2
votes
1answer
70 views

How can I tell in code if vsync is disabled on desktop PC?

My game needs to behave differently to get the best performance if the user disables vsync globally (basically, I need to change the scheduling on my housekeeping operations). Is there a graphics ...
0
votes
2answers
162 views

Moving an object at an angle based on quaternion rotation matrix (c++)

I have been trying to figure this out for a while now, and can't seem to get a working method. I am building a space ship movement with the following movement keys: P = accelerate (move forward) A = ...
1
vote
1answer
27 views

Trying to translate object

I'm trying to tranlate a matrix by xy but the result is strange. can someone help me translate and rotate the matrix properly? ...