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.

1
vote
1answer
49 views

i want to upload to 2gb model animation to vram with VBO technic but i am getting this error with nvidia (with amd no error)

when i try to work with amd its working with amd hd6870 and ati x1550 but when i try to work with gtx 950 its giving this error. if i upload less than 2gb example 300mb then its working but i want to ...
0
votes
1answer
147 views

Error code 1282 when calling glDrawElements

I am trying to render my terrain using an EBO, but the function glDrawElements returns an error (1282). I tried to find out what ...
4
votes
1answer
170 views

How to create a skybox in an infinite world like minecraft?

I'm making a minecraft-clone game in C++ using OpenGL. I created a skybox using OpenGL's cube map but the camera can go outside of the skybox since it's an infinite world. Then I changed it to update ...
0
votes
0answers
24 views

Billboarding Labels Using Quaternions

I am encountering some issues with billboarding. Although my situation is a bit complicated. So, I am modeling the solar system, and I am also placing labels on everything. For an example, I'll use ...
0
votes
1answer
173 views

how to use glm::rotate with a eulerangle?

I have a vec3 to represent my object's orientation/rotation but the glm::rotate method expects a quaternion. If I just convert ...
0
votes
1answer
126 views

Minecraft/OpenGL - Create Multiple viewports

I'm working on a project for the game and i have been trying to draw a second smaller "window" that would act like a second camera, independent from the player. I have looked into glViewport however ...
0
votes
1answer
79 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 ...
1
vote
1answer
115 views

Separating game logic and rendering logic in separate static libraries

I'm trying to write a game in C++ using OpenGL. I've tried to separate my game logic and my rendering logic as much as possible, and up until now, this has worked for me. I haven't written a lot of ...
-1
votes
1answer
102 views

Interesting graphic artifact

I was exploring old Minecraft source code when I encountered this: I just wanted to know what causes such distortion and how to fix it with OpenGL?
0
votes
0answers
40 views

Ambient Occlusion Rendering

I'm having a weird issue with rendering ambient occlusion. There seems to be a screen space split that inverts the ambient occlusion. Here is what my issue looks like SSAO Image my SSAO shader ...
2
votes
2answers
192 views

Moving a camera without rolling (tumble not arcball rotation)

I'm trying to move my camera around using mouse+keyboard. I'm looking for specific camera behaviour however, and I cant figure out how to get it right. What I've found, is that to get a maya/tumble ...
0
votes
1answer
126 views

OpenGL vector rotation matrix to a given point

I have a sphere with a radius of .5 The sphere is centred at 0,0,0 I am now trying to place items around my sphere based on a given x,y,z on the surface of the sphere. My items have been draw/...
2
votes
2answers
234 views

How to draw a 3D capsule?

I want to draw a 3D capsule defined by a segment (two points start->end) and a radius: Image source: Orionist on Wikimedia Commons I already have a sphere leaning on this answer: https://...
0
votes
0answers
137 views

Fast 2D tilemap rendering using modern OpenGL

let me try to keep myself short. I will start out with trying to explain my current situation, then what I need advice for and finally my current approach. Sooo, as the title suggests, I'm trying to ...
0
votes
1answer
78 views

Sun model matrix

I'm playing with sun implementation in my engine and I correctly built model matrix using below order of matrix operations: Translate to camera position. Calculate x and y axis of rotation matrix ...
1
vote
1answer
37 views

How to organize passing data to shaders in cross-API render system?

I try to create rendering system that supports DirectX and OpenGL. I am trying to create class for constant buffer, but DirectX constant buffers and OpenGL uniform buffers have different memory ...
0
votes
0answers
61 views

Are Mutexes in OpenGL shaders possible?

I am in the process of developing a shadow system for a 2D platformer which uses a polar map that saves the closest length to a fragment from a light and doesn't apply the light to any fragment beyond ...
1
vote
1answer
168 views

How to access an uniform array with a float as index in GLSL?

I'm trying to do basic multitexturing of terrain in OpenGL. Im building the terrain with an image representing different elements (beach, water, jungle...) : Im trying to map each color of this ...
0
votes
2answers
275 views

Correctly transforming normals for G-Buffer in Deferred Rendering

I have a deferred rendering system: first there is the G buffer generation, then there is the lighting or shading calculation on that gbuffer data. However there seems to be an issue with various ...
0
votes
0answers
67 views

undefined reference to some opengl functions (glBindBuffer,glActiveTexture,glGenerateMipmap)

i am using c++,sdl-2 and opengl and i using codeblocks. when i use 32bit mingw i didnt get error like this but i tried to use 64 bit i get this error :(. i set-up mingw64 right i think i also made ...
0
votes
1answer
102 views

Using PyOpenGL, can I rotate raw data rather than the current matrix?

I'm trying to create a sort of PyOpenGL renderer for the Bullet physics engine, and at the moment I'm rotating my basic cubes with math in Python. However, if I do the math in Python that's going to ...
0
votes
0answers
28 views

Class initialization disrupts my OpenGL context and I am unable to render anything after

I have OpenGL context setup successfully, and I can draw textures on screen, but once I initialize CGEFrameRenderer (from gpu-image-library - just instantiation and calling init) I am unable to render ...
1
vote
1answer
37 views

How to store shader output to VRAM?

This is really ungrateful question to Google. Basically, I would like to know, regarding openGL, what are various methods to do some kind of computation in one of the shaders and have the results ...
2
votes
1answer
76 views

Solving a recursive problem in the geometry (or any other) shader

I would like to calculate an effect of an external force on a binary tree (wind on a tree). It's a recursive function - take a (parent) node and calculate the angle to rotate all of the nodes "...
1
vote
0answers
59 views

How to implement weighted blended order independent transparency in OpenGL?

I want to implement weighted blended OIT in my C++ OpenGL 3D game, but I didn't find any C++ examples about weighted blended order independent transparency. Paper How to clear accumTexture(...
0
votes
0answers
38 views

Finding a tile data in an array

I have tile vertices stored in an array. How would I go about finding a tile when given its position. ...
0
votes
2answers
114 views

“RuntimeError: Validation failure (0)” using shaders

I'm trying to move away from using glVertex() in my game code because it doesn't seem to work well with a large quantity of vertices. At the moment I'm trying to make code that uses Shaders, but when ...
0
votes
0answers
41 views

how can i start mipmap technic from character?

hi how can i start mipmap technic from character ? i mean example like this picture : in my code mipmap starts from camera(Near Clipping Plane). i dont want this. ...
0
votes
1answer
64 views

Skeletal animation: unexpected quarternion values

I'm following ThinMatrix's skeletal animation tutorial and his custom written Collada parser is deriving a different rotation quaternion from each keyframe matrix than the Assimp importer library does....
0
votes
1answer
51 views

VBO interleaving dillema

I'm trying to write a map editor for a unity game using openGL. In order to do that, I need to unpack it's resource files to get meshes, textures and other good stuff. In doing so, I've discovered ...
1
vote
1answer
56 views

How to decide how many textures to break an object into?

So I am making a couple spacecraft in my game. And I want them to look sharp and as photorealistic as possible. How can I decide if a certain craft should be broken into multiple meshes to each ...
0
votes
0answers
23 views

How do you calculate the center point of a skeleton when the pelvis is the root bone?

I have the center point of where the skeleton is supposed to be positioned. The root bone is the pelvis which is not the center of the skeleton in the y plane. I don't want to hard code the delta ...
0
votes
0answers
28 views

offset texture attached to frameBuffer to render panorama

I would like to pre-render horizon of large landscape to texture and than paste it as cylindrical screen around the camera (to accelerate rendering of distant details) Easiest would be make 8-gon ...
0
votes
1answer
324 views

Camera Pitch, Yaw from View Matrix

I have a camera that works with Pitch and Yaw (no roll) and compute the look at matrix as following : ...
0
votes
0answers
99 views

Implementing a wobble effect for speech bubbles in Unity?

I'm working on a little game in Unity 3D and I'd like to replicate the wobble effect seen on the speech bubbles in the game "Night in the woods", as seen here: https://www.youtube.com/watch?v=...
0
votes
0answers
72 views

Performance comparison of reading Depth Buffer or texture in fragment shader

My requirement is to render per pixel data (say pixel transparency) to some buffer (say render pass 1) and then render a shape using the per pixel lighting rendered in shape 1. I can use depth buffer ...
1
vote
0answers
31 views

Choosing a draw call when not reusing vertex data

Up until now I've always used glDrawElements, and have my vertex and index buffers bound. From what I've read, glDrawElements is ...
1
vote
1answer
33 views

Does gluLookAt add or set the view matrix variables?

I'm trying to rotate the camera view in PyOpenGL, but it's not working well. The weirdest behavior I've noticed is that putting gluLookAt in a loop seems to change the camera view, even when I'm not ...
0
votes
0answers
148 views

Why ImGui not rendering image correctly in my game ui

[Scene:] I am working on a game project.In a part of my project,I have to do following things. 1.Read a image 2.Detect face(I am using opencv) 3.view in my imgui window using ImGUi::image() I ...
0
votes
1answer
80 views

Intel GPU running faster than Nvidia GTX 1060

My app in its current state renders only 2 triangles to the screen using OpenGL. I am using std::chrono::steady_clock for frame counting. With Intel graphics, I ...
0
votes
0answers
33 views

How widely supported is glBlendFuncSeparate

I need to use glBlendFuncSeparate to implement this answer. I'm implementing this in a rendering engine that needs to run on multiple platforms (ios, android, ...
0
votes
0answers
78 views

Particles Artifacting on Unity games running OpenGL 3.0

Before I begin: I am using a Samsung Galaxy Note Fan Edition (Note7) on Android 8.0.0 and Experience UI v9.0, with the Exynos 8890 SoC, which included the Mali T-880 MP12. I have been encountering ...
1
vote
3answers
298 views

Why is OpenGL displaying this specific color as white?

I have a sprite class that is supposed to make a 2D rectangle based on the location, colour and size of the rectangle. I have created a renderer class that uses this sprite class to create buffers and ...
1
vote
0answers
76 views

Development decision: how to proceed regarding OpenGL [closed]

There is a 3D app developed by someone with OpenGL almost 2 years ago. The development is not finished by the previous developer and I'm assigned the task to finish it, based on customer requests. I ...
1
vote
1answer
496 views

How to create a 2D fog shader?

I am trying to write a fragment shader in GLSL for a fog effect in a 2D game. Here are some links showing what I'm after. Here the fog is in the foreground and near the ground: https://twitter.com/...
7
votes
1answer
6k views

Can I sell a game made with OpenGL?

I love creating games, and I've always made games using OpenGL and not with game engines such as Unity or Unreal. Can I legally sell the games I made with OpenGL?
1
vote
1answer
111 views

I don't understand code that builds 3D sphere

I'm trying to learn some lwjgl and opengl, and I was trying to make a 3d sphere etc, I found a code to do that, but I don't 100% understand the code and the math behind it and would like to get some ...
1
vote
0answers
123 views

How is terrain editing implemented like a sculpt tool?

Some creativity/sandbox games have a terrain editing feature. When thinking of a terrain, I'm thinking of a grid of vertices. The elevation of each vertex is then determined by a heightmap (image). ...
1
vote
0answers
137 views

Plotting 2D map coordinates to OpenGL 3D projection

I’m trying to convert a 2D map created in my map editor to a 3D plotting with OpenGL. This is my map generated in my map editor: Those vertices are relative to my Cartesian origin world coordinate (...
1
vote
1answer
56 views

Does GL Memory model guarantees that late Depth Testing accesses depth buffer values in same draw call

Suppose I issue a draw command that draws 3 overlapping triangles (T1, T2, T3). Fragment shader assigns Depth = 3 to T1 fragments, 2 to T2 and 1 to T3 fragments. Depth Buffer is cleared to 0 before ...