English
Opportunities and suggestions

wish: & OGLBMP rausnehmen and a good substitute installation

 
The commands &OGLBMP for a OGL-Image fuming a integrally beautiful.
In Profan2Cpp is it not feasible.
and on some Systemen with Vista fuming it too.

I have in my Program a good Variante:
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)
endproc

Womit one The site and the size a Opengl-Window fish can.
moreover need one but Data from the Bitmapheader.

Perhaps could you Roland whom somehow install.

mfg
CompileMarkSeparation
 $H Windows.ph
DEF rgb_umwandlung(2) ! bmptex.dll,bmptex
declare x1!,y1!,dx!,dy!,winkel!,y&,z%,groesse%
declare hWin&
declare width%,height%,texid%,ende%
declare bild_auto_h&,bild_umw_h&
declare bmi#,bildxy# ,ogl_rgb#
groesse%=128*128*4
dim bildxy#,groesse%
dim ogl_rgb#,groesse%
ende%=1
Window 20,20-400,200
Cls @RGB(220,220,220)
hWin& = @Create(text, %hWnd, Test1, 10, 10, 128,128)
oGL(Init, hwin&, 0,0, 0, 0)
oGL(PosMode, 1)
bild_auto_h& = Create(hnewPic,128,128,0 )
var tex.auto%=erzeugetex(auto.bmp)
drawglscene
drawglscene
oglzubmp

WHILE ende%

    sleep 1

    if isKey(81)

        winkel!=winkel!+1.0
        drawglscene
        oglzubmp()

    endif

    if isKey(69)

        winkel!=winkel!-1.0
        drawglscene
        oglzubmp()

    endif

    startpaint %hWnd
    drawpic bild_auto_h&,200,10,-1
    endpaint

ENDWHILE

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)

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&       = 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$
    texid%=0
    height%=128
    width%=128
    dispose bmi#
    bitmap_header()
    bild_umw_h& = Create(hPic, -1, namebild$)
    ~GetDIBits(%hdc,bild_umw_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
    rgb_umwandlung(bildxy#,groesse%)
    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#)
    dispose bildxy#
    RETURN texid%

endproc


2 kB
Hochgeladen:02/28/09
Downloadcounter106
Download
49 kB
Hochgeladen:02/28/09
Downloadcounter122
Download
 
02/28/09  
 




Jac
de
Lad
i'd sooner say, that it Sebastians thing is, what it so power. In Profan funktionierts, if it with the Workaround in Prf2CPP goes, then can Sebastian it Yes so umsetzen. whom commands same complete umzustricken stops I personally for not meaningfully.
 
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
03/01/09  
 




Jac
de
Lad
OK, I Have whom others Thread moreover first now red (&OGLBMP and Vista). I ziehe my vorigen Posting back.
 
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
03/01/09  
 



i'd sooner say, that it Sebastians thing is, what it so power. In Profan funktionierts, if it with the Workaround in Prf2CPP goes, then can Sebastian it Yes so umsetzen.

young...young....

first think, then write.
have I you faith already in the anderem Forum said. your Flinte has one To light trigger.
 
03/01/09  
 




Jac
de
Lad
the has nothing with think To do, separate so, that The Sprechblase The Thread in the written stood, that it with Vista fundamentally not functions, first to this opened watts and itself the so naturally differently darstellt.
 
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
03/02/09  
 




RGH
Jac
OK, I Have whom others Thread moreover first now red (&OGLBMP and Vista). I ziehe my vorigen Posting back.


where is the Thread &OGLBMP and Vista? I find it not. gives it somewhere one small Beispielprogramm in reinem XPRofan, that under Vista correctly runs?

i know, that it under XProfan 10 some Grafiktreiber (or. OpenGL-driver) given, with them Create(hPic,...) with the Bildnamen &OGLBMP not correctly funktionierte. concerned were some computer with OnBoard-Grafiklösungen. thereupon have I XProfan adjusted, around the trouble To bypass. ought to the trouble under Vista anew come along, should I look, whether I there what do can.

Greeting
Roland

BTW: &OGLBMP is no commands (not even a Systemvariable), separate a Constant for functions Create(hPic,...) and Create(hSizedPic,...)
 
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
03/02/09  
 




Jac
de
Lad
@Roland: I related hierauf  [...]  . be me but not sure, How and whether the now very functions.
 
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
03/02/09  
 



concerned were some computer with OnBoard-Grafiklösungen. thereupon have I XProfan adjusted, around the trouble To bypass.

I have graphic OnBoard. AMILO FUJITSU.

exit too with XP on.

means as far as I'm concerned need not changed go, I have my Solution found, The I now by me in each Program as substitute einbaut have for &OGLBMP.

especially since I now too whom Bildschirmausschnitt of Openglscreen determine can , whom I as BMP having would like.

Windooof is sometimes persistent

mfg
 
03/02/09  
 



&OGLBMP

too with Deleteobject müllt the memory fully, if I dauernd one OGL-Screen 128x128 Pixel einlade at steer of my Objektes.

mfg
 
03/07/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

4.876 Views

Untitledvor 0 min.
funkheld01/16/22
Georg Teles02/03/18
RICOSCH11/28/13
Donnie04/07/13

Themeninformationen

this Topic has 3 subscriber:

unbekannt (4x)
Jac de Lad (4x)
RGH (1x)


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