コード例 #1
0
ファイル: nurbssrf.c プロジェクト: OS2World/LIB-VIDEO-MGL
void
tesselate_strip_s_fill(GLint top_start, GLint top_end, GLint top_z,
	GLint bottom_start, GLint bottom_end, GLint bottom_z, GLfloat bottom_domain)
{
	GLint top_cnt,bottom_cnt,tri_cnt,k;
	GLint direction;

	top_cnt=top_end-top_start;
	direction= (top_cnt>=0 ? 1: -1);
	bottom_cnt=bottom_end-bottom_start;
	while(top_cnt)
	{
		if(bottom_cnt)
			tri_cnt=top_cnt/bottom_cnt;
		else
			tri_cnt=abs(top_cnt);
		glBegin(GL_TRIANGLE_FAN);
		glEvalCoord2f((GLfloat)bottom_start/bottom_domain,
			(GLfloat)bottom_z/bottom_domain);
		for(k=0;k<=tri_cnt;k++ , top_start+=direction)
			glEvalPoint2(top_start,top_z);
		if(bottom_cnt)
		{
			bottom_start+=direction;
			top_start-=direction;
			glEvalCoord2f((GLfloat)bottom_start/bottom_domain,
				(GLfloat)bottom_z/bottom_domain);
		}
		glEnd();
		top_cnt-=direction*tri_cnt;
		bottom_cnt-=direction;
	}
}
コード例 #2
0
ファイル: g_render.c プロジェクト: aosm/X11
void __glXDisp_EvalPoint2(GLbyte *pc)
{
	glEvalPoint2( 
		*(GLint    *)(pc + 0),
		*(GLint    *)(pc + 4)
	);
}
コード例 #3
0
ファイル: Evaluators.c プロジェクト: xpika/winhugs
static void hugsprim_glEvalPoint2_22(HugsStackPtr hugs_root)
{
    HsInt32 arg1;
    HsInt32 arg2;
    arg1 = hugs->getInt32();
    arg2 = hugs->getInt32();
    glEvalPoint2(arg1, arg2);
    
    hugs->returnIO(hugs_root,0);
}
コード例 #4
0
ファイル: nurbssrf.c プロジェクト: OS2World/LIB-VIDEO-MGL
void
tesselate_bottom_left_corner(GLenum display_mode, GLfloat s_1, GLfloat t_1)
{
	if(display_mode==GL_FILL)
	{
		glBegin(GL_TRIANGLE_FAN);
		glEvalPoint2(1,1);
		glEvalCoord2f(s_1,0.0);
		glEvalCoord2f(0.0,0.0);
		glEvalCoord2f(0.0,t_1);
	}
	else
	{
		glBegin(GL_LINES);
		glEvalCoord2f(0.0,0.0);
		glEvalCoord2f(0.0,t_1);
		glEvalCoord2f(0.0,0.0);
		glEvalPoint2(1,1);
		glEvalCoord2f(0.0,0.0);
		glEvalCoord2f(s_1,0.0);
	}
	glEnd();
}
コード例 #5
0
ファイル: nurbssrf.c プロジェクト: OS2World/LIB-VIDEO-MGL
void
tesselate_top_right_corner(GLenum display_mode, GLint u_left, GLint v_bottom,
	GLint u_right, GLint v_top, GLfloat s_1, GLfloat t_1)
{
	if(display_mode==GL_FILL)
	{
		glBegin(GL_TRIANGLE_FAN);
		glEvalPoint2(u_left,v_bottom);
		glEvalCoord2f((u_right-1)*s_1,v_top*t_1);
		glEvalCoord2f(u_right*s_1,v_top*t_1);
		glEvalCoord2f(u_right*s_1,(v_top-1)*t_1);
	}
	else
	{
		glBegin(GL_LINES);
		glEvalCoord2f(u_right*s_1,v_top*t_1);
		glEvalPoint2(u_left,v_bottom);
		glEvalCoord2f(u_right*s_1,v_top*t_1);
		glEvalCoord2f(u_right*s_1,(v_top-1)*t_1);
		glEvalCoord2f(u_right*s_1,v_top*t_1);
		glEvalCoord2f((u_right-1)*s_1,v_top*t_1);
	}
	glEnd();
}
コード例 #6
0
ファイル: nurbssrf.c プロジェクト: OS2World/LIB-VIDEO-MGL
void
tesselate_top_left_corner(GLenum display_mode, GLint u_right, GLint u_left,
	GLfloat s_1, GLfloat t_1)
{
	if(display_mode==GL_FILL)
	{
		glBegin(GL_TRIANGLE_FAN);
		glEvalPoint2(u_right,1);
		glEvalCoord2f((u_left+1)*s_1,t_1);
		glEvalCoord2f((u_left+1)*s_1,0.0);
		glEvalCoord2f(u_left*s_1,0.0);
	}
	else
	{
		glBegin(GL_LINES);
		glEvalCoord2f((u_left+1)*s_1,0.0);
		glEvalPoint2(u_right,1);
		glEvalCoord2f((u_left+1)*s_1,0.0);
		glEvalCoord2f(u_left*s_1,0.0);
		glEvalCoord2f((u_left+1)*s_1,0.0);
		glEvalCoord2f((u_left+1)*s_1,t_1);
	}
	glEnd();
}
コード例 #7
0
ファイル: nurbssrf.c プロジェクト: OS2World/LIB-VIDEO-MGL
void
tesselate_bottom_right_corner(GLenum display_mode, GLint v_top,GLint v_bottom,
	GLfloat s_1, GLfloat t_1)
{
	if(display_mode==GL_FILL)
	{
		glBegin(GL_TRIANGLE_FAN);
		glEvalPoint2(1,v_top);
		glEvalCoord2f(0.0,v_bottom*t_1);
		glEvalCoord2f(0.0,(v_bottom+1)*t_1);
		glEvalCoord2f(s_1,(v_bottom+1)*t_1);
	}
	else
	{
		glBegin(GL_LINES);
		glEvalCoord2f(0.0,(v_bottom+1)*t_1);
		glEvalPoint2(1,v_top);
		glEvalCoord2f(0.0,(v_bottom+1)*t_1);
		glEvalCoord2f(0.0,v_bottom*t_1);
		glEvalCoord2f(0.0,(v_bottom+1)*t_1);
		glEvalCoord2f(s_1,(v_bottom+1)*t_1);
	}
	glEnd();
}
コード例 #8
0
ファイル: gl.cpp プロジェクト: dschaefer/swt-opengl
M(void, glEvalPoint2, jint i, jint j) {
	glEvalPoint2(i, j);
}