Tagged Questions
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 ...
0
votes
0answers
7 views
Frustum Culling is incorrect
I have checked the other posts on here, but haven't found a suitable answer. I'm trying to implement frustum culling using the Gribb-Hartmann technique, but am running into a strange issue where ...
0
votes
0answers
6 views
Flipped model has wrong triangle order
I have list of models and transform matrix for each of them. Some of models are flipped along X or Y or Z axis. This meshes will be rendered wrong, back face is rendered instead of front.
I tried to ...
1
vote
0answers
8 views
How to assign texture to shader?
In OpenGL, most shader uniform variables are easy, a float or a vec3 or whatever is associated with a shader program. But samplers are different, we associate a texture unit to the shader program, and ...
0
votes
0answers
16 views
Modern OpenGL, rendering multiple obj objects not working
I am currently working on a 3D Game Engine that loads a level from an OBJ file and renders it with OpenGL. My problem is related to understanding how to render each object individually when i have ...
0
votes
0answers
16 views
postprocessing shader destroying viewport on linux?
Basically I implemented gamma correction into a q3 based game to get rid of the annoying SetDeviceGammaRamp.
On windows and macosx everything works fine, but on linux it draws garbage. It looks like ...
3
votes
1answer
53 views
How can I efficiently represent territories and their borders on a map like if it was a Risk board game?
Good day,
I am currently brainstorming ideas and exploring different features for an upcoming project of my own, and I am exploring the idea of programming a territory control based RTS. These ...
0
votes
0answers
16 views
Coordinate system in OGLdev tutorials
Working with OGLdev tutorials http://ogldev.atspace.co.uk/ I found that this code uses coordinate system, which doesn't look like in most other samples. Positive x-axis direction is left, and not ...
0
votes
0answers
29 views
Looking through transparent voxels doesn't show other blocks
In my voxel game, looking through the transparent water blocks can sometimes cause blocks in other chunks not to show.
The water is in its own VBO, and the face facing the other chunk (in the ...
0
votes
0answers
22 views
Old frame is suddenly rendered when using OpenGL on Windows [on hold]
We have an odd bug on Windows, when older frame is suddenly rendered. Frequency and duration of the issue depends on GPU and size of the window: lower specs / higher size make it worse.
...
0
votes
1answer
39 views
How to use multiple custom vertex attributes in OpenGL
My code currently uses glBindAttribLocation and glVertexAttribPointer to specify two custom vertex attributes in indices 6 and 7. This seems to work fine, but I wish to add another attribute and no ...
3
votes
1answer
43 views
OpenGL Indexed VBOS?
I'm a little confused with using indexed vbos in opengl. I understand that different each vertex can only have one uv. How would it be possible to map a texture onto a 3d object if you can't "unwrap" ...
1
vote
1answer
40 views
Runtime resolution changing with GLFW3
I've been trying to figure out the correct method for changing the resolution/fullscreen state of a GLFW window for a while now, but after searching all I found were references of how to do it with ...
2
votes
1answer
102 views
Why encode floats in RGBA?
Working on some effects that require depth (Z) data in Unity, I saw that these use a method to store the depth data encoded in the RGBA channels of a regular texture.
half4 frag(v2f i) : SV_Target
{
...
3
votes
1answer
166 views
+150
How does glRotate affect the axes of the global coordinate system?
I am currently playing around with 3D transformations applied on a 2D context in LWJGL, to later be implemented in my game. So I managed to set up LWJGL well enough (scaling, translating, scaling and ...
0
votes
0answers
16 views
Compiling glfw application mingw
I am trying to compile a glfw application on mingw.
I am using 64 bit windows and 32bit mingw compiler And I have downloaded 32 bit binaries from http://www.glfw.org/download.html I am trying do by ...
0
votes
0answers
17 views
UDK's fractured mesh equiv. for lwjgl? [closed]
Does an equivalent of UDK's fractured mesh exist for OpenGL/lwjgl? How trikcy would it be to code one up?
0
votes
0answers
27 views
OpenGL Shader Storage Buffer Objects array length problem
Ok guys, I think I have a very strange problem.
I have an old laptop, but its HD 6370M currently supports opengl 4.4, so i decided to learn how to use some new features of this platform, so after ...
0
votes
1answer
43 views
Should I update VAO when I update a VBO?
My VAO/VBO/IBO work fine on iPad and other devices on Android excepted two (A Samsung galaxy S4 and a Sony Xperia S).
A problem is present when I start my application on this devices, every elements ...
9
votes
2answers
170 views
+50
Rotate object around fixed axis
I am trying to let the user of my app rotate a 3D object drawn in the center of the screen by dragging their finger on screen. A horizontal movement on screen means rotation around a fixed Y axis, and ...
2
votes
0answers
31 views
Rendering text with SDL2 and OpenGL
I've been trying to have text rendering in my OpenGL scene using SDL2. The tutorial I came across is this one Rendering text
I followed the same code, and I get text rendering fine. However the issue ...
1
vote
0answers
30 views
Performance issues with different types of uniform buffer
I've tested different buffer layouts, because I'm confused about some performance issues. That are my test buffer (OpenGL 4.1, GLSL 410, GT 750M, MacBook Pro):
Test #1: Using fixed struct buffer with ...
-2
votes
1answer
67 views
Collision Detection in OpenGL
For a 3D Game using OpenGL i have to implement a simple collision detection. After thinking about that, i have had the idea to read out the glm::mat4 MVP values and compare them to each other. Is that ...
0
votes
1answer
48 views
How to use a buffer in GLSL to do a LUT-lookup?
I am currently on a medical application which needs different kinds (up to totally individual) lookup tables (LUT) for image display. And this done with 10bit finish. So it is most of the time ...
0
votes
0answers
41 views
Pre- or post-multiplication for rotation between coordinate frames
I have three 3D coordinate frames: O, A and B, as shown below.
I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move ...
0
votes
0answers
13 views
converting HSLS gives error
I'm using the following parser:
https://github.com/unknownworlds/hlslparser
I also have the following code:
/*
* Bo Sun, Columbia University, All rights reserved
* ...
0
votes
0answers
22 views
Rotating between two coordinate frames
I have two coordinate frames, A and B. I want to create the rotation matrix RAB which takes you from A to B. A is a right-handed system, and B is a left-handed system. Furthermore, after moving from a ...
47
votes
2answers
5k views
What is Vulkan and how does it differ from OpenGL?
Khronos Group (the standards body behind OpenGL) has just announced Vulkan:
Vulkan is the new generation, open standard API for high-efficiency access to graphics and compute on modern GPUs. This ...
1
vote
1answer
55 views
Calling Shader Functions Inside Other Shaders
I'm new to OpenGL and GLSL, and bit confused about calling conventions of shader functions.
I'm trying to implement various procedural noise algorithms in GLSL. I'd like to have separate files for ...
0
votes
1answer
12 views
Slick2D crashes on Image.getGraphics() on some machines
On some machines, creating a new Image and calling getGraphics() on it causes lwjgl to enter into some kind of faulty state that crashes when swapping buffers. Any idea what causes this and how to ...
0
votes
0answers
44 views
OpenGL messy lighting on sphere [closed]
I made a set of objects that are animated and move around the screen. The animation looks fine, but I'm having issues with the material settings. The lighting on the sphere looks very bizarre. A ...
1
vote
1answer
73 views
How do I get GLEW to use my Nvidia GPU instead of an integrated Intel card?
I'm new to graphics programming, though not to coding generally. I've been learning opengl from the OpenGL Superbible, 6th Edition. I was trying out the shader examples from the book but couldn't get ...
0
votes
1answer
42 views
How to draw the simplest grid map OpenGL 1.0 [closed]
I want to draw a simple black & white grid map, like that:
I have been searching for a way to generate tile, a tile map and tho and I want to draw this map and thats all. I mean that I want to ...
3
votes
1answer
118 views
What are the advantages of tangent space shading/lighting, and what about attenuation?
In several topics here it was suggested by people that doing lighting in tangent space is better than doing it in world space. Right now I am doing it in camera space, but it's really similar to world ...
0
votes
1answer
17 views
Loading Indices Collada File
I have been writing a COLLADA loader in c++ and I have run into a problem loading the indices for the mesh vertices whenever I try and find what indices correspond to the vertices and I try and draw ...
0
votes
0answers
35 views
Why are my OpenGL textures warped?
I am writing a graphical program using OpenGL for rendering, Assimp for mesh loading and SDL for window etc, but also image loading.
As can be seen in the image, the white outlines at the left of ...
0
votes
0answers
27 views
How to clip or mask entity in adnroid/andengine?
I want to implement masking with sprite in Andengine. I want same functionality as in ios class called
SKCropNode
which works like an masking node!
Is there any workaround like this in ...
0
votes
0answers
34 views
How much is atomicAdd slower than an atomic counter?
I am considering replacing an atomic counter in my shader code with a SSBO an atomicAdd operation. What I need to know is the difference in performance of these two. I know the atomic counter executes ...
0
votes
0answers
39 views
Good system for experimenting with shaders in different languages
I'm trying to experiment a bit with shaders and they have been programmed in several different languages (GLSL, Cg and HLSL). Now most systems (dirrectX, openGL) have only support for one of them. ...
0
votes
1answer
60 views
Confused with how I should organize my code in a 2D game using OpenGL [closed]
I've just now started learning OpenGL and I'm getting very overwhelmed and confused with some things. I don't want to permaturely optimize things, but I also don't make decisions about things I still ...
0
votes
1answer
38 views
Rotate a plane defined by its normal and its distance
First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
0
votes
0answers
41 views
opengl shaders getting started problem
I'm following this tutorial for shading in opengl. However I wanted to start with another shader to make things more interesting
So this gives me the following code:
// Include standard headers
...
-1
votes
0answers
13 views
GLUT not taking key input [duplicate]
I'm pretty sure I'm using input correctly, I even copied source code to test it, but nothing will happen. I use this code and
def keyPressed(*args):
if args[0] == 'w':
print("bruh")
...
1
vote
1answer
81 views
How to draw a mini map OpenGL & OpenGL ES?
I'm trying to draw a mini map. Succeeded to put current screen to smaller screen (mini map) via FBO.
But I do not know how to make the mini screen brighter when hover. You can imagine that, the real ...
1
vote
2answers
52 views
glsl uniform int as index of const array
I have a const array that define a few materials for directionnal light. I'd like to change the material using an uniform int as index of that array. Doing that leads to severe framerate drop.
I know ...
2
votes
1answer
160 views
What version of OpenGL should I target for Steam?
I'm planning on developing a game (targeting towards PC and Linux) and putting it up on Steam in the future but I am not sure of what version of OpenGL to target so that the majority of steam users ...
0
votes
0answers
24 views
Collada Animation leads to distorted model
In collada the skinning equation is : v += {[(v * BSM) * IBMi * JMi] * JW}
I'd like to clear something.
1) BSM = bind shape matrix , located in the tag "bind_shape_matrix"?
2) IBMi = inverse bind ...
0
votes
1answer
28 views
How can I render a simple lattice in LibGDX?
I have searched all over, but I can't find what I think will be a simple answer. I am using Opengl ES 2.0, and LibGDX. I simply want to use GL_LINES primitives to create a lattice structure.
I have ...
1
vote
1answer
80 views
SDL & OpenGL - Artifacts when multisampling
Im trying to render a model with anialiasing using OpenGL and SDL, but when I do I get strange artifacts.
When I render with antialiasing disabled everything looks fine.
When antialiasing is ...
2
votes
1answer
78 views
Is there a way to manipulate a pixel Array on the GPU?
I'm currently working on a 2D-Game and i want to draw and calculate the whole screen myself through a pixel array. I'm programming in C++, using SDL 2 and OpenGL specifically a OpenGL Texture which is ...
0
votes
2answers
58 views
node-webkit and OpenGL 4
Is there any way to get OpenGL 4 to work within a node-webkit app? It would have to be OpenGL 4 and since it's running on a desktop app I would think there must be a way to get it to work. I can't ...