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
1answer
22 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
32 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
16 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
14 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
19 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
23 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
18 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
24 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
50 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
71 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
23 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
31 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
38 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
21 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
56 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
19 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
48 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
47 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
18 views

Pygame OpenGL init causes an X Error

...
0
votes
0answers
24 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
26 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
20 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
33 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
21 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
47 views

Good way to dynamically set uniforms during rendering (C++)

I'm trying to create a renderer generic enough so that it can dynamically set uniforms for a variable number of shaders. For instance, say mesh A uses shader A; mesh B uses shader B. "shader A" ...
1
vote
1answer
64 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
34 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
51 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
44 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
63 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
48 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
12 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
78 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
55 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
38 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
53 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
60 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
91 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
26 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? ...
1
vote
1answer
40 views

Problem with rotation a camera with the mouse OPENGL GLFW

I am trying to move my camera with my mouse, I can translate it juste by changing the current position of my camera, but when I want to move my forward vector and my up vector of my camera it doesnt ...
0
votes
2answers
78 views

glDrawElements draws nothing

As the title says…. :( nothing is drawn on screen… is there something I'm missing? ...
0
votes
0answers
27 views

can i use smooth normals and normal mapping together?

I am trying to use smooth normal and normal mapping together. And I made a test. In this test I draw a cube and man. They are using same vertex shader and fragment. I load them same md5loader ...
0
votes
0answers
27 views

Picking object using ray tracer in opengl using inverses

I have a scene with many objects and I'd like to be able to pick them out using ray tracing. I used to have just model transformations happening in the vertex shader and I was able to pick out the ...
1
vote
0answers
40 views

Is there a library like ImGui with the ability to customize frames, buttons, sliders, etc. in the windows for OpenGL [closed]

I'm trying to write a game on OpenGL using C++. From third-party libraries for creating windows (widgets?) Inside OpenGL, I was able to add ImGui to my project, create a window and attach some ...
0
votes
2answers
100 views

Game assets are images or 3D models

I am new to game development and I have created simple games with javascript and SFML. Those games are 2D and there I used images as my gaming assets. I was trying to be familiar with OpenGL like 3D ...
0
votes
1answer
65 views

Perspective Matrix doesn't work OpenGL 4

I tried to implement my own perspective matrix and it doesn't work. I don't understand why. With just with my view matrix (without Perspective Matrix) I can see my mesh. Here my view matrix : ...
1
vote
0answers
38 views

How can switch GLSL “version #120” to “version #330”?

I am using GLSL "version #120" and i want to change it with "version #330". I added "GLM" library for this purpose. But i have some problems. Therefore i will ask you what is equal to this setting ? ...
0
votes
1answer
40 views

Can I use glTranslate and glRotate when my GLSL Version over (#version 120)?

I was using "GLSL Version #120". But now i am trying to do one tutorial and it is using "gl_ClipDistance[0]" inside of vertex shader. And "GLSL Version #120" doesn't support "gl_ClipDistance[0]". Now ...