Español
Foro

OGL-Bild y nNewPic erscheint sólo si yo lo kurz bewege., por qué ?

 

funkheld
¡Hola, guten Tag.
Yo nehme una drehendes Bild de el OGL-Ventana y lugar lo en un hNewPic dar. Yo mache lo porque lo en OGL simplemente es así algo a drehen.
Fuktioniert auch soweit wunderbar. Bloß beim ersten starten vom Programa erscheint el OGL-BIld sólo en el OGL-Ventana si yo lo mindestens kurz rechts
oder links gedreht habe. Das hNewpic erscheint sólo , si yo la ventana principal con el Mauss algo bewegt habe.

Wo Yo Por favor, beim Start una Hindernis drin?

Gracias.
Gruss
declarar hWin&,hintergrpic&,vordergrpic&
declarar ende&,winkel!,groesse&,dib&,array&
declarar bild_auto&,auto1&,auto11&,pi180!
declarar bmi#,ogl_rgb#
declarar x1!,y1!,dx!,dy!
Declarar ClassName$
Def &GL_BGR $80E0
DEF CreateDIB(2) !"dib","CreateDIB"
DEF FreeDIB(1) !"dib","FreeDIB"
DEF DrawDIB(4) !"dib","DrawDIB"
DEF CloneDIB(1) !"dib","CloneDIB"
dib&=usedll("dib.dll")
hintergrpic& = create("hNewPic", 400,400,rgb(255,255,0))
vordergrpic& = create("hNewPic", 400,400,rgb(255,255,0))
bild_auto& = create("hNewPic", 128,128,rgb(255,255,0))
Pi180!=0.0174532925199433
ende&=1
array&=CreateDIB(128,128)
groesse&=128*128*4
dim ogl_rgb#,groesse&
startpaint hintergrpic&
USEP 0,1,Rgb(0,255,0)
usebrush 1,rgb(0,255,0)
ellipse 150,150-250,250
endpaint
Ventana 20,20-800,600
Cls RGB(220,220,220)
ClassName$ = "Fenster"
Externo("User32", "GetClassNameA", %HWnd, ClassName$, 64)
hWin& = Control(Trim$(ClassName$), "", $50000000, 10, 10, 128, 128, %HWnd, 0, %HInstance)
oGL("Init",hwin&,0,0,0,0)
oGL("PosMode", 1)
auto1&=oGL("LoadTextureBMP","d:/XProfan/pxpse/data/auto1.bmp",1)
auto11&=oGL("LoadTextureBMP","d:/XProfan/xpse/data/auto11.bmp",1)
OGL("Clear")
OGL("texture",auto1&,1)
drawglscene
zeichne

WHILE ende&

    if isKey(89)

        OGL("texture",auto1&,1)
        drawglscene
        zeichne

    ElseIf Iskey(65)

        OGL("texture",auto11&,1)
        drawglscene
        zeichne

    EndIf

    if isKey(87)

        y1!=Sin(-winkel!*Pi180!)*0.3
        x1!=Cos(-winkel!*Pi180!)*0.3
        dx!=dx!-x1!
        dy!=dy!-y1!
        zeichne

    Elseif isKey(83)

        y1!=Sin(-winkel!*Pi180!)*0.3
        x1!=Cos(-winkel!*Pi180!)*0.3
        dx!=dx!+x1!
        dy!=dy!+y1!
        zeichne

    endif

    if isKey(81)

        winkel!=winkel!+0.5
        drawglscene
        zeichne

    Elseif isKey(69)

        winkel!=winkel!-0.5
        drawglscene
        zeichne

    EndIf

EndWhile

FreeDIB(array&)
end

Proc zeichne

    StartPaint vordergrpic&
    DrawPic hintergrpic&,0,0;0
    drawpic bild_auto&,50+dx!,50+dy!;-1
    EndPaint
    DrawPic vordergrpic&, 300,50;0

ENDPROC

proc drawglscene

    OGL("quad",0.5,0.5)
    OGL("origin",0,0,-1.2)
    OGL("rotate",0,0,winkel!)
    OGL("show")
    ogl("glReadPixels",0,0,128,128,&GL_BGR, ~GL_UNSIGNED_BYTE,ogl_rgb#)
    setDIBits(%hdc,bild_auto&,0,128,ogl_rgb#,array&,0)

ENDPROC

 
28.04.2016  
 




RGH
Ohne el DIB.DLL kann Usted keiner helfen, como se el Programa no ausführen lässt.

Saludo
Roland
 
XProfan X3
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
28.04.2016  
 




funkheld
Jup, hier es ellos.
Pensé , lo wäre una Problema en el Programmierstruktur.

Gruss

3 kB
Hochgeladen:28.04.2016
Ladeanzahl124
Descargar
 
28.04.2016  
 




Georg
Teles
Bin kein oGL Nutzer, así en Schnelle pero si Yo folgendes mache antes Mientras que Bucle:

2 veces also de cada Proc, Luego se lo suscrito, tal vez es qué en drawglscene qué para zeichne Procedimiento benütigt se y umgekehrt ?

PS: el problema trat hier auch ya una vez en  [...] 

Servus
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

28.04.2016  
 



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

5.245 Views

Untitledvor 0 min.
H.Brill29.10.2023
funkheld06.01.2022
iF31.10.2020
Normann Strübli13.04.2020
Más...

Themeninformationen

Dieses Thema ha 3 subscriber:

funkheld (2x)
Georg Teles (1x)
RGH (1x)


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