Jump to content

  • Log In with Google      Sign In   
  • Create Account

Transform coordinate (please help me to fill in the blank)


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 nipon   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 October 2001 - 12:30 AM

please help me to fill code..... (xw, yw) is point in picture(test.bmp) (xw1, yw1) (0,0) (xw2, yw2) (50,0) (xw3, yw3) (50,50) (xw4, yw4) (0,50) - this picture is square. - (xw, yw) in pixels. - size of this picture is 150*150 i would like to plot this point in opengl Example code for understand more. please help me to fill code in the space. procedure Tform2.draw; var xw1,yw1,xw2,yw2,xw3,yw3,xw4,yw4:Glfloat; xv1,yv1,xv2,yv2,xv3,yv3,xv4,yv4:Glfloat; begin xw1:=0;yw1:=0; xw2:=50;yw2:=0; xw3:=50;yw3:=50; xw4:=0;yw4:=50; // hear! please fill code xv1 = ? xvw // how xv1 relate with xw1 such as xv1:=xw1*2/150; //i try to do this, but don''t work _ _ _ _ _ _ _ _ _ _ _ _ glBegin(GL_POLYGON); glColor3f(1,0,0); glVertex3f(xv1,yv1,-0.4); glVertex3f(xv2,yv2,-0.4); glVertex3f(xv3,yv3,-0.4); glVertex3f(xv4,yv4,-0.4); glEnd; end; i define viewport just like this. procedure TForm2.FormResize(Sender: TObject); begin glViewport(0,0,width,height); glMatrixMode(GL_PROJECTION); glLoadIdentity; gluPerspective(35,Width/Height,1,100); end; i hope that you may be understand me. thanks you for your sugestion

#2 Null and Void   Members   -  Reputation: 1087

Like
Likes
Like

Posted 03 October 2001 - 12:37 AM

If I know what you mean, there''s an example in C in this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=61670

[Resist Windows XP''s Invasive Production Activation Technology!]




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS