Français
C ++ Forum

irgendein Speicherfehler pour cela Bild?

 
- page 1 -


si je ici im Programme mon linkes Opengl-Bild drehe (bouton Q/E), soll im rechten la fenêtre cela Bild comme normales Pic dargestellt volonté.
Es funktioniert soweit sous dem normalen Profan, avec Profan2cpp pas
cela Problem, ist si je anfange trop drehen, ensuite wird cela rechte Bild erneuert, mais qui Surface ist weiss, il y a aucun données drin

Muss dans Profan2cpp irgendwie qui grenier pour Bild usw anders reserviert volonté?
quelle faute habe je gemacht.
Unten ist cela gesamte Programme.

Im Anhang ist une Zip aussi avec une EXE de Profan et une EXE de Profan2cpp
KompilierenMarqueSéparation
 $H Windows.ph
DEF rgb_umwandlung(2) ! "bmptex.dll","bmptex"
declare x1!,y1!,dx!,dy!,winkel!,y&,z%,a&,test%
declare bild_auto_h&,bild_umw_h&
declare bmi#,bildxy# ,ogl_rgb#
dim ogl_rgb#,128*128*4+1032
var texid%=0
var ende%=1
Window 20,20-600,400
Cls @RGB(220,220,220)
var hWin& = @Create("text", %hWnd, "Test1", 10, 10, 128,128)
var hWin1& = @Create("text", %hWnd, "Test1", 180, 10, 250,250)
oGL("Init", hwin&, 0,0, 0, 0)
oGL("PosMode", 1)
ogl("glReadBuffer",~GL_Front)
bild_auto_h& = Create("hPic", -1,"leer.bmp") Bildcontainer für "setDIBits"
var tex.auto%=erzeugetex("auto.bmp")
setTimer 18
drawglscene
drawglscene
oglzubmp

WHILE ende%

    WaitInput

    if isKey(81)

        winkel!=winkel!+1.0
        drawglscene
        oglzubmp()

    endif

    if isKey(69)

        winkel!=winkel!-1.0
        drawglscene
        oglzubmp()

    endif

ENDWHILE

killTimer
end

proc oglzubmp

    ogl("glReadPixels",0,0,128,128,~GL_BGRA,~GL_UNSIGNED_BYTE,ogl_rgb#)
    ~setDIBits(%hdc,bild_auto_h&,0,128,ogl_rgb#,bmi#,0)
    mcls 128,128
    startpaint -1
    drawpic bild_auto_h&,0,0,-1
    endpaint
    startpaint hWin1&
    mcopybmp 0,0-127,127>50,50,-1
    endpaint

endproc

proc drawglscene

    OGL("Clear")
    OGL("origin",0,0,-1.11)
    OGL("texture",tex.auto%,1)
    OGL("rotate",0,0,winkel!)
    OGL("quad",0.5,0.5)
    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&       = 128
        .biHeight&      = 128
        .biPlanes%      = 1
        .biBitCount%    = 32
        .biCompression& = &BI_RGB
        .biSizeImage&   = ((.biWidth& * .biBitCount%  8 - 1) | 3 + 1) * abs(.biHeight&)

    endwith

endproc

proc erzeugetex

    parameters namebild$
    bitmap_header()
    bild_umw_h& = Create("hPic", -1, namebild$)
    a&=bmi#.biSizeImage&
    dim bildxy#,a&+1032
    ~GetDIBits(%hdc,bild_umw_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
    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, 128, 128, ~GL_RGBA, ~GL_UNSIGNED_BYTE, bildxy#)
    dispose bildxy#
    RETOUR texid%

endproc


mfg
peter

590 kB
Hochgeladen:08.09.2008
Downloadcounter95
Download
 
08.09.2008  
 



 
- page 1 -



Sebastian
König
Ok, erledigt sur qui Profan2Cpp-Page d'accueil  [...]  gibt es eh bien qui Testversion 2.0 zum Télécharger.
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
12.09.2008  
 



allô, cela ging mais Superschnell.
qui Grafik funktioniert aussi comment vous soll.

une tolle travail cela ganze Profan2cpp 2.0

si je maintenant avec BCC55 compiliere, peux je ensuite là aussi "if-auswertungen " ala C++ gemäß BCC55 reinbringen usw ou bien gibt es là irgendwelche besondere einschränkungen, cela seulement bestimmter Code pris volonté darf?

un faute?
qui Compiler beanstandet qui "PVAR", cela il qui pas kennt, si je je sur plus vais, stürzt il ab.
KompilierenMarqueSéparation
declare x%,y%
x%=1
y%=100
cls
test(x%,y%)
WaitInput
end

proc test

    parameters c%,d%
    <INLINE_CPP>
    DWORD a = PVAR(c%);
    DWORD b = PVAR(d%);
    </INLINE_CPP>

12.09.2008  
 




Jörg
Sellmeyer
si cela avec dem Inline CPP allez, peux je pas dire mais Du meinst doch sûrement "EndProc" et pas "end proc", ou bien?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12.09.2008  
 



oGL("scale", scale_1!, scale_1!,scale_1!)

cette Befehl wird beanstandet, weil qui falsche Anzahl de Parametern transfert wird.
chez Scale volonté mais 3 paramètre transfert.
(était chez Vers 1.6c pas)

mfg
peter
 
12.09.2008  
 



un paramètre pour ogl.Scale! (dans qui piège suis je aussi déjà getappt)
 
12.09.2008  
 



 
- page 2 -


"end proc"

Bien sûr zusammen. Wurde ici faux reinkopiert.
Ist dans mon beanstandeten Programme richtig.

mfg
 
12.09.2008  
 



procedure glScaled(x, y, z: TGLdouble);

Auszug aus Opengl-Delphi .

mfg
peter
 
12.09.2008  
 



Falsche Hilfedatei, ogl("scale",x!) ist XProfan - pas Delphi. ici wird zudem qui API genutzt, dass peux Du avec XProfan entier simple: ogl("glScaled",...
 
12.09.2008  
 



bon alors sollte cela la fois dans Xprofan10 /11 dem Täglichen original Befehl angepasst volonté.

mfg
peter
 
12.09.2008  
 



il y a aucun Abweichungen, il y a 2 différent Funktionen et Sprachen. Den Sinn derrière elle, ogl.scale sur 1 paramètre trop beschränken, habe je mais autrefois déjà pas trouvé. Roland pourrait aussi 3 paramètre ermöglichen.
 
12.09.2008  
 




Sebastian
König
allô Peter,

qui Anweisung pour cela Inline-C++ sollte un Kommentar son:
KompilierenMarqueSéparation
...
P2CPP: <INLINE_CPP>
DWORD a = PVAR(c%);
DWORD b = PVAR(d%);
P2CPP: </INLINE_CPP
/pre>

de Profan2Cpp aus gibt es pour den Code eigentlich aucun directe Einschränkung - tu peux simple la fois ausprobieren, quoi funktioniert et quoi pas.

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
13.09.2008  
 



Ah...et je dachte cela cet "<INLINE_CPP>" un Befehl était.

merci.

mfg
peter
 
13.09.2008  
 




répondre


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

6.220 Views

Untitledvor 0 min.
funkheld17.12.2013

Themeninformationen



Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie