one-sided surfaces

  • Follow


I'm drawing a cube, but winding the triangles (each side is 2 tris) 
CLOCKWISE, because I want the cube to be "inside out."  That is, I want 
it to be facing so that "normally" the viewer is in the center looking 
at the "inside" of the box (similar to a skybox.)

The difference is, for debugging purposes, I'm looking at this box from 
OUTSIDE -- basically, it's acting as my "rotating cube" in a sample app.

Since I'm doing glPolygonMode(GL_FRONT, GL_FILL), I'd EXPECT to only be 
able to see the back-sides of the cube -- that is, I'd think that the 
sides nearest me would be invisible, and I'd only see the 3 sides 
furthest from me.

Instead, that sort-a/kind-a works, but I get this weird sort of 
distorted view that seems to show all 6-sides, kind-of, but not quite 
exactly -- the near ones have a sort of transparency to them.

The texture I'm using on my cube can be seen at:

<http://www.manyfriends.com/Misc/OpenGL/test.gif>

And a screenshot is at:

<http://www.manyfriends.com/Misc/OpenGL/InvertedCubeTest.png>

Can someone explain why I'm getting these odd results?

Thanks!

-- 
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups.
0
Reply Miss 10/7/2006 4:02:13 PM

In article <Misc-2B4FD7.09022207102006@newsclstr02.news.prodigy.com>,
 Miss Elaine Eos <Misc@*your-pants*PlayNaked.com> wrote:

   [my cube isn't the sort of "inside out" that I'd expect, snip]
> The texture I'm using on my cube can be seen at:
> 
> <http://www.manyfriends.com/Misc/OpenGL/test.gif>
> 
> And a screenshot is at:
> 
> <http://www.manyfriends.com/Misc/OpenGL/InvertedCubeTest.png>
> 
> Can someone explain why I'm getting these odd results?
> 
> Thanks!

Duh. Nevermind...

I thought CullFace was on by default. gl.glEnable (GL.GL_CULL_FACE); 
fixed the problem.

Sorry for the bother...

-- 
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups.
0
Reply Miss 10/7/2006 5:54:37 PM


1 Replies
210 Views

(page loaded in 0.024 seconds)

Similiar Articles:













7/21/2012 5:07:17 PM


Reply: