Forum

I need help with drawline!

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

I need help with drawline!

Postby worldspawn » Sun Sep 27, 2009 10:56 pm

Okay, I can't figure it out for the life of me.

Code: Select all
drawline(1, '0 0 0', '500 0 0','0 150 0', 0, 0);
drawline(1, '0 0 0', '0 500 0','0 150 0', 0, 0);


Neither of these will show up.

Code: Select all
drawline(float width, vector pos1, vector pos2, vector rgb, float alpha, float flags)


Obviously I'm setting the values wrong, but which ones?! :?
worldspawn
 
Posts: 27
Joined: Tue Dec 02, 2008 11:44 pm

Postby Spike » Mon Sep 28, 2009 12:05 am

void (float width, vector rgb, float alpha, float flags, vector pos1, ...) drawline =#315;

is the argument list used in fte's drawline builtin. its only supported in gl (a no-op otherwise), and the width is assumed to always be 1.
You can pass 4 points and draw 3 lines in one call (QC does not support more than 8 args, at least to builtins).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby frag.machine » Tue Sep 29, 2009 12:58 am

I know nothing about CSQC so bear with my ignorance, but usually in OpenGL alpha values ranges from 1.0f (solid) to 0.0f (invisible). Isn't that the case ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby ceriux » Tue Sep 29, 2009 1:46 am

um i think you might be right.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest