Questions tagged [glfrustum]

11 questions
3
votes
2 answers

how do i calculate glFrustum parameters?

I have this code: /* * This is a simple program that computes FPS * by means of a circular buffer */ #include //#include #include #include #include // Number of elements in the circular…
Lore99
  • 31
  • 1
1
vote
1 answer

Perspective drawing in OpenGL using glFrustum

I'm trying to draw a cube in cabinet perspective. This is the cube in glOrtho: Other faces: Back - cyan, Left - magenta, down - blue This is what I get This is what I want to achieve My code: //init function glClearColor(1, 1, 1,…
Ernesto98
  • 58
  • 2
  • 8
1
vote
1 answer

How do reverse perspective with OpenGL?

I'm looking for a way to do reverse perspective with OpenGL and C++. For now, I'm using glFrustum to have a classic perspective, but I would like to know if a reverse pespective as presented here (https://en.wikipedia.org/wiki/Reverse_perspective…
0
votes
0 answers

OpenGL How glFrustum() works?

As far as I understand, the value of near is always greater than far value. (near 1f, far 0.4f here). Gl.glFrustum(-1f, 1f, -1f, 1f, 1f, 0.4f); since the Z axis is directed towards us, and the further away we are from it, the smaller the value. I…
Vs_De_S
  • 155
  • 1
  • 6
0
votes
0 answers

Is it possible to render only a clipping-area of what gluLookAt sees?

Is it possible to "look at" an OpenGL scene which was rendered at e.g. 60 degrees vertical FoV through a frustum/corridor/hole that has a smaller FoV - and have that fill the resulting projection plane? I thinks that's not the same thing as "zooming…
isync
  • 537
  • 6
  • 15
0
votes
2 answers

OpenGL appears to be using (far too aggressive) frustum culling which I can't see how to modify

I'm trying to get an OpenGL application working in c++. OpenGL appears to be culling far & near objects. The screenshot should be a load of square tiles but the squares that are a certain distance too close or too far from the camera are not…
0
votes
1 answer

In which space to do Visible Surface Determination and how?

The Visibility Problem could be solved by sorting polygons by depth (Painter's algorithm) and support with Newell's algorithm in cases where z extents overlap. Newell's algorithm is explained here and here. Point 3 and 4 involves comparing each…
Arve Waltin
  • 4,098
  • 1
  • 15
  • 12
0
votes
1 answer

LIne not displaying with glFrustum()?

I was trying to draw a line on the window but it is not displaying with glFrustum(). I have used the same code with glOrtho() it does display the line. Is there anything else I need to set up for my line to show up on set window? void init() { …
LilRazi
  • 690
  • 12
  • 33
0
votes
0 answers

OpenGL ES (Android) scaled sphere cut by z near and far

I have an OpenGL ES 1.0 textured sphere that I can rotate by panning: As you can see, my viewport is a square of the size of the biggest side of my screen (which is what I want). The sphere has a radius of 1, so it fills the biggest side (again,…
Tim Autin
  • 6,043
  • 5
  • 46
  • 76
0
votes
1 answer

Is 0.00 a valid z value for vertices in OpenGL?

In OpenGL your viewpoint is always at [0,0,0]. Say you have a vertex at this point as a part of a cube or some other object. Is that vertex in front of or behind the camera/viewpoint? After projection I always end up with w=1 when z==0, which also…
Arve Waltin
  • 4,098
  • 1
  • 15
  • 12
-1
votes
1 answer

Why is this object drawn different if I use glFrustum?

I'm doing this OpenGL project for my Computer Graphics class, where I display an object and I rotate it and stuff, the thing is that at the beginning of the project we used glOrtho() and it looked really great. But now the teacher said that we…