Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show data with C and OpenGL 1

Status
Not open for further replies.

kreop

Technical User
Oct 9, 2005
14
JP
hai..I have a question about how to display the data at each coordinate or dot. The codes below are for drawing the points or coordinates using dot.I tried to display each dot with data that is written close to it. My compiler is Visual C++ 6.0 and OS win 2000. OpenGL is used for graphic.


Code:
double data[34][3];  //[COLOR=red]data.dat(3d data)[/color]
void draw(void)
{	
	gclearbuffer();
	int i,j;
	double x,y,z;
	gclearbuffer();
	for(i=0;i<34;i++){
		j=0;
		x=data[i][j];
		y=data[i][j+1];
		z=data[i][j+2];
       //only dots. I tried to dispaly data exm  (52,43,21) 
	gpoint3d(x,y,z);
}
        glflush();
	
}

tq
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top