0
votes
1answer
61 views

Distorted LookAt When Looking Up or Down?

I have a weird problem and I have no idea what's going on with it. Recently started doing some OpenGL programming, going pretty well, hit some rough spots but worked my way through them and otherwise ...
2
votes
1answer
183 views

How to crop camera's viewport?

I'm making an Android game using LibGDX. I want to do something hard to explain but I'll try nonetheless. Look at this camera view (it's from 3ds max): I can get same exact view in LibGDX without ...
0
votes
2answers
604 views

Screen or World Coordinates to tile Coordinates

I have Plane made of tiles in opengl. I start drawing them at (0, 0, -20) after that i do my translations so that the view is rotated somewhat similar to an isometric (kind of) perspective. I'd now ...
0
votes
0answers
136 views

Correct way to calculate Perspective Matrix [duplicate]

I have seen at least 3 different ways to calculate the perspective matrix and I'm confused as to which one I should be using and what the differences are? OpenGL says to do it this way: f = ...
0
votes
1answer
173 views

Ways to “invert Z-axis” in shader-based core-profile OpenGL?

In my hobbyist shader-based (non-FFP) GL (3.2+ core) "engine", everything in world-space and model-space is by design "left-handed" (and to stay that way), so X-axis goes from -1 ("left") to 1 ...
3
votes
1answer
273 views

How to do perspective projection “parallax” but without changing the scale or offset of objects?

Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
1
vote
1answer
414 views

OpenGL fovx question

To boil my question down to the simplest form, I fear I am oversimplifying how mat4 perspective works. I am using mat4.perspective(45, 2, 0.1, 1000.0) (the binding is WebGL fwiw). With a fovy of ...
-1
votes
1answer
470 views

How to fix OpenGL Co-ordinate System in SFML?

My OpenGL setup is somehow configured to work like so: (-1, 1) (0, 1) (1, 1) (-1, 0) (0, 0) (1, 0) (-1, -1) (0, -1) (1, -1) How do I configure it so that it works like so: (0, 0) (SW/2, 0) (SW, 0) ...
4
votes
1answer
617 views

The Depth buffer and Perspective

I'm having trouble understanding the behaviour of my OpenGL program; and in drawing my Z-Buffer out to the screen. It will probably be best to just start with code, here is my GLSL shader: in vec3 ...