|
|
Clipping planes
I have a problem regarding clipping planes in OpenGL. With an NVidia
card I defined clipping planes for the volume drawn and they were
correctly transformed by the currently active modelview matrix. Now I
am testing on ATI and the clipping planes are not transformed anymore.
Are there special restrictions in defining clipping planes with
glClipPlane. For example: do I need to put the clipping plane before or
after the modelview transformations?
|
|
0
|
|
|
|
Reply
|
Coert
|
9/27/2005 2:35:53 PM |
|
Coert wrote:
> I have a problem regarding clipping planes in OpenGL. With an NVidia
> card I defined clipping planes for the volume drawn and they were
> correctly transformed by the currently active modelview matrix. Now I
> am testing on ATI and the clipping planes are not transformed anymore.
> Are there special restrictions in defining clipping planes with
> glClipPlane. For example: do I need to put the clipping plane before or
> after the modelview transformations?
>
The clipping planes should be transformed by
the current GL_MODELVIEW matrix. Anything
else is a bug (most likely in your program).
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again. They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens
every day. I cannot recall the last time something like
that happened in politics or religion.
- Carl Sagan, 1987 CSICOP keynote address
|
|
0
|
|
|
|
Reply
|
fungus
|
9/27/2005 4:39:27 PM
|
|
Strange, I define the plane always after my glRotate and gluLookAt
calls, but they stay fixed when I change rotation. Is it possible that
there is a bug in the ATI driver?
|
|
0
|
|
|
|
Reply
|
Coert
|
9/28/2005 9:26:55 AM
|
|
Coert wrote:
> Strange, I define the plane always after my glRotate and gluLookAt
> calls, but they stay fixed when I change rotation. Is it possible that
> there is a bug in the ATI driver?
>
What do you leave glMatrixMode() set to? Maybe
it matters to ATI drivers.
Try calling glGetError(), make sure your code
is all legal.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again. They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens
every day. I cannot recall the last time something like
that happened in politics or religion.
- Carl Sagan, 1987 CSICOP keynote address
|
|
0
|
|
|
|
Reply
|
fungus
|
9/28/2005 10:10:32 AM
|
|
I do not get any error with glGetError(). When I do a glGetClipPlane i
can see that the clipping planes are correctly transformed by the
modelview matrix, but it looks like the clipping plane on the screen is
not updated.
|
|
0
|
|
|
|
Reply
|
Coert
|
9/28/2005 11:23:40 AM
|
|
Coert wrote:
> I do not get any error with glGetError(). When I do a glGetClipPlane i
> can see that the clipping planes are correctly transformed by the
> modelview matrix, but it looks like the clipping plane on the screen is
> not updated.
>
Reduce it to the simplest possible case.
Write a test program to reproduce the problem.
If it still happens when you have it down to
a ferw dozen lines of code then suspect the
driver.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again. They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens
every day. I cannot recall the last time something like
that happened in politics or religion.
- Carl Sagan, 1987 CSICOP keynote address
|
|
0
|
|
|
|
Reply
|
fungus
|
9/28/2005 11:52:55 AM
|
|
I'm rendering off-screen (using Mark Harrris' RenderTexture class).
Could it be that the problems arise only when rendering off-screen?
|
|
0
|
|
|
|
Reply
|
Coert
|
9/29/2005 8:31:16 AM
|
|
"Coert" <coert@2cwebdesign.nl> wrote in message
news:1127982676.197965.130150@g49g2000cwa.googlegroups.com...
> I'm rendering off-screen (using Mark Harrris' RenderTexture class).
> Could it be that the problems arise only when rendering off-screen?
>
Normally it shouldn't be a problem because for rendering off-screen you
"simply" use another render context, which might be connected to an
off-screen buffer (like a bitmap). Did you check the order of all your
push/pop matrix operations?
Chris
|
|
0
|
|
|
|
Reply
|
Chris
|
9/30/2005 8:15:30 AM
|
|
|
7 Replies
216 Views
(page loaded in 0.156 seconds)
|
|
|
|
|
|
|
|
|