theonlywalks

02-16-2013, 08:44 PM

Good day everyone,

I am having a problem and I was hoping someone could help me. I am on Windows Vista, running OpenGL 3.3, and GLSL 3.3.

I am able to draw lots of different objects, and do things with them in the vertex and fragment shaders.

However, there is still one problem I have that I can not figure out.

Here is the situation:

- I create a window.

- I create vertex and fragment shaders that are basically just pass throughs.

- I then draw a simple square.

- If I translate the square in the Z direction by 0.5, -0.5, 1.0, or -1.0, the square will still appear in the window.

- I can translate the square up and down, left and right, and it works as intended.

- However, if I translate the square by anything more than 1.0 or -1.0 in the Z direction, I no longer see the square.

It seems as if by default, the viewing volume is a 2x2 cube centered on the origin, and only vertex's falling within this volume will be mapped to the window.

So if there is a vertex that is more then 1.0 units from the origin in the Z-direction, then it gets clipped.

Is this a correct interpretation of the problem?

Also, how do I solve this problem?

Warmest regards,

Shawn

I am having a problem and I was hoping someone could help me. I am on Windows Vista, running OpenGL 3.3, and GLSL 3.3.

I am able to draw lots of different objects, and do things with them in the vertex and fragment shaders.

However, there is still one problem I have that I can not figure out.

Here is the situation:

- I create a window.

- I create vertex and fragment shaders that are basically just pass throughs.

- I then draw a simple square.

- If I translate the square in the Z direction by 0.5, -0.5, 1.0, or -1.0, the square will still appear in the window.

- I can translate the square up and down, left and right, and it works as intended.

- However, if I translate the square by anything more than 1.0 or -1.0 in the Z direction, I no longer see the square.

It seems as if by default, the viewing volume is a 2x2 cube centered on the origin, and only vertex's falling within this volume will be mapped to the window.

So if there is a vertex that is more then 1.0 units from the origin in the Z-direction, then it gets clipped.

Is this a correct interpretation of the problem?

Also, how do I solve this problem?

Warmest regards,

Shawn