Category "opengl"

Pure OpenGL on Windows? [duplicate]

I want to use OpenGL without GLFW, the docs say that I need to add opengl32.lib to linker dependencies. How do I specifically import OpenGL an

Passing unsigned int input attribute to vertex shader

In a typical building of a vertex-array-buffer, I am trying to pass an unsigned int attribute along side other classical ones (vertex, normal, texture coordinat

SDL2 Draw scene to texture. SDL2 RenderTexture like SFML

I've been developing a 2D Engine using SFML + ImGui. The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObject

OpenGL texture gets worse when moving camera away from object

The texture gets generally worse more I move the camera away from the object. I need to be really close to the object for the texture to be fine. Does anyone kn

Why glBufferSubData is slow?

When trying to access GL_ARRAY_BUFFER using glBufferSubData to 128 byte buffer size, accessing takes at worst 200 microseconds. Instead when allocating whole bu

Why is my OpenGL texture black (in Dear ImGUI)?

In OpenGL 4.6, I (attempt to) create and initialize a solid color texture as follows: glCreateTextures(GL_TEXTURE_2D, 1, &_textureHandle); glTexParameteri(G

GL Error 1280 when enabling depth test

I'm having some problems with an opengl application I'm writing. GLenum err = 0; glEnable( GL_DEPTH_TEST ); err = glGetError(); if ( err != GL_NO_ERROR ) p

translation in GLSL shader

I'm trying to move figure inside vertex GLSL shader: layout(location = 0) in vec3 Position; layout(location = 1) in vec3 offset; uniform mat4 ProjectionViewMa

Programmatically check OpenGL support

My swing application is trying to use OpenGL to get better performance. But on some machines the UI doesnt load at all. How could i determine programmatically i

SDL2 rendering with multithreading on Raspberry Pi 2

So, we're trying to build a Real-Time System with preemption within a process, executing each task as a separate thread. To build the GUI, SDL was the library c

How to initialize a buffer object's data store with data from PyGLM?

I use PyGLM and PyOpenGL I have specified the following Shader Storage Buffer in the Vertex Shader: layout(std430, binding = 1) buffer MVP { mat4 u_proj;

OpenGL black screen(GL_PERSPECTIVE, GL_MODELVIEW problem)

I'm trying to move the perspective view, so I can see that the sun, earth, and moon is moving around on a screen. I'm keep searching and trying to fix this but

Instanced rendering using vertex attribute buffer or uniform buffer for the instance data

I have seen instanced rendering using a vertex attribute buffer. So in addition to your usual data such as 'position' and 'normal' you have an extra 'attribute'

What could be the source of this aliasing?

I am manually raytracing a 3D image. I have noticed that, the farther from the 3D image I am, the bigger the aliasing. This 3D image is basically a voxelized r

how to rotate and translate rectangle texture in shader

I'm trying to handle the transform of texture in fragment shader. the resolution of window is (640,360), the rotation is 30 degree, and the scale is vec2(0.5,0.

Unable to import opengl.gl in python on macos

I am using OpenGL to render a scene in python. My code works perfectly fine on windows but, for some reason, I'm having issues when importing opengl.gl on MacOS

opengl - how to put texture on 3d irregular object

I have to create animation where gatling gun will be shoot (it doesn't have to be complex, cause it's just a practice). I drew basic version of my gun which loo

Rotate a 3D- Point around another one

I have a function in my program which rotates a point (x_p, y_p, z_p) around another point (x_m, y_m, z_m) by the angles w_nx and w_ny. The new coordinates are

GLSL Shader does not compile, Java and LWJGL shader error

I've encountered this error a few times now when compiling my shaders. Here is the infoLog/Error Vertex shader failed to compile with the following errors: ERRO

How to Using the #include in glsl support ARB_shading_language_include

I wan't to use the #include macro to include shader files in glsl, and I heard there is a ARB_shading_language_include extension support the #include macro. Is