| |
|
|
| 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
|
|
|
| |
|
|
|
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. |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
| &OGLBMP
too with Deleteobject müllt the memory fully, if I dauernd one OGL-Screen 128x128 Pixel einlade at steer of my Objektes.
mfg |
|
|
| |
|
|