English
Opportunities and suggestions

wish: experimental function

 
- Page 1 -


Gedanklich from: [...] 

@Roland:

Lauter functions which How created are circa first in a experimental-function adopted To go - in example can with XProfan OpenGL no positions- and farbgenauen Textausgaben produce and of/ one einfachen function (XProfan-View source long ago present) Gibts to remedy circa with OpenGL too nice Texteffekte and Textausgaben produce to as any others too do (not umsonst) over a Font-Textur.

On german: Roland building still Please a function The to that example experimental means, and these experimental Please a for
CompileMarkSeparation
proc OGL.DRAWSYSTEXT

    PARAMETERS X!,Y!,TXT$,SZ!,SZY!,HOPX!,SZX!

    IF %PCOUNT<7

        SZX!=1

    ENDIF

    IF %PCOUNT<6

        HOPX!=1

    ENDIF

    IF %PCOUNT<5

        SZY!=1

    ENDIF

    IF %PCOUNT<4

        SZ!=1

    ENDIF

    HOPX!=HOPX!*SZ!
    SZX!=SZX!*SZ!
    var XX!=X!+32*SZX!
    var YY!=Y!+32*SZ!*SZY!
    var TX!=0
    var TY!=0
    var TXX!=0
    var TYY!=0
    var COLUMN&=0
    var ROW&=0
    var O&=0
    var C&=LEN(TXT$)
    OGL(push)
    OGL(texture,OGL.TEXSYSFNT&,1)
    HOPX!=16*HOPX!

    WHILELOOP C&

        O&=ORD(MID$(TXT$,&LOOP,1))
        COLUMN&=O&16
        ROW&=O&-COLUMN&*16
        TX!=0.0625*COLUMN&-0.005
        TY!=0.0625*(16-ROW&-1)-0.005
        TXX!=TX!+0.0625
        TYY!=TY!+0.0625
        OGL(glBegin,7)
        OGL(glTexCoord2f,TX!,TYY!)
        OGL(glVertex3f,X!,Y!,0)
        OGL(glTexCoord2f,TXX!,TYY!)
        OGL(glVertex3f,XX!,Y!,0)
        OGL(glTexCoord2f,TXX!,TY!)
        OGL(glVertex3f,XX!,YY!,0)
        OGL(glTexCoord2f,TX!,TY!)
        OGL(glVertex3f,X!,YY!,0)
        OGL(glEnd)

    ENDWHILE

    OGL(pop)
    RETURN HOPX!

 href='./../../function-references/XProfan/endproc/'>endproc


means
CompileMarkSeparation.

in example feel I The Implementierung of/ one Systemvariable $appDataDir in the Contrast To such zeitkritischen Things quite irritierend, there one $appDataDir seldom meaningfully in creep usage find and is one $appDataDir with z.B. 3 own XProfanzeilen To supplant and that the function this already jahrelang everywhere rumbaumelt.

Perhaps is not unsinnvoller, functions To implementieren, which recurring and zeitkritische Vorgänge unroof, around the speed the XProfanprogrammes too moreover konkurrenzfähig To style.

The Idea with the Experimental-function is imho now already over 1,5 years old what about me have - if I me right entsinne - noo Ideenfeedback. i want not begin me self as an Nervensäge vorzukommen.
 
04/07/09  
 



 
- Page 1 -


Nachtrag:
iF
i want not begin me self as an Nervensäge vorzukommen.

To late!
 
04/07/09  
 



OGL.DRAWSYSTEXT has today his 2 jähriges Waiting on a reaction given, finds unfortunately only in z.B. of/ one DLL his home.

but not this lauter Posts had I me such DLL same write can, but I wished show take off crazy Games one with XProfan produce can - with reinem XProfan circa particularly so To campaign in game.
 
04/08/09  
 




RGH
Hello iF,

I have me with of/ one Kontainerfunktion experimental not yet so right make friends can.
the birgt still The menace, that Source with this function published and be these too yet months and years to the publication into Weiten the WWW (or this Community) herumgeistern. then come sure soon any people, The these herunterladen and try want and again short to one Herzkasper stand, because these experimentellen Kontainerfunktionen not any more or differently functions and now The gigant Source code paraphrase must.

To your OGL-function: Füge still time one kurzes XProfan-Beispielprogramm hinzu, the one with sees, what tappt im dunkeln power and what your skills demonstrating and erleutere your Parameter time in verständlichem (Helpfile-geeignetem) german. then look I me The thing at times and pack tappt im dunkeln möglicherweise on The ToDo-list for next XProfan-Version. promised!

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/08/09  
 



Font/Textausgaben malen, The/a Textur-File contain any Chars and the function draw from this Chars properly texturierte Vertexe so the on The function übergebene String by OpenGL outputted becomes.

The Parameter:

X!,Y! : position the auszugebenen Textes
TXT$ : Auszugebener Text

Optionale Parameter
SZ! : YX Skalierungsfaktor/Schriftgrösse
SZY! : Vertikal-distortion for typische effects
HOPX! : Sprungweite between whom Chars
SZX! : Horizontal-distortion for typische effects

The above-mentioned function is (naturally) optimiert on speedy process by XProfan - one Delphi or C code would sure something differently program More speed bring. (z.B. without MID$ in the Loop)

the supra is only a abgespeckte Variante, the Original has another optionale xtraProcAddr circa Texts z.B. simply of outer rotate or fold To let.
CompileMarkSeparation
That the xtraProcAddr is in the Grunde a simple (zugleich but äusserst effective) thing, have I but unfortunately yet no Feedback on The question whether You from XProfan out a XProfan-function Call can its address by ProcAddr related watts. (I faith but: naturally) therefore have I this Part from the obigestem Code ogl.drawSysText first herausgenommen too circa not completely To to confuse.

likewise - but only circa Examples To name for Perhaps testweise implementierbare functions - have I aide-creep (functions) for Terrainbildung on of/ one expanse or on one Sphere with difficulty (for me with difficulty) prepares, the process by XProfan unschön long need but nativ eingebunden (what imho one Klax is) would it very bereichernd and further ideas backing.

to that Topic experimental: this is one Gedankenanstoss!

Similar as z.B. in OpenGL-Umsetzungen experimentelle functions gives with omen the Experimenterfinders nvx_* ata_* would it Perhaps integrally useful if you functions - z.B. which erstmalig in a Version To Versuchszwecken implementiert get - Schonmal anbietest but erklärst: no Support/ No warranty/ Experimentalfunktionen.

virtual this I had (naturally) a Kontainerfunktion circa no IDs To verbraten - I but faith (unfortunately _auch not _weiss, because no Response To [...]  ), that it one IDs-trouble not any more gives.

Perhaps means too simply durchzählen means experimental(1..x,param1..x).

to the Codes The then rumschwirren: there it (no?) IDs-trouble gives ought to it nothing turn off, a later complete integrierte Version of/ one function too later yet by Kontainerfunktion experimental aufrufbar To style.

The only technical disadvantage the itself me erschließt would, that The Runtime for a couple byte on Size win.

what would optimal: If one someone a crazy function posting with selected Antestung of/ one leichtfüssigen Integrierung for More speed: clear, no trouble for Roland - ex to experimental. Perhaps arise then from the a or others experimentellen function - which itself vlt. already in lauter versions behauptet has - a new real function.

2011 then same place same Welle?

RGH
Hello iF,

I have me with of/ one Kontainerfunktion experimental not yet so right make friends can.


then name tappt im dunkeln still RGH! (i'm already clear, that it you not around the name goes, I find experimental too thick...)
 
04/08/09  
 




RGH
Hello iF,
it missing me still one Beispielcode, circa above-mentioned (integrally far above-mentioned) function time auszuprobieren and action To see.
Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/08/09  
 



Jupp, have only home my /develope - I building you what beautiful to zurecht.

Rumstreunende (and compiled) Examples Gibts in the Community however some, z.B. too always if I the Topic tried again (softly-softly) anzustreifen.

however would it beautiful for me to know, whether I of/ one XProfan-function a with ProcAddr bezogene Funktionsadresse transfer can so these by ProcAddr bezogene function then from the nativen XProfan-function in the Bedarfsfall carryed out go could. (Callbacks if you so want.)

then would I namely rather same The Variante _mit xtraProcAddr Translated beispielisieren, went above then crazy effect How z.B. itself for a centre drehende Chars or Chars on Sinuswelle etc..

only without The nativ vorliegende Hilfsfunktion in the XProfan unfortunately not really in z.B. play zeitkritisch and effectively einsetzbar.
 
04/08/09  
 




RGH
Hi,
i'd first The first Variante (without these ProcAddr-story) vorziehen and times look at, whether from it take off XProfan 12 go can.
Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/08/09  
 



an durchdachtere Variante would a oglDrawTiles-function, for I time one Minimalbeispiel (haha) aufbereitet have:
CompileMarkSeparation
 {$iq}
def &screenX 1024
def &screenY 768
window &screenX,&screenY
hWnd.setInnerSize(&screenX,&screenY)
var hPic&=create(hNewPic,512,512,0)
var y&=
startPaint hPic&
useFont fixedsys,1,0,0,0,0
textColor $FFFFFF,-1

whileLoop 256

    drawText &loop mod 16*32,&loop16*32,chr$(&loop+1)

wend

endPaint
savepic fixedsys.bmp,hpic&
startpaint hPic&
cls $008800
usePen 0,0,$33BB33

whileLoop 0,16

    line &loop*32,0 - &loop*32,512
    line 0,&loop*32 - 512,&loop*32

wend

usePen 0,0,$006611

whileLoop 0,16

    line 0,(&loop*32-1) - 512,(&loop*32-1)
    line (&loop*32-1),0 - (&loop*32-1),512

wend

whileLoop 5000

    setPixel rnd(512),rnd(512),$55EE55

wend

savepic grid.bmp,hpic&
deleteObject hPic&
//
ogl(init,%hWnd,0,0,0,0)
var meineTiles&=ogl(loadTextureBMP,fixedsys.bmp,1)
var meineTiles2&=ogl(loadTextureBMP,grid.bmp,1)
ogl(posMode,1)
var myList&=ogl(startList)
var s$=

whileLoop 16

    s$=

    whileLoop 16

        s$=s$+chr$(&loop+y&*16)

    wend

    ogl.drawTiles(0,100+y&*16,s$,16,32,1,0.25)
    inc y&

wend

ogl(endList)
var pa&=procAddr(myOGLTileOutCallBackProc,4)
var fps&=0
var fpsT&=&getTickCount+1000
var fpsC&=0

while 1

    inc fpsC&

    if fpsT&<&getTickCount

        inc fpsT&,1000
        fps&=fpsC&
        fpsC&=0

    endif

    ogl(clear)
    ogl(move,0,0,-5)
    ogl(texture,meineTiles&,1)
    ogl(color,0,0,1,1)
    ogl(rotate,&getTickCount/700,&getTickCount/500,&getTickCount/300)
    ogl(cuboid,1,1,1)
    ogl(color,1,1,1,1)
    ogl.2d()
    ogl(drawList,myList&)
    ogl.drawTiles(0,0,ABC Hallo Welt: +str$(&getTickCount),16,32,1,0.25)
    ogl.drawTiles(0,200,ABC Hallo Welt: +str$(&getTickCount),16,32,4,0.25,pa&)
    ogl(color,0,1,0,1)
    ogl.drawTiles(0,500,FPS: +str$(fps&),16,32,1,0.25)
    ogl(color,1,1,1,1)
    ogl(texture,meineTiles2&,1)

    whileLoop 16

        ogl.drawTiles(650,5+&loop*32,chr$(&loop*4)+chr$(&loop*4+1)+chr$(&loop*4+2)+chr$(&loop*4+3),16,32)

    wend

    testCorrectOriginLines()
    ogl(show)
    case %mousePressed=2 : break

wend

//ogl(deleteTexture,1)
ogl(done)
end

proc myOGLTileOutCallBackProc

    parameters x&,y&,c&,o&
    ogl(move,c&*35,sin(c&+&getTickCount*0.003)*10+350,0)
    //ogl(color,rnd(2),rnd(2),rnd(2),1)

endproc

proc ogl.drawTiles

    parameters x!,y!,tiles$,tilesPerRow&,pixelPerTile&,scaleF!,dropF!,tileOutCallBack&
    case %pCount<8 : tileOutCallBack&=0
    case %pCount<7 : dropF!=1
    case %pCount<6 : scaleF!=1
    var c&=len(tiles$)
    casenot c& : return x!
    var COLUMN&=0
    var ROW&=0
    var TX!=0
    var TY!=0
    var TXX!=0
    var TYY!=0
    var o&=0
    var f!=(1/tilesPerRow&)
    var xx!=x!+pixelPerTile&*scaleF!
    var yy!=y!+pixelPerTile&*scaleF!
    ogl(push)

    whileLoop c&

        o&=ord(mid$(tiles$,&loop,1))-1
        row&=o&*f!
        column&=o&-row&*tilesPerRow&
        tx!=f!*column&
        ty!=f!*(tilesPerRow&-row&-1)
        txx!=tx!+f!
        tyy!=ty!+f!
        messagebox str$(tx!)+ +str$(ty!)+ +str$(txx!)+ +str$(tyy!),,0

        if tileOutCallBack&

            ogl(push)
            call(tileOutCallBack&,int(x!),int(y!),&loop,o&)

        endif

        oGL(glBegin,~GL_QUADS)
        oGL(glTexCoord2f,tx!,tyy!)
        oGL(glVertex3f,x!,y!,0)
        oGL(glTexCoord2f,txx!,tyy!)
        oGL(glVertex3f,xx!,y!,0)
        oGL(glTexCoord2f,txx!,ty!)
        oGL(glVertex3f,xx!,yy!,0)
        oGL(glTexCoord2f,tx!,ty!)
        oGL(glVertex3f,x!,yy!,0)
        ogl(glEnd)

        ifnot tileOutCallBack&

            ogl(move,pixelPerTile&*dropF!*scaleF!,0,0)

        else

            ogl(pop)

        endif

    wend

    OGL(pop)
    RETURN pixelPerTile&*c&*dropF!*scaleF!

endproc

proc ogl.2d

    ogl(origin,0,0,0)
    ogl(posmode,1)
    ogl(glMatrixMode,~GL_PROJECTION)
    ogl.ortho(0,&screenY,&screenX,0,0,256)

endproc

proc ogl.ortho

    parameters x&,y&,xx&,yy&,z&,zz&
    ogl(glLoadIdentity)
    ogl(glViewport,0,0,&screenX,&screenY)
    declare m#
    dim m#,48
    float m#,0 =x&,xx&,y&,yy&,z&,zz&
    ogl(glOrtho,long(m#,0 ),long(m#,4 ),long(m#,8 ),long(m#,12),long(m#,16),long(m#,20),long(m#,24),long(m#,28),long(m#,32),long(m#,36),long(m#,40),long(m#,44))
    dispose m#

endproc

proc hWnd.setInnerSize

    parameters x&,y&
    setwindowpos %hWnd = %winLeft,%winTop - ((%winRight-%winLeft)-(width(%hWnd)-x&)),((%winBottom-%winTop)-(height(%hWnd)-y&));0

endproc

proc ogl.line

    parameters x!,y!,xx!,yy!
    ogl(glBegin,~GL_LINES)
    ogl(glVertex3f,x!,y!,)
    ogl(glVertex3f,xx!,yy!,)
    ogl(glEnd)

endproc

proc testCorrectOriginLines

    ogl(color,1,1,1,1)

    whileLoop 0,&screenX,2

        ogl.line(&loop,0,&loop,&screenY)

    wend

    whileLoop 0,&screenY,2

        ogl.line(0,&loop,&screenX<
a class=s4 href='./../../function-references/XProfan/loop/'>loop) wend endproc

Wohlbemerkt it only around the function ogl.drawTiles went. (with or without extraproc)

so can next to the utility quick Tiles view these function too for speedy derartige Textausgabe bring into action.

1.033 kB
Hochgeladen:04/09/09
Downloadcounter116
Download
1.034 kB
Hochgeladen:04/09/09
Downloadcounter101
Download
 
04/09/09  
 



I have whom Beispielquelltext for oglDrawTiles over again revised/updated, on the function ogl.drawTiles self has nothing changed.

in the Interpreter access with the new example 4 FPS and Runtime around the 20 FPS.

would be ogl.drawTiles nativ would the Interpreter by me ~20 FPS and the Runtime with abgeschaltetem VSync ~110 FPS achieve what naturally class would.
 
04/09/09  
 



On Pentium 4 with 3.4 GHz to Compilierung with XPSE+XProfancompiler hot 4 Fps (
but first to langer Vorausberechnungszeit of ca 10 sec... Hmmmmmm...
 
04/16/09  
 




Nico
Madysa
1 - in Worten: one - Frame(s) per Sekunde; aufgerundet, understand itself.
sit here but too in a 450-MHz-computer and Windows 2000.
 
Nico Madysa
04/17/09  
 



 
- Page 2 -


only
CompileMarkSeparation
proc ogl.drawTiles

    parameters x!,y!,tiles$,tilesPerRow&,pixelPerTile&,scaleF!,dropF!,tileOutCallBack&
    case %pCount<8 : tileOutCallBack&=0
    case %pCount<7 : dropF!=1
    case %pCount<6 : scaleF!=1
    var c&=len(tiles$)
    casenot c& : return x!
    var COLUMN&=0
    var ROW&=0
    var TX!=0
    var TY!=0
    var TXX!=0
    var TYY!=0
    var o&=0
    var f!=(1/tilesPerRow&)
    var xx!=x!+pixelPerTile&*scaleF!
    var yy!=y!+pixelPerTile&*scaleF!
    ogl(push)

    whileLoop c&

        o&=ord(mid$(tiles$,&loop,1))-1
        row&=o&*f!
        column&=o&-row&*tilesPerRow&
        tx!=f!*column&
        ty!=f!*(tilesPerRow&-row&-1)
        txx!=tx!+f!
        tyy!=ty!+f!
        messagebox str$(tx!)+ +str$(ty!)+ +str$(txx!)+ +str$(tyy!),,0

        if tileOutCallBack&

            ogl(push)
            call(tileOutCallBack&,int(x!),int(y!),&loop,o&)

        endif

        oGL(glBegin,~GL_QUADS)
        oGL(glTexCoord2f,tx!,tyy!)
        oGL(glVertex3f,x!,y!,0)
        oGL(glTexCoord2f,txx!,tyy!)
        oGL(glVertex3f,xx!,y!,0)
        oGL(glTexCoord2f,txx!,ty!)
        oGL(glVertex3f,xx!,yy!,0)
        oGL(glTexCoord2f,tx!,ty!)
        oGL(glVertex3f,x!,yy!,0)
        ogl(glEnd)

        ifnot tileOutCallBack&

            ogl(move,pixelPerTile&*dropF!*scaleF!,0,0)

        else

            ogl(pop)

        endif

    wend

    OGL(pop)
    RETURN pixelPerTile&*c&*dropF!*scaleF!

='./../../function-references/XProfan/endproc/'>endproc

should nativ his and the trouble would story, too with ausgebauten tileOutCallBack immernoch for much (How Textausgaben) important.
 
04/17/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.476 Views

Untitledvor 0 min.
Jörg Sellmeyer09/09/14
H.Brill08/31/14
iF05/13/13
p.specht04/15/13
More...

Themeninformationen



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