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

Help with dual quaternion skinning

I'm trying to convert my code to use dual quaternion skinning instead of matrix skinning because i just can't get the skinning matrix created correctly from bones+weights using matrices. Edit: just ...
0
votes
1answer
222 views

Offset on camera following object that accelerates

I have camera a that is actively following an object (a plane) from behind. This object can accelerate or decelerate. I would like to have a camera offset when I move the plane, so it doesn't look so ...
4
votes
1answer
2k views

Why is my model rotating opposite direction around the Y axis?

I have a simple scenario. I have a simple scene, and in it I'm drawing a grid and a model, with some axis for orientation. I noticed when I rotate the model about it's local Y axis, if I rotate the ...
3
votes
2answers
2k views

How to smooth mask texture edges correctly regardless it's size

I have a texture intended as a mask. The texture type is GL_R32F (32 bit float) and the data inside is a signed distance field (= value of each texel is distance to ...
0
votes
0answers
11 views

Skinning on simple model doesn't work as expected

I have created a simple application to make skinning work with OpenGL. so I want to share with my vertex shader: ...
1
vote
2answers
1k views

Playstation 4 OpenGL ES support (or Xbox) [closed]

I know that the Playstation 3 supported at least OpenGL ES 1.0, and the Vita OpenGL ES 2.0. But what about the Playstation 4 (and/or the new PS4 Pro)? Does anyone know for certain if it has native ...
0
votes
0answers
19 views

OpenGLHow to fit a texture to a curved plane with GL_CLAMP

I'm trying to fit a texture on a curved plane made from some triangles with GL_CLAMP, because GL_CLAMP_TO_EDGE is not available ...
0
votes
0answers
32 views

Single Array Texture, multiple wrap modes

I have a array texture of which I would like some of its sub-images have wrap modes of GL_REPEAT and others to be ...
27
votes
4answers
62k views

Fastest way to draw quads in OpenGL ES?

I am using OpenGL ES 2.0 I have a bunch a quads to be drawn, would love to be able to have to pass only 4 vertices per quad as if I were using GL_QUADS, but basically I just want to know the best way ...
0
votes
1answer
96 views

How to correctly reset vertex attributes after modification

I am trying to use the same vertex shader for two different use cases to preserve memory, but I am having issues where the modifications of one shader run are passed on to the next run, even after ...
0
votes
1answer
812 views

Adjusting view matrix when glViewPort & resizing

I have an issue when my window resizes. I have a simple MVP shader like this gl_Position = projection * view * model * vec4(in_Position, 1.0); to render a map ...
1
vote
2answers
1k views

What is the difference between OpenGL, SDL, DirectX, GLFW, GLUE?

I have not work with graphics yet but I'd like to know its concepts at some high level overview. I was told that OpenGL and DirectX are somehow programmed into my graphics card, and I can use GLFW, ...
-1
votes
1answer
24 views

How can I add one OPENGL page to another when ENTER key is pressed?

I created one GLUT project which has my project's introduction page. When I pressed ENTER key, it should redirect to my front page of project which I created as another project.
4
votes
2answers
1k views

OpenGL GLSL using projection,view and transformation

I have been trying to get a simple triangle to render on the screen. I am using Projection, View and Transformation matrices but am unable to get anything to the screen. Main loop ...
0
votes
1answer
423 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
1answer
180 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(...
1
vote
1answer
174 views

OpenGL texture2d/image sampling issue. Strange artifacts in texture

I have an issue when using textures in OpenGL, strange artifacts occur where geometry overlaps, but not always. Video Reference. I am using a GL_TEXTURE_2D with <...
0
votes
2answers
46 views

How to process events as well as do OpenGL rendering using multithreading?

I am working on a very complicated graphics rendering, using OpenGL, and it is very time consuming, in the sense that it creates a delay in the event handling, of my application to an extend that, the ...
0
votes
1answer
176 views

opengl bump mapping (normal mapping) problem with VBO and GLSL

hi i am beginner i am trying to implement bump mapping with vbo and glsl. My question is: did i make bump mapping ? if i did why these edges didnt disappear ? high and low meshes (i used low meshes ...
0
votes
1answer
113 views

Can we flip znear and zfar so that positive z values increase away from the viewer?

I am confused about the projection matrix in OpenGL. i have a habit of writing the code as follows. ...
6
votes
3answers
7k views

What is the best and simplest way to get input text from user in an OpenGL app?

I have an OpenGL game and and I want to implement a simple way for the user to enter data/text in an input box. What is the easiest method to do this?
0
votes
0answers
32 views

What does glBlendFunc(GL_DST_COLOR, GL_ZERO); mean?

I need to write a description about a filter method I made but I don't know what glBlendFunc(GL_DST_COLOR, GL_ZERO); means.
1
vote
1answer
1k views

Depth texture white in shader

I am trying to implement shadow mapping into my project and am stuck at this problem: If I'm reading the shadow map values with glReadPixels and linearize those ...
4
votes
1answer
2k views

SDL2, OpenGL, Nvidia laptop screen tearing

EDIT 2017-05-14 dvb. Issue still active to this very day, see geforce forum link in main question. Note 3: "Stoltverd" has posted a "fix guide" on geforce forum. It has workarounds for non-OpenGL ...
2
votes
1answer
1k views

Converting Euler rotation angles from Z up to Y up (Max to OpenGL)

I'm working on pulling geometry and it's transformation from a 3DS Max exported FBX (Z-up) to an OpenGL model format (Y-up). The main problem is I intend to keep the transformations as Translation and ...
1
vote
2answers
21 views

unsmooth blending with deferred shading and light volumes

So I implemented deferred Shading with a single full screen light pass (picture 2) (by passing the light-data as an array to the shader) and deferred shading with point light volumes (picture 1) (by ...
0
votes
1answer
40 views

What is the proper way to create a camera matrix?

I am having issues when trying to create a camera transform. It seems to have odd distortions and it does not seem to rotate properly, though it will translate alright. While I have seen issues like ...
4
votes
2answers
251 views

Fine tuning light shader mechanics

I'm currently trying to implement the lighting technique described in this article. I've done pretty much exactly what is done in the article. My technique is the same, and my shader is the same. ...
0
votes
1answer
37 views

Distance between moving, rotated rectangles in snake game

I am trying to implement basic Snake game with movement based on timestep. For now I've got something along those lines: Update function: ...
0
votes
1answer
24 views

convert world to screen coordinates with camera position and camera angle

Heyho :) I'm trying to convert world coordinates to screen coordinates. I have available: fov, screen width, screen height, camera position, camera angle and obviously the position of the object in ...
1
vote
1answer
766 views

Difference and interaction between Viewport and Camera

I'm very very confused about some very basic concepts in game/grafical developing. The interaction between the individual components (camera, viewport, window-sizes, gameworld-sizes, ...) when ...
0
votes
2answers
66 views

Vertexes passed to OpenGL becoming zero

I've got two methods of test code. The first uses a single VBO with the vertices and texture coordinates interwoven to draw a square to the window. The second uses an array of three VBOs to define the ...
1
vote
2answers
84 views

Parts of 3D model disappear during animation

I'm trying to properly play an animation done in Blender 2.8 inside my OpenGL application. When the animation is running, it happens that at some particular frames, some parts of the 3D model "...
1
vote
1answer
968 views

Rotate camera around its center in 2D

I'm currently trying to develop my own little game engine (trying to understand maths in games). I have implemented 4x4 matrices and 2d vectors (I don't need 3d since I'm aiming at orthographic ...
0
votes
1answer
496 views

Rendering to framebuffer / multiple rendering in a frame makes geometry black

I'm trying to adapt the shadow-mapping process given on this microbasic guide into my game, it's made with LibGDX. I've run into a blocking point with the creation of the shadow buffer via rendering ...
6
votes
2answers
330 views

How to generate a multiplier map for radiosity

I am following this tutorial: here I am at the part where you are creating a hemicube. I have got the code to render the scene into a texture and therfore an array. Now how can I generate a so-called ...
4
votes
3answers
9k views

How do I render .dae models?

I'm building a game for iOS. I'm quite new to OpenGL but what I want is to take a 3D model I have made in Google SketchUp and use it in my 3d game. The problem is I don't know how to proceed. I have ...
2
votes
0answers
31 views

OpenGL : Blending & feedback effect

I'm struggling on a simple project, as an example/sandbox, I'm rendering a small oscillating rectangle on my output. I'm not using glclearcolor() but instead, on ...
0
votes
1answer
19 views

Depth to World Space Position problem

I am having a problem with turning depth to world space position. I am using GLSL. What could go wrong? Here is the code: ...
1
vote
2answers
709 views

Proper way to update pixel array data

For a game that updates a board every frame I am calculating the next arrangement of board, updating pixel array data and render board as 2D texture to quad the size of the screen using OpenGL. I use:...
0
votes
0answers
48 views

OpenGL fixed function - WASD 2D movement

I need to make a simple object (like a turtle) move on a 2D scene. The keys w, s, a and <...
1
vote
1answer
88 views

OpenGL - Debug version runs faster than Release version

My Visual Studio 2019, 64-bit version of Tetris using OpenGL runs significantly faster, 3X, in Debug mode than in Release mode. The image above shows the board. Each cycle of the rendering or game ...
4
votes
0answers
74 views

Why use sprite tile maps on the GPU in WebGL?

I'm trying to figure out the best way of rendering my layered tiled maps with WebGL, and have come across this tutorial several times: https://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html ...
1
vote
1answer
41 views

Seam on UV Sphere

I created a uv sphere model in Blender, and I'm loading it as an obj into my OpenGL game. I'm attempting to model a 2d image as a texture for this sphere to make the moon, but I've run into this issue....
1
vote
1answer
75 views

Why does my stencil buffer allow pixels through?

I'm rendering a scene using OpenGL. The scene consists of a grassy environment and a small lake (visible as two surfaces). To achieve water surface transparency, I'm using a stencil buffer to render ...
1
vote
1answer
52 views

Problems with porting LWJGL code to C++ (glDrawElements call returns error 1281/GL_INVALID_VALUE)

So, as the title might suggets, I'm currently trying to port a gui stack for my game engine from LWJGL(Java) to C++.I originally had this following code in java: ...
0
votes
1answer
393 views

NiftyGUI - Text isn't rendering

I am trying to create a gui with nifty on top of lwjgl. I've already had some problems during the Nifty setup, however now Nifty is set up and running correctly but for text rendering. Here is my xml ...
8
votes
2answers
4k views

For Vertex Buffer Steaming, Multiple glBufferSubData VS Orphaning?

I was learning OpenGL recently. In games, we need to update the position of game objects frequently, and they will come in & out of screen constantly. So it means in rendering we need to update ...
16
votes
3answers
20k views

When to use a vertex array and when to use a VBO?

I'm trying to learn about vertex arrays and vertex buffer objects, but I don't understand the differences in terms of: case-of-use (static geometry like terrains, geometry that changes every frame ...
1
vote
0answers
33 views

How can I reduce a frustum to the subset that passes through a portal AABB?

I'm trying to implement portal based occlusion culling: There are sectors and portals. When a portal is visible, the sector it is connected to is rendered. The sector is made of polygons and ...

1
2 3 4 5
82