Category "opengl"

Repeat a cubemap texture on a cube face with OpenGL

Is it possible to make a cube map texture (GL_TEXTURE_CUBE_MAP_POSITIVE_X...) repeat on a given face with OpenGL? I have a simple unit cube with 24 vertexes cen

No context error in Java, but the context is set immediately after window creation [closed]

I'm trying to make a game using LWJGL 3, but I get this error: No context is current or a function that is not available in the current contex

Why does my camera ray have an offset when clicking near the edges of the viewport?

I'm working on a 3D project in OpenGL. Picking objects is my thing to worry about, but right now I can't get the main thing working. Which is casting a ray from

How to combine 2 post effects opengl?

i have noise posteffect if(noise){ float y = rand(TexCoords.xy, time); if (y > 0.975) { float x = rand(TexCoords.xy, time);

Drawing a 3D cuboid and rotating it in OpenGL

I am trying to draw a 3D cuboid by clicking on one of the corner points and then extending it based on the dimensions provided by the user, and then rotating it

Screen space reflections bug

I try to implement screen space reflections in my graphics engine using ray marching algorithm. I've got weird results, which you can watch in the video: https:

How to add to opengl pygame VBOs from another process

The problem I'm just trying to make a game like minecraft, but I just can't add to a vbo from another process. The strange thing is that the logs appear two tim

How to show cursor during application debug c OpenGl on ubuntu in Visual Studio Code

window = glfwCreateWindow(winW, winH, "TestApp", NULL, NULL); After calling this command, the mouse cursor disappears. When a breakpoint is triggered after thi

Understanding shadow maps in OpenGL

I'm trying to implement omni-directional shadow mapping by following this tutorial from learnOpenGL, its idea is very simple: in the shadow pass, we're going to

Can I use an integer texture as if it was normalized?

I have a texture that has the format GL_RED_INTEGER. This texture has been generated with a compute shader. I have another shader that I use for debugging that

How to properly use glTexImage2D to render an object each frame?

This is the code for a ground object that gets rendered every frame in a game I'm making with c++ and openGl. Ground::Ground() { this->loadedObject = loa

Letters not rendering with stb_truetype

I'm working on an OpenGL project and I'm using stb_truetype to render text in my game. The first font I tried (which was a .ttf file which had an OpenType forma

Enablin vsync in qt

I'm making an application in c++ and Qt. I'd like to know if the settings below are enough to have vsync enabled automatically by Windows for qt application. ev

YUV420p render in OpenGL (converting to rgb in fragment shader)

I’m trying to display YUV420p video using OpenGL. I understand how it is supposed to work (uploading Y, U, and then V buffers in separate textures while p

PyOpenGL texture isn't displaying correctly

I was trying to put texture onto quad with this code: import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * from PIL import

Second call to glDrawElements() takes 1.8 seconds in debug or release

The first frame takes forever to render, and I've narrowed it down to my second call to glDrawElements(). How weird. Here's the relevant code, obnoxious logging

Why is this texture displaying all black?

Here is the function where I am calling all of my draw operations. I also compile the shaders inline in the function. It displays the quad correctly when I just

no NPOT issues on msvc but when on mingw-w64 the screen stays blank

I'm using olc::PixelGameEngine and I'm using the Example Program except that I'm enabling STB image. on MSVC, PGE worked great for several months without any is

Cannot get gfwl source package to work in vscode

I wanted to learn OpenGl because I was just getting into c++ and I thought it would be cool to learn but now I'm stuck and I don't know what to do. So basically

glTexImage2D - channels count as the internal format

OpenGL 2.1 documentation says that glTexImage2D accepts channels count as the internal format. How does choosing the internal format work in such scenario ? Doe