Advertisement

Box Marking

Started by May 17, 2002 01:04 PM
1 comment, last by f0rg04t 22 years, 9 months ago
I am trying to add a feature to my program. Whenever you draw a GL_TRIANGLES, or GL_TRIANGLE_STRIP it will make a box from the xyz axis''s you declare with glVertex3f(x, y, z). What im having a problem with, is getting the coordinates, how would i catch these x,y, and z figures, with these, it will use several mathematical equations to resize the box to a square 50 pixels, by 50 pixels, and draw it centered on the triangle. What i need help with: can someone show me how to catch the x, y, and z values the user enters, or is there a way to make a .bmp, or .gif image and tile it to the image centered? Thank you for your help.
You mean you want to intercept glVertex3f call?

This isn''t easy, but it IS possible. Here''s a link to ApiHooks 3.8, which can do this besides other nifty things. Note: 1) a newer ApiHooks version is available, search for it if you''re interested; 2) if you''re not an expert in Win32 programming, you might as well forget about intercepting Win32 calls and just debug your game -- it will most likely be both faster and easier.
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
basically, i have done that

i just dont know how to intercept the values

i have the glVertex3f overloaded, which recieves the x, y, and z before the realy glVertex3f does

i just need to knw how to check if a triangle is being drawn, and if so, store the xy and z values... any ideas anyone?

(IM not an expert, ive been coding for 3 months with c++, but i learned every language i know right now in less than 5 months....)

This topic is closed to new replies.

Advertisement