Interesting - thanks Yahn, I'll check that out.

A post in the VERC forums suggests maybe the DrawFilledRect primitive will work
in 3d.  Perhaps I can make a bargraph type display instead of a true line
graph.  I'm trying to do something like
http://oregonstate.edu/~holtt/tamucc/real_06.jpg on an in-game screen placed on
the (currently not animated) prop you see in
http://oregonstate.edu/~holtt/tamucc/new_gurney_cart.jpg

Because the chart data is actually dynamic and not just an animated loop, it
needs to be rendered out real-time.

Quoting Yahn Bernier <[EMAIL PROTECTED]>:

> I would write your own mathed using the material system using
> CMeshBuilder with MATERIAL_LINES as the primitive type.  The cl_dll code
> has some examples of using a meshbuilder instead of surface() to do
> drawing.  You'll need to hook in at the correct part of rendering to
> make sure the projection matrix is not set up for ortho/2d drawing, etc.
> You might also look at CDebugOverlay::AddLineOverlay which might already
> do what you want.
>
> Yahn
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tim Holt
> Sent: Tuesday, May 31, 2005 12:34 PM
> To: [email protected]
> Subject: [hlcoders] VGUI graphics primitives (DrawLine) on a 3d space
> vgui_screen?
>
> I've been doing "conventional" HUD type displays, and have been using
> the DrawLine graphics primitive to draw various graphics items on them
> just fine.
> Now I want to take one of those displays and have sitting in 3d game
> space via the vgui_screen entity.  It works up to a point, with my text
> elements showing up etc. however it has problems when I try and draw
> lines with DrawLine.
>
> Normally I would do...
>
> vgui::surface()->DrawLine (x1, y1, x2, y2);
>
> to draw a line from point [x1,y1] to [x2,y2] in the VGUI object's
> coordinate space. Works great when it's on the HUD. But when it's in 3d
> space, it still draws the lines on the HUD and does not draw them in the
> 3d rendered version of the VGUI screen.
>
> I've searched through the SDK source but so far haven't found any place
> where this is actually done in the game, so I don't know if it's even
> possible.
>
> I suppose what I need is the equivalent of
>
> vgui::surface()
>
> which gives me the drawing surface for the 3d rendered VGUI screen.
>
> Alternately, I wondered if I could draw the lines on an off-screen image
> buffer, then just put the image onto the VGUI panel once it's drawn.
> That or use the temporary entity line to draw 3d lines in front of my
> VGUI screen.  The screen won't move at all (fixed orientation) so
> getting the transforms right won't be that big of a deal.
>
> Anyone have any clues or suggestions?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to