gl.glLightfv(gl.GL_LIGHT0, gl.GL_DIFFUSE, (1.0,1.0,1.0,1.0)) gl.glLightfv(gl.GL_LIGHT0, gl.GL_POSITION, (0.0,0.0,2.0,1.0)) gl.glEnable(gl.GL_LIGHT0) 开发者ID:spectralpython,项目名称:spectral,代码行数:26,代码来源:hypercube.py 示例5: draw_box ▲点赞 6▼ # 需要导入模块: from ...
# 需要导入模块: from opengltk.OpenGL import GL [as 别名]# 或者: from opengltk.OpenGL.GL importglEnable[as 别名]defsetupLightModel(self):# this method has to be called explicitly by the derived classes if# a default lighting model is wantedGL.glLight(GL.GL_LIGHT0, GL.GL_AMBIENT, [.5...
GL_LIGHT0 ~ GL_LIGHT716384 ~ 16391启用0号灯到7号灯(光源) 光源要求由函数glLight函数来完成 GL_LIGHTING2896启用灯源 GL_LINE_SMOOTH2848执行后,过虑线段的锯齿 GL_LINE_STIPPLE2852执行后,画虚线 GL_LOGIC_OP3057逻辑操作 GL_MAP1_COLOR_43472根据函数Map1对 贝赛尔曲线 的设置, ...
glEnable 用于启用各种功能。功能由参数决定。与glDisable相对应。glDisable是用来关闭的。两个函数参数取值是一至的。 参数说明: void glEnable(GLenum cap) GLenum 是unsigned int 类型 cap 是一个取值。由值决定启用的功能键。各种功能请看参数cap的取值表 ...
...(GL_BLEND); //启用混合状态 glEnable(GL_LIGHTING); //启用光照 glEnable(GL_LIGHT0);...//打开光源0 glEnable(GL_DEPTH_TEST); //启用深度检测 glEnable(GL_COLOR_MATERIAL);//材质跟踪当前绘图色 } void 1.7K70 实验6 OpenGL模型视图变换...
GL_LIGHTi If enabled, include light i in the evaluation of the lighting equation. (See glLightModel and glLight.) GL_LIGHTING If enabled, use the current lighting parameters to compute the vertex color or index. Otherwise, simply associate the current color or index with each vertex. (See gl...
...glMaterialf(GL_FRONT, GL_SHININESS, 100.0); glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); glEnable...(GL_BLEND); //启用混合状态 glEnable(GL_LIGHTING); //启用光照 glEnable(GL_LIGHT0);...//打开光源0 glEnable(GL_DEPTH_TEST); //启用深度检测 glEnable(GL_COLOR_MATERIAL);...
glGetLightiv glGetMapdv glGetMapfv glGetMapiv glGetMaterialfv glGetMaterialiv glGetMinmax glGetMinmaxParameterfv glGetMinmaxParameteriv glGetObjectParameterfvARB glGetObjectParameterivAPPLE glGetObjectParameterivARB glGetPixelMapfv glGetPixelMapuiv glGetPixelMapusv glGetPointerv glGetPolygonStipple gl...
GL_LIGHT0王~ GL_LIGHT7 16384 ~ 16391 启用0号灯到7号灯(光源) 光源要求由函数glLight函数来完成 GL_LIGHTIN王只革脱异父氧环沿G 2896 启用灯源 GL_LINE_SMOOTH 2848 执行后,过滤线段的锯齿 GL_LINE_STIPPLE 2852 执行后,画虚线 GL_LOGIC_OP ...