c# - Initializing OpenGL with depth buffer and depth testing -
i initialize opengl depth-buffer in platform independent manner without using glut.
how remove hidden-surface in opengl scene using c# wrapper. i'm not using glut can't use glutinitdisplaymode. idea?
for more details:
i found these steps hidden-surface removal:
request z-buffer via glutinitdisplaymode:
// glut_depth request depth-buffer glutinitdisplaymode(glut_rgba | glut_double | glut_depth);
enable z-buffer depth testing:
glenable(gl_depth_test);
clear z-buffer when clear color buffer:
// clear color , depth buffers glclear(gl_color_buffer_bit | gl_depth_buffer_bit);
as know, glutinitdisplaymode 1 of glut functions. can eliminate call without bad effect. if not, alternative pure opengl calls trick.
i'm using c# wrapper written (colin p. fahey)
glut not opengl!
whatever glut does, c# wrapper offers well, , better. need depth buffer , enabling depth testing.
update in reflection of question edit
the exact steps taken depth buffer depend entirely on wrapper use. it's essential tell us, wrapper is.
Comments
Post a Comment