English
Online-Documentation

ogl.xpgl Statement: OpenGL

 
What is XPGL? XPGL standing for XProfanGraphicsLanguage. inspired watts I moreover from the Textdatei, The The "Welt" in Lesson 10 of NeHe's OpenGL-Tutorial describe: <a href='https://nehe.gamedev.net/'>Neon Helium OpenGL Tutorial</a>

in this Tutorial watts The Textdatei though solely using, these world To describe. in the Program watts tappt im dunkeln then Dreieck for Dreieck read and displayed. the was me decided too slow. The Idea To XPGL coming me then, as i me with the vector-functions of OpenGL befaßte, The it make possible for Vertex (Coordinates), colour, Texturabschnitt and Normalwerte apiece one Datenarray (= vector) anzugeben and the whole then with a only OpenGL-commands on the screen To bring.

The Idea was, these Textdatei so umzugestalten, that tappt im dunkeln possible universell is (means not only for Dreiecke with Textur functions) and so into memory red becomes, that tappt im dunkeln with a OpenGL-commands showing can. so was XPGL born.

[head]XPGL exists means from subesquent Komponenten[/head]
there's first of all The XPGL-File, The The data the darzustellenden "Welt" contains.

then there a Datenstruktur in XProfan, The these values aufnimmt. with @oGL("LoadXPGL " can a XPGL-File into memory loaded go. it can up to 1999 XPGL-Files at the same time in memory his, if The equipment the Rechners with RAM it hergibt.

with the @oGL("UseXPGL " go The data of/ one XPGL-Datenstruktur blitzschnell on the OpenGL-system übetragen. ex here undertaking The graphic-ticket, sofern tappt im dunkeln OpenGL-capable is. (with older cards käme here the OpenGL-driver and the RAM the Rechners to that employment, what not very efficient is.)

the latest limb in the chain is the function @oGL("DrawXPGL ", with the The complete "Welt" (or one beliebiger part same) on the OpenGL-screen brought becomes.

as additional Possibility is yet vorgesehen, The loaded XPGL-data with o@GL("SaveXPGLData " as binäres Datenfile abzuspeichern and oGL("LoadXPGLData " again To loading. with @oGL("CreateXPGL " can XPGL-data too directly in the program produce. @oGL("XPGLCount " ermittel The Number of spots into XPGL-data, @oGL("XPGLObjType " determined whom Objekttyp and @oGL("XPGLType " The manner the values.

[head]the stature of/ one XPGL-File[/head]
an XPGL-File is a Textdatei. Lines The with a "/" begin, go as Kommentarzeilen interprets and überlesen. Leerzeilen serve the structure and go too überlesen.

important is the 1. data-row: she has the structure Objekttyp; manner the Werte; amount[; Autonormal] (4 values, through comma separated). Autonormal can omitted. The others values must present his.

Objekttyp:

·P = point
·L = Line
·T = Triangle
·Q = Quad
·LS = Line-Strip
·LL = Line-Loop
·TS = Triangle-Strip
·TF = Triangle-fan
·QS = Quad-Strip
·PY = Polygon

manner the values:

·V = Vertex (Coordinates the Punktes: 3 values/point)
·C = Color (4 values/point)
·T = Textur (2 values/point)
·N = normal(3 values/point)

example: VT (Vertex + Textur)

the V for Vertex must always present his.

amount:

Number of Objects (with Q, T and L) or. Number of spots (with all others).One Quad has 4, one Triangle has 3 and a Line has 2 spots

4 values for "Autonormal":

x, y and z for Mittelpunkt the Objektes and the Normalwert (0.5 if The illumination from the outside comes, -0.5 as they of inside comes). go these values withal the Kennzeichens "N" omitted, go this The Defaultwerte of 0, 0, 0, 0.5 adopted.

Examples of a 1. row:

T;VT;36 (36 Triangles with Vertex and Textur)

T;VTN;36;0,-0.5,-2,0.5 (additional automatisches create the normal-Vektors, if no normal-values present are

The further Lines include The Wertegruppen: groups separated through ";", values separated through ",". the Dezimaltrennzeichen with whom Values is the point. The Wertegruppen must in the same Order stand, as mark for manner the values. in the entrapment of "VT" stand means in eachone row first of all The three through comma separated Coordinates, then follow to one Semikolon the two through one comma separated Textur-Coordinates.

becomes with the Werteart n with indicated, lying but no n-values to, go these automatically generiert.

an ausführlichere Description with Examples finds itself in the ogl->xpgl 

[head]Beispielinhalt of/ one XPGL-File:[/head]
T;VT;36
// normal are not indicated, therefore becomes 1, 1, 1 taken
// Floor 1
-13.0, 0, -13.0; 0.0, 130.0
-13.0, 0,  13.0; 0.0, 0.0
13.0, 0,  13.0; 130.0, 0.0
-13.0, 0, -13.0; 0.0, 130.0
13.0, 0, -13.0; 130.0, 130.0
13.0, 0,  13.0; 130.0, 0.0
// Ceiling 1
-3.0, 1.0, -3.0; 0.0, 1.0
-3.0, 1.0,  3.0; 0.0, 0.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.0, 1.0, 0.5; 0.0, 1.0
-2.0, 0.0, 0.5; 0.0, 0.0
// Left hallway - Hi
-3.0, 1.0, -0.5; 1.0, 1.0
-3.0, 0.0, -0.5; 1.0, 0.0
-2.0, 0.0, -0.5; 0.0, 0.0
-3.0, 1.0, -0.5; 1.0, 1.0
-2.0, 1.0, -0.5; 0.0, 1.0
-2.0, 0.0, -0.5; 0.0, 0.0
// Right hallway - Lw
3.0, 1.0, 0.5; 1.0, 1.0
3.0, 0.0, 0.5; 1.0, 0.0
2.0, 0.0, 0.5; 0.0, 0.0
3.0, 1.0, 0.5; 1.0, 1.0
2.0, 1.0, 0.5; 0.0, 1.0
2.0, 0.0, 0.5; 0.0, 0.0
// Right hallway - Hi
3.0, 1.0, -0.5; 1.0, 1.0
3.0, 0.0, -0.5; 1.0, 0.0
2.0, 0.0, -0.5; 0.0, 0.0
3.0, 1.0, -0.5; 1.0, 1.0
2.0, 1.0, -0.5; 0.0, 1.0
2.0, 0.0, -0.5; 0.0, 0.0

 
12/22/06  
 



Note / Question or Comment to the Help--Topic


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

628 Views

Untitledvor 0 min.
H.Brill05/31/24
Sven Bader08/03/21
ByteAttack02/04/16
maxilars11/26/15
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie