Español
Ensamblador Foro

Fehlermeldung beim Compilieren...

 
Hier kommt ahora el Fehlermeldung de XPIA :
Error: Fehlende Headerfile : GL_BGRA
Procnaehe: ERZEUGETEX

Was muss hier umgeändert voluntad?
Puedo no eingesetzten ASM-Code compilieren.

mfg
peter
KompilierenMarcaSeparación
 $H Windows.ph

If 0

    AsmStart rgb_umwandlung

        Parameters bildxy#,a&
        LOCAL r :BYTE
        LOCAL g :BYTE
        LOCAL b :BYTE
        LOCAL w :DWORD
        mov eax,para2
        mov w,eax
        mov ecx,0
        mov ebx,para1

        .while ecx<=w

            mov al,[ebx+ecx]
            mov b,al
            mov al,[ebx+ecx+1]
            mov g,al
            mov al,[ebx+ecx+2]
            mov r,al
            and b,255
            and g,255
            and r,255
            mov al,b

            .if al>0

                jmp wandle

            .endif

            mov al,g

            .if al>0

                jmp wandle

            .endif

            mov al,r

            .if al>0

                jmp wandle

            .endif

            mov al,0
            mov [ebx+ecx+3],al
            mov al,b
            mov [ebx+ecx+2],al
            mov al,r
            mov [ebx+ecx],al
            jmp weiter
            wandle:
            mov al,255
            mov [ebx+ecx+3],al
            mov al,b
            mov [ebx+ecx+2],al
            mov al,r
            mov [ebx+ecx],al
            weiter:
            add ecx,4

        .endw

    AsmEnd

EndIf

declare bild1$
declare x1!,y1!,dx!,dy!,winkel!
declare hWin&
declare width%,height%
declare bild_h&,a&,bild_h1&
declare bmi#,bildxy# ,ogl_rgb#
var groesse%=128*128*4
dim ogl_rgb#,groesse%
var texid%=0
var ende%=1
Window 20,20-600,450
Cls @RGB(220,220,220)
hWin& = @Create("text", %hWnd, "Test1", 220, 10, 350, 350)
oGL("Init", hwin&, 0,0, 0, 0)
oGL("PosMode", 1)
ogl("glReadBuffer",~GL_Back)
bild1$="auto.bmp"
var tex.auto%=erzeugetex(bild1$)
var tex.grund%=OGL("loadtexturebmp","tile1.bmp",3)
height%=128
width%=128
dispose bmi#
bitmap_header()
mcls 128,128,0
bild_h1& = Create("hPic", 0,"&MEMBMP" )

WHILE ende%

    sleep 1

    if isKey(81)

        winkel!=winkel!+0.4

    endif

    if isKey(69)

        winkel!=winkel!-0.4

    endif

    if isKey(87)

        y1!=Sin(winkel!/180.0*pi())*0.02
        x1!=Cos(winkel!/180.0*pi())*0.02
        dx!=dx!-x1!
        dy!=dy!-y1!

    endif

    if isKey(83)

        y1!=Sin(winkel!/180.0*pi())*0.02
        x1!=Cos(winkel!/180.0*pi())*0.02
        dx!=dx!+x1!
        dy!=dy!+y1!

    endif

    drawglscene()
    StartPaint %hwnd
    DrawText 20,160,(Format$("######0      ",byte(ogl_rgb#,2)))
    DrawText 60,160,(Format$("#####0      ",byte(ogl_rgb#,1)))
    DrawText 100,160,(Format$("######0      ",byte(ogl_rgb#,0)))
    EndPaint

ENDWHILE

proc drawglscene

    OGL("Clear")
    ogl("push")
    OGL("origin",dx!,dy!,-3)
    OGL("texture",tex.auto%,1)
    OGL("rotate",0,0,winkel!)
    OGL("quad",0.7,0.7)
    ogl("pop")
    ogl("glReadPixels",140,140,128,128,~GL_BGRA,~GL_UNSIGNED_BYTE,ogl_rgb#)
    ~setDIBits(%hdc,bild_h1&,0,128,ogl_rgb#,bmi#,0)
    drawpic bild_h1&,10,10,0
    OGL("move",0,0,-3)
    OGL("texture",tex.grund%,10)
    OGL("move",0,0,0)
    OGL("quad",8,8)
    OGL("origin",dx!,dy!,-3)
    OGL("texture",tex.auto%,1)
    OGL("rotate",0,0,winkel!)
    OGL("quad",0.7,0.7)
    OGL("show")

endproc

proc bitmap_header

    def &BI_RGB 0
    def &DIB_RGB_COLORS 0
    struct BITMAPINFOHEADER =
    biSize&, biWidth&, biHeight&, biPlanes%, biBitCount%, biCompression&,
    biSizeImage&, biXPelsPerMeter&, biYPelsPerMeter&, biClrUsed&, biClrImportant&
    dim bmi#,BITMAPINFOHEADER
    clear bmi#

    with bmi#

        .biSize&        = sizeof(bmi#)
        .biWidth&       = width%
        .biHeight&      = height%
        .biPlanes%      = 1
        .biBitCount%    = 32
        .biCompression& = &BI_RGB
        .biSizeImage&   = ((.biWidth& * .biBitCount%  8 - 1) | 3 + 1) * abs(.biHeight&)

    endwith

endproc

proc erzeugetex

    parameters namebild$
    mcls 0,0,0
    startpaint -1
    mloadbmp namebild$,0,0
    endpaint
    height%=%bmpx
    width%=%bmpy
    dispose bmi#
    bitmap_header()
    bild_h& = Create("hPic", -1, namebild$)
    a&=bmi#.biSizeImage&
    dim bildxy#,a&
    ~GetDIBits(%hdc,bild_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
    Call(xpia_getprocaddressm(xpia_hmodule&,"rgb_umwandlung"),bildxy#,a&)
    OGL("glGenTextures",1,ADDR(texid%))
    OGL("glBindTexture",~GL_TEXTURE_2D,texid%)
    OGL("glEnable",~GL_ALPHA_TEST)
    OGL("glAlphaFunc",~GL_GREATER, 0.1)
    OGL("glTexParameteri",~GL_TEXTURE_2D, ~GL_TEXTURE_MAG_FILTER, ~GL_LINEAR)
    OGL("glTexParameteri",~GL_TEXTURE_2D, ~GL_TEXTURE_MIN_FILTER, ~GL_LINEAR)
    OGL("gluBuild2DMipmaps",~GL_TEXTURE_2D, ~GL_RGBA, height%, width%, ~GL_RGBA, ~GL_UNSIGNED_BYTE, bildxy#)
    disponer bildxy#
    RETORNO texid%

ENDPROC

 
20.08.2008  
 



Usted debe langsam xpse y xpia auseinanderhalten puede - el siempre xpse-Meldungen y no de XPIA.

El Meldung es selbsterklärend, erzeuge hierzu una Minimalbeispiel y poste lo en el XPSE-Foro.
 
20.08.2008  
 




Frank
Abbing
El Fehlermeldung kommt no de XPIA! GL_BGRA es unbekannt, por lo tanto el Fehler. Der Valor para el Variable es 32993.

Como du XPIA benutzen willst, musst du auch XPSE (el Precompiler) installiert haben. Und el benötigt no Windows.ph.
Yo habe deinen Code umgestellt, así funktioniert él en me (jedenfalls se el Ventana geöffnet, el benötigte Bild fehlt me). Aber daran denken, XPSE en el Editor aufzurufen, no el Profano-Compiler. Hier el umgestellte Code:
KompilierenMarcaSeparación
 {$cleq}

If 0

    AsmStart rgb_umwandlung

        Parameters bildxy#,a&
        LOCAL r :BYTE
        LOCAL g :BYTE
        LOCAL b :BYTE
        LOCAL w :DWORD
        mov eax,para2
        mov w,eax
        mov ecx,0
        mov ebx,para1

        .while ecx<=w

            mov al,[ebx+ecx]
            mov b,al
            mov al,[ebx+ecx+1]
            mov g,al
            mov al,[ebx+ecx+2]
            mov r,al
            and b,255
            and g,255
            and r,255
            mov al,b

            .if al>0

                jmp wandle

            .endif

            mov al,g

            .if al>0

                jmp wandle

            .endif

            mov al,r

            .if al>0

                jmp wandle

            .endif

            mov al,0
            mov [ebx+ecx+3],al
            mov al,b
            mov [ebx+ecx+2],al
            mov al,r
            mov [ebx+ecx],al
            jmp weiter
            wandle:
            mov al,255
            mov [ebx+ecx+3],al
            mov al,b
            mov [ebx+ecx+2],al
            mov al,r
            mov [ebx+ecx],al
            weiter:
            add ecx,4

        .endw

    AsmEnd

EndIf

declare bild1$
declare x1!,y1!,dx!,dy!,winkel!
declare hWin&
declare width%,height%
declare bild_h&,a&,bild_h1&
declare bmi#,bildxy# ,ogl_rgb#
var groesse%=128*128*4
dim ogl_rgb#,groesse%
var texid%=0
var ende%=1
Window 20,20-600,450
Cls @RGB(220,220,220)
hWin& = @Create("text", %hWnd, "Test1", 220, 10, 350, 350)
oGL("Init", hwin&, 0,0, 0, 0)
oGL("PosMode", 1)
ogl("glReadBuffer",GL_Back)
bild1$="auto.bmp"
var tex.auto%=erzeugetex(bild1$)
var tex.grund%=OGL("loadtexturebmp","tile1.bmp",3)
height%=128
width%=128
dispose bmi#
bitmap_header()
mcls 128,128,0
bild_h1& = Create("hPic", 0,"&MEMBMP" )

WHILE ende%

    sleep 1

    if isKey(81)

        winkel!=winkel!+0.4

    endif

    if isKey(69)

        winkel!=winkel!-0.4

    endif

    if isKey(87)

        y1!=Sin(winkel!/180.0*pi())*0.02
        x1!=Cos(winkel!/180.0*pi())*0.02
        dx!=dx!-x1!
        dy!=dy!-y1!

    endif

    if isKey(83)

        y1!=Sin(winkel!/180.0*pi())*0.02
        x1!=Cos(winkel!/180.0*pi())*0.02
        dx!=dx!+x1!
        dy!=dy!+y1!

    endif

    drawglscene()
    StartPaint %hwnd
    DrawText 20,160,(Format$("######0      ",byte(ogl_rgb#,2)))
    DrawText 60,160,(Format$("#####0      ",byte(ogl_rgb#,1)))
    DrawText 100,160,(Format$("######0      ",byte(ogl_rgb#,0)))
    EndPaint

ENDWHILE

proc drawglscene

    OGL("Clear")
    ogl("push")
    OGL("origin",dx!,dy!,-3)
    OGL("texture",tex.auto%,1)
    OGL("rotate",0,0,winkel!)
    OGL("quad",0.7,0.7)
    ogl("pop")
    ogl("glReadPixels",140,140,128,128,32993,GL_UNSIGNED_BYTE,ogl_rgb#)
    setDIBits(%hdc,bild_h1&,0,128,ogl_rgb#,bmi#,0)
    drawpic bild_h1&,10,10,0
    OGL("move",0,0,-3)
    OGL("texture",tex.grund%,10)
    OGL("move",0,0,0)
    OGL("quad",8,8)
    OGL("origin",dx!,dy!,-3)
    OGL("texture",tex.auto%,1)
    OGL("rotate",0,0,winkel!)
    OGL("quad",0.7,0.7)
    OGL("show")

endproc

proc bitmap_header

    def &BI_RGB 0
    def &DIB_RGB_COLORS 0
    struct BITMAPINFOHEADER =
    biSize&, biWidth&, biHeight&, biPlanes%, biBitCount%, biCompression&,
    biSizeImage&, biXPelsPerMeter&, biYPelsPerMeter&, biClrUsed&, biClrImportant&
    dim bmi#,BITMAPINFOHEADER
    clear bmi#

    with bmi#

        .biSize&        = sizeof(bmi#)
        .biWidth&       = width%
        .biHeight&      = height%
        .biPlanes%      = 1
        .biBitCount%    = 32
        .biCompression& = &BI_RGB
        .biSizeImage&   = ((.biWidth& * .biBitCount%  8 - 1) | 3 + 1) * abs(.biHeight&)

    endwith

endproc

proc erzeugetex

    parameters namebild$
    mcls 0,0,0
    startpaint -1
    mloadbmp namebild$,0,0
    endpaint
    height%=%bmpx
    width%=%bmpy
    dispose bmi#
    bitmap_header()
    bild_h& = Create("hPic", -1, namebild$)
    a&=bmi#.biSizeImage&
    dim bildxy#,a&
    GetDIBits(%hdc,bild_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
    Call(xpia_getprocaddressm(xpia_hmodule&,"rgb_umwandlung"),bildxy#,a&)
    OGL("glGenTextures",1,ADDR(texid%))
    OGL("glBindTexture",GL_TEXTURE_2D,texid%)
    OGL("glEnable",GL_ALPHA_TEST)
    OGL("glAlphaFunc",GL_GREATER, 0.1)
    OGL("glTexParameteri",GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
    OGL("glTexParameteri",GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
    OGL("gluBuild2DMipmaps",GL_TEXTURE_2D, GL_RGBA, height%, width%, GL_RGBA, GL_UNSIGNED_BYTE, bildxy#)
    disponer bildxy#
    RETORNO texid%

ENDPROC


P.S.: El erste Línea steuert XPSE y sagt ihm, él se el código compilieren, linken y ausführen.
 
20.08.2008  
 



@Franco: Como oben ya erwähnt es lo hierbei una xpse-Meldung.
 
20.08.2008  
 



Tuve en "Optionen/Allgemeine Einstellungen/Interpreter el xpse.exe eingeben.
Hatte sí gestern ya el otro Programas conmpiliert con BMP-Tex usw.

Posesiones aber el Windows.ph no rausgenommen.

mfg
 
20.08.2008  
 



Dieser Befehl kann todavía no umgesetzt voluntad : GL_BGRA
Kommt bald una Änderung, el estos Variable anerkannt se en lugar de el Ziffer: 32993 ?

mfg
peter
 
20.08.2008  
 




Jac
de
Lad

KompilierenMarcaSeparación
Def &GL_BGRA 32993
>

y luego "&GL_BGRA" nehmen. Es wohl al einfachsten...
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
20.08.2008  
 



Das wäre unsinnig como él xpse nutzt sólo a Laufzeit el Konstante a definieren.

const GL_BGRA=32993

wäre performant. También debería él en el xpse Foro en el Hilo el fehlenden Konstanten esta Konstante puesto...
 
21.08.2008  
 




Frank
Abbing
Und siempre el Link dazu angeben...
 
21.08.2008  
 



Wo muss porque el GL_BGRA reingepackt voluntad.
Posesiones lo veces en el gl.inc ergänzt en el Ordner XPIA,/include wo el GL_RGBA liegt con el Valor : GL_BGRA EQU 32993. Lo se aber siempre todavía gemeckert. Wo muss dieses Variable porque todavía eingetargen voluntad?

mfg
 
21.08.2008  
 



root:

IF
Usted debe langsam xpse y xpia auseinanderhalten puede - el siempre xpse-Meldungen y no de XPIA.


jmp root
 
21.08.2008  
 



Mein Wunsch es el, esta Variable GL_BGRA como anzulegen, wo ellos hingehört, sin el Yo una Ersatzzahl dafür suchen muss si yo xpse benutze.

mfg
 
21.08.2008  
 



Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

7.069 Views

Untitledvor 0 min.
Georg Teles09.01.2016
Magda07.09.2014
iF22.08.2014
ByteAttack22.08.2014
Más...

Themeninformationen



Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie