[jitter] polygon smoothing with jit.gl.sketch
Jeremy Rotsztain
jeremy at mantissa.ca
Sat Nov 3 16:34:03 MDT 2007
- Previous message: [jitter] problem with jit.findbounds
- Next message: [jitter] polygon smoothing with jit.gl.sketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
has anybody figured out how to enable polygon smoothing?
i'm trying to implement the following code (from the red book, http://
www.glprogramming.com/red/chapter06.html#name2).
glCullFace (GL_BACK);
glEnable (GL_CULL_FACE);
glBlendFunc (GL_SRC_ALPHA_SATURATE, GL_ONE);
glClearColor (0.0, 0.0, 0.0, 0.0);
glClear (GL_COLOR_BUFFER_BIT);
glEnable (GL_BLEND);
glEnable (GL_POLYGON_SMOOTH);
glDisable (GL_DEPTH_TEST);
here's the message i'm sending to jit.gl.sketch (i'm using ortho
projection)
reset, glmatrixmode projection, glloadidentity,
glortho 0. 640. 480. 0. -5. 5., glmatrixmode modelview, glloadidentity,
glcullface 2, glenable cull_face, glblendfunc 10
1, glclearcolor 0. 0. 0. 0., glclear, glenable blend, glenable
polygon_smooth, gldisable depth_test, glcolor 1. 1. 1. 1.,
dim 200 200, glpushmatrix, glbegin quads, gltexcoord 0. 1., glvertex 91
135, gltexcoord 1. 1., glvertex 339 154,
gltexcoord 1. 0., glvertex 335 380, gltexcoord 0. 0., glvertex 75 367,
glend, glpopmatrix,
am i using the wrong clear function? the red book recommentds
color_buffer_bit, but it's not clear how to access it.
thanks,
jeremy
- Previous message: [jitter] problem with jit.findbounds
- Next message: [jitter] polygon smoothing with jit.gl.sketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
