Wired Graphics Processor

From GMod Wiki

Jump to: navigation, search


Back
Function:Unknown
Primary fire:Spawns an EGP screen
Secondary fire:No action.
Reload:No action.
Notes:-

Brief

Spawns an EGP Screen, which can be drawn to from a wirelinked Expression 2.

Instructions

Primary fire creates a screen , Secondry fire creates an emitter.

Inputs

-

Outputs

-

Variables

-

Useful hints

  • EGP has a resolution of 0-512 by 0-512 pixels.
  • EGP is now in v2 (EGP2) and is in the UWSVN.

Example


Description

EGP is a wire display screen. The screen is used for drawing simple/complex displays. It uses an E2 wirelink to communicate with an E2 chip. EGP uses an E2 to to tell it what/how to display. Note: This documentation is for EGP2 witch is currently in development.

SVN Links

EGP1 (old version): http://egpwiremod.googlecode.com/svn/trunk/ EGP2: http://wiremodegp2.googlecode.com/svn/trunk/ NOTE: Do not upload these to any external sites.

Expression Gate 2 Support

This display screen should be used with the expression gate 2.

XWL denotes an Expression2-Wirelink connection.

Quick guide.

EGP is very simple. There are 2 memory storages; Draw and Cached. Draw memory is the stuff displayed on the screen. Cached memory is waiting to be displayed on the screen. Call XWL:egpDraw() to process cached memory onto the draw memory. XWL:egpDraw() must be called to draw to the screen, without calling this you wont get any display.


Contents

Contents


Commands

Function Returns Description
E:egpDraw() File:Type-Entity.png Process the EGP's cache to its draw memory, Retuns 1 if it has drawn , Retuns 0 if it has not draw.
E:egpText(NSV2) File:Type-Entity.png Index Text Position

Create a text element at index.

E:egpLine(NNNNNV4) File:Type-Entity.png Index X1 Y1 X2 Y2 Color

Create a line element at index.

E:egpTextAlign(NNN) File:Type-Entity.png Sets the horizontal and veritcal alignment of text of a text element at index n1 to Horizontal:n2 Vertical:n3.
E:egpBox(NNNNNV4) File:Type-Entity.png Index X Y Width Height Color

Create a box element at index.

E:egpPolyColor(NV4...) File:Type-Entity.png Index Color (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

XWL:egpTriangle(NNNNNV) File:Type-WireLink.png Index X1 Y1 X2 Y2 X3 Y3 Color

Create a triangle element at index.

E:egpCircle(NV2V2V4) File:Type-Entity.png Index Position Size Color

Create a circle element at index.

E:egpPosY1(NN) File:Type-Entity.png Set the Y position1 of element at index n1 to n2.
E:egpBoxOutline(NNNNN) File:Type-Entity.png Index X Y Width Height

Create a boxoutline element at index.

E:egpMaterial(NS) File:Type-Entity.png Sets the material of element at n to s.
E:egpAngle(NN) File:Type-Entity.png Set the angle of element at index n1 to n2. (Only works on egpBox.)
E:egpClear() File:Type-Entity.png Emptys all memory on the egp.
XWL:egpSize(NV2) File:Type-WireLink.png Set the size of element at index n to v2.
XWL:egpTextAlign(NNN) File:Type-WireLink.png Sets the horizontal and veritcal alignment of text of a text element at index n1 to Horizontal:n2 Vertical:n3.
E:egpPos(NNN) File:Type-Entity.png Set position of element at index n1 to vector2( n2 , n3 ).
E:egpText(NSV2V) File:Type-Entity.png Index Text Position Color

Create a text element at index.

XWL:egpTextLayout(NSNNNNV4) File:Type-WireLink.png Index Text X Y X Y Color

Create a TextLayout element at index.

E:egpColor(NNNNN) File:Type-Entity.png Sets the color of element at index n1 to vec4( n2 , n3 , n4 , n5).
XWL:egpText(NSV2) File:Type-WireLink.png Index Text Position

Create a text element at index.

E:egpMaterialFromScreen(NE) File:Type-Entity.png Sets the material of element at index n to the wiredisplay of e.
XWL:egpBox(NNNNNV) File:Type-WireLink.png Index X Y Width Height Color

Create a box element at index.

E:egpBox(NV2V2V4) File:Type-Entity.png Index Position Size Color

Create a box element at index.

XWL:egpAngle(NN) File:Type-WireLink.png Set the angle of element at index n1 to n2. (Only works on egpBox.)
XWL:egpPosX1(NN) File:Type-WireLink.png Set the X position1 of element at index n1 to n2.
XWL:egpColor(NV4) File:Type-WireLink.png Sets the color of element at index n as vec4( Red , Blue , Green , Alpha ).
XWL:egpBoxOutline(NV2V2V) File:Type-WireLink.png Index Position Size Color

Create a boxoutline element at index.

XWL:egpGetPos(NN) File:Type-WireLink.png Returns psoition of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

XWL:egpClear(A) File:Type-WireLink.png Emptys all memory inside cells on egp effecting elements indexed inside array.
XWL:egpCircle(NNNNNV4) File:Type-WireLink.png Index X Y Width Height Color

Create a circle element at index.

E:egpSize(NNN) File:Type-Entity.png Set the size of element at index n1 to vec2( n2 , n3 ).
E:egpGetElement(NN) File:Type-Entity.png Returns element at index n as a tabel

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpColor(NV3) File:Type-Entity.png Sets the color of element at index n as vec4( Red , Blue , Green ).
XWL:egpCircle(NV2V2) File:Type-WireLink.png Index Position Size

Create a circle element at index.

XWL:egpPos1(NNN) File:Type-WireLink.png Set position1 of element at index n1 to vector2( n2 , n3 ).
XWL:egpGetText(NN) File:Type-WireLink.png Returns text of text element at index n1 as string

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpText(NSNNV) File:Type-Entity.png Index Text X Y Color

Create a text element at index.

E:egpMaterialFromScreen(NXWL) File:Type-Entity.png Sets the material of element at index n to the wiredisplay of enity of xwl.
E:egpText(NSNNV4) File:Type-Entity.png Index Text X Y Color

Create a text element at index.

E:egpLine(NV2V2V) File:Type-Entity.png Index Position1 Position2 Color

Create a line element at index.

E:egpPos(NV2) File:Type-Entity.png Set position of element at index n to v2.
XWL:egpPosY(NN) File:Type-WireLink.png Set the Y position of element at index n1 to n2.
E:egpPosX(NN) File:Type-Entity.png Set the X position of element at index n1 to n2.
E:egpSetText(NS) File:Type-Entity.png Sets the text of a text element at index n to s.
XWL:egpGetPos1(NN) File:Type-WireLink.png Returns psoition1 of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

XWL:egpSize(NNN) File:Type-WireLink.png Set the size of element at index n1 to vec2( n2 , n3 ).
XWL:egpPosX(NN) File:Type-WireLink.png Set the X position of element at index n1 to n2.
E:egpCircle(NNNNN) File:Type-Entity.png Index X Y Width Height

Create a circle element at index.

XWL:egpPos2(NV2) File:Type-WireLink.png Set position2 of element at index n to v2.
XWL:egpGetSize(NN) File:Type-WireLink.png Returns size of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpTriangle(NV2V2V2V) File:Type-Entity.png Index Position1 Position2 Position3 Color

Create a triangle element at index.

egpElements() Returns the servers limit of EGP elements.
E:egpPoly(NA) File:Type-Entity.png Index Vertex-Array

Create a polygon element at index.

XWL:egpBoxOutline(NNNNN) File:Type-WireLink.png Index X Y Width Height

Create a boxoutline element at index.

XWL:egpBox(NV2V2V4) File:Type-WireLink.png Index Position Size Color

Create a box element at index.

XWL:egpText(NSV2V4) File:Type-WireLink.png Index Text Position Color

Create a text element at index.

XWL:egpSetText(NS) File:Type-WireLink.png Sets the text of a text element at index n to s.
E:egpGetSize(NN) File:Type-Entity.png Returns size of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

XWL:egpTextLayout(NSV2V2) File:Type-WireLink.png Index Text Position Size

Create a TextLayout element at index.

XWL:egpGetColor(NN) File:Type-WireLink.png Returns color of text element at index n1 as vector4

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpColor(NNNN) File:Type-Entity.png Sets the color of element at index n1 to vec( n2 , n3 , n4 ).
E:egpToMouse(E) File:Type-Entity.png When e is a player who is aiming at the egp it will return thier aim position relative to the screen as vector2, OOtherwise it will return vec2(-1,-1)
E:egpPos1(NNN) File:Type-Entity.png Set position1 of element at index n1 to vector2( n2 , n3 ).
XWL:egpRemove(N) File:Type-WireLink.png Emptys the memory of the element indexed at n.
E:egpCircle(NV2V2) File:Type-Entity.png Index Position Size

Create a circle element at index.

XWL:egpTriangle(NNNNN) File:Type-WireLink.png Index X1 Y1 X2 Y2 X3 Y3

Create a triangle element at index.

E:egpLine(NNNNNV) File:Type-Entity.png Index X1 Y1 X2 Y2 Color

Create a line element at index.

XWL:egpMaterial(NS) File:Type-WireLink.png Sets the material of element at n to s.
E:egpBoxOutline(NV2V2V) File:Type-Entity.png Index Position Size Color

Create a boxoutline element at index.

XWL:egpCircle(NV2V2V) File:Type-WireLink.png Index Position Size Color

Create a circle element at index.

XWL:egpBoxOutline(NV2V2) File:Type-WireLink.png Index Position Size

Create a boxoutline element at index.

XWL:egpPos(NV2) File:Type-WireLink.png Set position of element at index n to v2.
XWL:egpText(NSNN) File:Type-WireLink.png Index Text X Y

Create a text element at index.

E:egpGetPos1(NN) File:Type-Entity.png Returns psoition1 of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpBox(NV2V2) File:Type-Entity.png Index Position Size

Create a box element at index.

E:egpBoxOutline(NNNNNV) File:Type-Entity.png Index X Y Width Height Color

Create a boxoutline element at index.

XWL:egpBox(NV2V2) File:Type-WireLink.png Index Position Size

Create a box element at index.

E:egpGetPos2(NN) File:Type-Entity.png Returns psoition2 of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpGetText(NN) File:Type-Entity.png Returns text of text element at index n1 as string

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpGetPos(NN) File:Type-Entity.png Returns psoition of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpPosX1(NN) File:Type-Entity.png Set the X position1 of element at index n1 to n2.
E:egpPos1(NV2) File:Type-Entity.png Set position1 of element at index n to v2.
XWL:egpMaterialFromScreen(NXWL) File:Type-WireLink.png Sets the material of element at index n to the wiredisplay of enity of xwl.
XWL:egpDraw() File:Type-WireLink.png Process the EGP's cache to its draw memory, Retuns 1 if it has drawn , Retuns 0 if it has not draw.
E:egpGetElements(N) File:Type-Entity.png Returns an arry of all element index's being used

will use drawn memory if n is 0 or cache memory if n is 1.

E:egpPolyColor(NVA) File:Type-Entity.png Index Color Vertex-Array

Create a polygon element at index.

E:egpPolyColor(NV...) File:Type-Entity.png Index Color (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

XWL:egpCanDraw() File:Type-WireLink.png Returns 1 if the EGP can draw at that time, Retuns 0 if not.
E:egpPolyColor(NV4A) File:Type-Entity.png Index Color Vertex-Array

Create a polygon element at index.

E:egpPoly(N...) File:Type-Entity.png Index (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

E:egpText(NSNN) File:Type-Entity.png Index Text X Y

Create a text element at index.

XWL:egpTextLayout(NSNNNNV) File:Type-WireLink.png Index Text X Y X Y Color

Create a TextLayout element at index.

XWL:egpPos(NNN) File:Type-WireLink.png Set position of element at index n1 to vector2( n2 , n3 ).
E:egpTextLayout(NSNNNNV4) File:Type-Entity.png Index Text X Y X Y Color

Create a TextLayout element at index.

XWL:egpTriangle(NV2V2V2V4) File:Type-WireLink.png Index Position1 Position2 Position3 Color

Create a triangle element at index.

E:egpTextLayout(NSNNNNV) File:Type-Entity.png Index Text X Y X Y Color

Create a TextLayout element at index.

E:egpPos2(NV2) File:Type-Entity.png Set position2 of element at index n to v2.
E:egpTextLayout(NSNNNN) File:Type-Entity.png Index Text X Y Width Height

Create a TextLayout element at index.

XWL:egpClear() File:Type-WireLink.png Emptys all memory on the egp.
XWL:egpPosX2(NN) File:Type-WireLink.png Set the X position2 of element at index n1 to n2.
E:egpTextLayout(NSV2V2V4) File:Type-Entity.png Index Text Position Size Color

Create a TextLayout element at index.

E:egpTextLayout(NSV2V2V) File:Type-Entity.png Index Text Position Size Color

Create a TextLayout element at index.

XWL:egpCircle(NNNNN) File:Type-WireLink.png Index X Y Width Height

Create a circle element at index.

XWL:egpText(NSNNV4) File:Type-WireLink.png Index Text X Y Color

Create a text element at index.

E:egpText(NSV2V4) File:Type-Entity.png Index Text Position Color

Create a text element at index.

E:egpTriangle(NNNNNV4) File:Type-Entity.png Index X1 Y1 X2 Y2 X3 Y3 Color

Create a triangle element at index.

E:egpTriangle(NNNNNV) File:Type-Entity.png Index X1 Y1 X2 Y2 X3 Y3 Color

Create a triangle element at index.

XWL:egpGetElements(N) File:Type-WireLink.png Returns an arry of all element index's being used

will use drawn memory if n is 0 or cache memory if n is 1.

E:egpBox(NNNNN) File:Type-Entity.png Index X Y Width Height

Create a box element at index.

E:egpTriangle(NNNNN) File:Type-Entity.png Index X1 Y1 X2 Y2 X3 Y3

Create a triangle element at index.

XWL:egpLine(NNNNNV) File:Type-WireLink.png Index X1 Y1 X2 Y2 Color

Create a line element at index.

XWL:egpGetPos2(NN) File:Type-WireLink.png Returns psoition2 of element at index n1 as vector2

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

E:egpTriangle(NV2V2V2) File:Type-Entity.png Index Position1 Position2 Position3

Create a triangle element at index.

E:egpCircle(NNNNNV4) File:Type-Entity.png Index X Y Width Height Color

Create a circle element at index.

E:egpCircle(NNNNNV) File:Type-Entity.png Index X Y Width Height Color

Create a circle element at index.

XWL:egpPoly(N...) File:Type-WireLink.png Index (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

E:egpCircle(NV2V2V) File:Type-Entity.png Index Position Size Color

Create a circle element at index.

E:egpLine(NNNNN) File:Type-Entity.png Index X1 Y1 X2 Y2

Create a line element at index.

XWL:egpColor(NNNNN) File:Type-WireLink.png Sets the color of element at index n1 to vec4( n2 , n3 , n4 , n5).
E:egpLine(NV2V2V4) File:Type-Entity.png Index Position1 Position2 Color

Create a line element at index.

XWL:egpPolyColor(NVA) File:Type-WireLink.png Index Color Vertex-Array

Create a polygon element at index.

E:egpLine(NV2V2) File:Type-Entity.png Index Position1 Position2

Create a line element at index.

E:egpSetFont(NSN) File:Type-Entity.png Sets the font/size of text of a text element at index n1 to Font:s Size:n2.
E:egpBoxOutline(NNNNNV4) File:Type-Entity.png Index X Y Width Height Color

Create a boxoutline element at index.

E:egpBoxOutline(NV2V2V4) File:Type-Entity.png Index Position Size Color

Create a boxoutline element at index.

XWL:egpColor(NNNN) File:Type-WireLink.png Sets the color of element at index n1 to vec( n2 , n3 , n4 ).
XWL:egpColor(NV3) File:Type-WireLink.png Sets the color of element at index n as vec4( Red , Blue , Green ).
E:egpGetColor(NN) File:Type-Entity.png Returns color of text element at index n1 as vector4

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

XWL:egpPolyColor(NV4A) File:Type-WireLink.png Index Color Vertex-Array

Create a polygon element at index.

XWL:egpLine(NV2V2V4) File:Type-WireLink.png Index Position1 Position2 Color

Create a line element at index.

E:egpCanDraw() File:Type-Entity.png Returns 1 if the EGP can draw at that time, Retuns 0 if not.
XWL:egpBoxOutline(NV2V2V4) File:Type-WireLink.png Index Position Size Color

Create a boxoutline element at index.

XWL:egpCircle(NV2V2V4) File:Type-WireLink.png Index Position Size Color

Create a circle element at index.

XWL:egpPoly(NA) File:Type-WireLink.png Index Vertex-Array

Create a polygon element at index.

XWL:egpSetFont(NSN) File:Type-WireLink.png Sets the font/size of text of a text element at index n1 to Font:s Size:n2.
XWL:egpBox(NNNNNV4) File:Type-WireLink.png Index X Y Width Height Color

Create a box element at index.

E:egpPosY(NN) File:Type-Entity.png Set the Y position of element at index n1 to n2.
XWL:egpPolyColor(NV...) File:Type-WireLink.png Index Color (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

XWL:egpPolyColor(NV4...) File:Type-WireLink.png Index Color (...)

Create a polygon element at index using all vector's and vector2's as a Vertex-Array.

XWL:egpBox(NNNNN) File:Type-WireLink.png Index X Y Width Height

Create a box element at index.

XWL:egpPos1(NV2) File:Type-WireLink.png Set position1 of element at index n to v2.
XWL:egpPos2(NNN) File:Type-WireLink.png Set position2 of element at index n1 to vector2( n2 , n3 ).
E:egpBox(NV2V2V) File:Type-Entity.png Index Position Size Color

Create a box element at index.

XWL:egpPosY2(NN) File:Type-WireLink.png Set the Y position2 of element at index n1 to n2.
E:egpTriangle(NV2V2V2V4) File:Type-Entity.png Index Position1 Position2 Position3 Color

Create a triangle element at index.

XWL:egpLine(NV2V2V) File:Type-WireLink.png Index Position1 Position2 Color

Create a line element at index.

E:egpTextLayout(NSV2V2) File:Type-Entity.png Index Text Position Size

Create a TextLayout element at index.

E:egpColor(NV4) File:Type-Entity.png Sets the color of element at index n as vec4( Red , Blue , Green , Alpha ).
E:egpRemove(N) File:Type-Entity.png Emptys the memory of the element indexed at n.
XWL:egpLine(NNNNN) File:Type-WireLink.png Index X1 Y1 X2 Y2

Create a line element at index.

E:egpBoxOutline(NV2V2) File:Type-Entity.png Index Position Size

Create a boxoutline element at index.

XWL:egpLine(NV2V2) File:Type-WireLink.png Index Position1 Position2

Create a line element at index.

XWL:egpText(NSNNV) File:Type-WireLink.png Index Text X Y Color

Create a text element at index.

XWL:egpLine(NNNNNV4) File:Type-WireLink.png Index X1 Y1 X2 Y2 Color

Create a line element at index.

XWL:egpBoxOutline(NNNNNV4) File:Type-WireLink.png Index X Y Width Height Color

Create a boxoutline element at index.

XWL:egpTextLayout(NSV2V2V4) File:Type-WireLink.png Index Text Position Size Color

Create a TextLayout element at index.

E:egpPosY2(NN) File:Type-Entity.png Set the Y position2 of element at index n1 to n2.
XWL:egpTextLayout(NSV2V2V) File:Type-WireLink.png Index Text Position Size Color

Create a TextLayout element at index.

XWL:egpTriangle(NV2V2V2) File:Type-WireLink.png Index Position1 Position2 Position3

Create a triangle element at index.

XWL:egpToMouse(E) File:Type-WireLink.png When e is a player who is aiming at the egp it will return thier aim position relative to the screen as vector2, OOtherwise it will return vec2(-1,-1)
XWL:egpFont(NSN) File:Type-WireLink.png Sets the font/size of text of a text element at index n1 to Font:s Size:n2.
E:egpPosX2(NN) File:Type-Entity.png Set the X position2 of element at index n1 to n2.
E:egpFont(NSN) File:Type-Entity.png Sets the font/size of text of a text element at index n1 to Font:s Size:n2.
E:egpPos2(NNN) File:Type-Entity.png Set position2 of element at index n1 to vector2( n2 , n3 ).
E:egpBox(NNNNNV) File:Type-Entity.png Index X Y Width Height Color

Create a box element at index.

XWL:egpTextLayout(NSNNNN) File:Type-WireLink.png Index Text X Y Width Height

Create a TextLayout element at index.

XWL:egpMaterialFromScreen(NE) File:Type-WireLink.png Sets the material of element at index n to the wiredisplay of e.
E:egpSize(NV2) File:Type-Entity.png Set the size of element at index n to v2.
XWL:egpBox(NV2V2V) File:Type-WireLink.png Index Position Size Color

Create a box element at index.

XWL:egpBoxOutline(NNNNNV) File:Type-WireLink.png Index X Y Width Height Color

Create a boxoutline element at index.

XWL:egpGetElement(NN) File:Type-WireLink.png Returns element at index n as a tabel

will use drawn memory if n2 is 0 or cache memory if n2 is 1.

XWL:egpTriangle(NNNNNV4) File:Type-WireLink.png Index X1 Y1 X2 Y2 X3 Y3 Color

Create a triangle element at index.

XWL:egpPosY1(NN) File:Type-WireLink.png Set the Y position1 of element at index n1 to n2.
XWL:egpText(NSV2V) File:Type-WireLink.png Index Text Position Color

Create a text element at index.

XWL:egpCircle(NNNNNV) File:Type-WireLink.png Index X Y Width Height Color

Create a circle element at index.

XWL:egpTriangle(NV2V2V2V) File:Type-WireLink.png Index Position1 Position2 Position3 Color

Create a triangle element at index.

E:egpClear(A) File:Type-Entity.png Emptys all memory inside cells on egp effecting elements indexed inside array.


Extra Information

Article Information
Description:Wired Graphics Processor
link=User:Informatixa Original Author:Informatixa
Contributors:Goluch, Mattwd0526
Created:January 24, 2010


Project Information (EGP1 and EGP2)
Description:Wired Graphics Processor
link=User:Goluch Original Author:Goluch
Contributors:Doridian, TomyLobo
Created:November 26, 2009


You can learn more about on the Expression 2 page Wire_Expression2

Note: Addons Extra E2 functions for EGP1 http://www.wiremod.com/forum/e2-development/18303-release-egp-e2-function.html

Note: Information pulled from this topic.

Personal tools