English
Source / code snippets

Collison Ogl Oglglreadpixels Viereck

 
The first Collisionsabfrage with the Viereck 128X128 Pixel.
I form the Viereck now Black ex, so möglichs many colours taken go can.
there otherwise others colours in the Viereck also The Collisionsfarbe having ,addressed go.
If the car the "Viereck" touched ,which herewith prepares watts : ogl("glReadPixels",140,140,128,128,~GL_BGRA,~GL_UNSIGNED_BYTE,ogl_rgb#) , becomes the worth 255 spend.

Massgebend are The colours RGB greater 252. Can anytime in the CPP-File Change.

have first once The request with the DEV C++ made or DLL prepares., because I in ASM first again failed be.
The DEV C++ Source-Files are too with thereby.

The zipper is appended.

mfg

11 kB
Kurzbeschreibung: The Files
Hochgeladen:08/21/08
Downloadcounter139
Download
 
08/21/08  
 




Jörg
Sellmeyer
Very beautiful! functions lovely - it would only beautiful, if you too yet somewhere vermerkst, that the Keys Q,W,E,s motions cause. I at least do not have any Scancodes in the head
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/21/08  
 



here sees one too The enormous speed from the DEV C++ Dll.
If itself the car ausserhalb the Rechteckes moving, must 128X128x3 inquire erfolgen whether something happens and it moving itself still super quick without To to judder.
the was first my erstes target. an fliessende movement with plenty controls.

a irregular body could one too inquire.
on it becomes now getüftelt.

try too this still in ASM umzusetzen.

mfg
peter
 
08/21/08  
 



here's the ASM-code.

before, before the xpse used becomes , must these Änderung erfolgen:

ogl("glReadPixels",140,140,128,128,~GL_BGRA,~GL_UNSIGNED_BYTE,ogl_rgb#) > GL_BGRA Remove
ogl("glReadPixels",140,140,128,128,32993,~GL_UNSIGNED_BYTE,ogl_rgb#) > The number 32993 reinsetzen

The reason is, the in the INC-File these Variable not yet reingesetzt watts.

whom appeal with the variables z% and the Drawbefehl too The Variable z% transfer : DrawText 20,160,(stature$("######0 ",z%))
then z%=Call(xpia_getprocaddressm(xpia_hmodule&,"rgb_farbe"),ogl_rgb#,groesse%)

in the attachment is the entire Program for Assembler xpse as zipper.

mfg
peter
CompileMarkSeparation

6 kB
Hochgeladen:08/21/08
Downloadcounter107
Download
 
08/21/08  
 




Frank
Abbing

in the attachment is the entire Program for Asssembler xpse as zipper.


Peter, the Inline-Assembler means XPIA. XPSE is the Precompiler...
 
08/21/08  
 



Perhaps begreife I the still in my life.

mfg
 
08/22/08  
 



Ablaufzeiten (gross)the Collisionsabfrage the Rechteckes 128X128X4 with 10000 Schleifendurchgänge :
computer with 1,6 Gigahz

The Profan While-Leerschleife need ca 200ms.

ASM with XPIA/XPSE (DLL) are it 4550 ms .

DEV C++ are it 6210 ms ( a For-Loop).

DEV C++ are it 6260 ms (While-Loop).

with 10000 durchgängen rewards it itself this in ASM umzusetzen, are ca 1,5 sec Difference.

mfg
peter
 
08/22/08  
 




Frank
Abbing
your Assembler-routine isn't optimiert. If you tappt im dunkeln umstellst of variables on tab is yet some More drin. ca. 20 percent, wealth I.

These routine keeps your Programmstruktur with, ought to but already work faster:
CompileMarkSeparation
If 0

    AsmStart rgb_farbe (ogl_rgbxy#,groesse%)

        mov edi,para2
        xor ecx,ecx
        mov ebx,para1

        .while ecx<=edi

            mov al,[ebx]
            mov cl,[ebx+1]
            mov dl,[ebx+2]

            .if al>252

                mov eax,255
                .break

            .endif

            .if cl>252

                mov eax,255
                .break

            .endif

            .if dl>252

                mov eax,255
                .break

            .endif

            lea ebx,[ebx+4]
            lea ecx,[ecx+4]

        .endw

    AsmEnd(z%)

EndIf

 
08/22/08  
 




Jörg
Sellmeyer

The Profan While-Loop need ca 200ms.


are You sure, that Profan More as 20-time faster is as ASM?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/22/08  
 



should Empty-Loop heissen, because I integrally supra too of gross promise.
The Test runs with all in the same While-Loop of Profan

I have too time this Freebasic tested to that DLL create.

who in Freebasic a DLL create would like and no ASM can/would like and no "C", is so well bedient.

The Freebasic-DLL need 7400ms means only 1 second longer as DEV C++.

might for Basicprogrammierer , a DLL create would of/ one the best Freewarealternativen his.

with of my Collisionstest-Auswertung with the Freebasic-DLL on-screen on the graphic, is me the Difference optisch not noticed. the Objekt flitzte furthermore still hither and thither withal the Überprüfung/Auswertung.

mfg
peter
 
08/22/08  
 



Frank, your need 3,5 sec longer.

I knows now not, How with the whom Registern and LEA there functions.
On each drop must The address always circa "4" go on.

mfg
peter
 
08/22/08  
 




Frank
Abbing

Frank, your need 3,5 sec longer.


incorrect! tab works always faster as Varablen in memory, even if tappt im dunkeln pub are. such Tests have I already dozens implemented.
And so a Assemblerroutine needed never 3,5 sec longer, tappt im dunkeln needed at all only few Millisekunden altogether. even if You with grossen Bitmaps work. You can the gladly with the ProSpeed.dll testing, The numerous Bitmapeffekte knows. Irgendwas goes with your Tests vast schief.
What exactly should The routine because make? tappt im dunkeln fractures still immediate ex, as they a very hellen Farbwert finds. If you a Robotersoftware write want, The The data of/ one Cam auswertet, must You already The amount heller Bildpunkte count. before but the Cambild gray make, or. Black-knows.
 
08/22/08  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.973 Views

Untitledvor 0 min.
Tango10/30/21
Sven Bader08/01/21
H.Brill10/08/20
funkheld05/25/16
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