English
Opportunities and suggestions

OpenGL - another couple Proposals

 
- Page 1 -



Uwe
''Pascal''
Niemeier
Hello people!

I had finally opportunity, The OpenGL-functions To testing and wants time a couple comments moreover isolation.
there are too a couple Proposals and something review thereby. I hope, particularly latter is with goodwill adopted

generally:
i'm noticed,that some profane-Own ogl-functions not integrally with the
gleichnamigen Original-APIs identical are. the power it heavy for people, The any Demos translate want or in others Programmiersprachen already with oGL worked having. Perhaps can itself there yet what nachbessern, or it must in the later Help properly nachdrücklich on such Abweichungen hingewiesen go.

here a couple details:

ogl(some Objekt,...)
with Translation of my Ballerspiel-Demos have I 1 hour gegrübelt, Why my Asteroiden so comic by the countryside eiern, To I The Fussnote in the OpenGL.txt found have: with Erzeugung one Objektes by glu-API lying the Körpermittelpunkt in the zero the Koordinatensystems, with RGH the lowermost point the Körpers
wants one z.B. a bullet circa ihren Mittelpunkt rotate let, must one tappt im dunkeln means first circa ihren radius down move. quite onerous...

ogl(CLEAR)
corresponds to not the ogl-API glClear; additional to that Delete the graphic becomes too the
Koordinatensystem reset (is there another glLoadIdentity installed?)
The follow is, that in a Loop with CLEAR no relativen Transformationen possible
are, only absolute.
example RGH-ogl:

[box:03f4aca031]window 50,50-500,500
ogl(Init,%hwnd,0,0,0,1)
declare R%
while 1
case R%=360:R%=0
inc R%
ogl(clear)
ogl(move,0,0,-3)
ogl(rotate,0,R%,0)
ogL(sphere,0.5,4,2)
ogl(show)
endwhile[/box:03f4aca031]
example Standart-ogl:
[box:03f4aca031]window 50,50-500,500
oGL(Init,%hwnd,0,0,0,1)
ogl(move,0,0,-3)
while 1
ogl(glClear,~GL_COLOR_BUFFER_BIT | ~GL_DEPTH_BUFFER_BIT)
ogl(rotate,0,1,0)
ogL(sphere,0.5,4,2)
ogl(show)
endwhile[/box:03f4aca031]
in the 2. example becomes the ogl-screen of course deleted, The Matrix but not reset, so ROTATE each Durchlauf on The already turned scene applied becomes.

suggestion: CLEAR ought to itself only the Delete the Bildes limit, for could one glLoadIdentity kapseln, z.B. as ogl(RESETCOORD) or so.

ogl(ORIGIN,...)
exists apparently from glLoadIdentity + glTranslate (MOVE), setting means The Coordinates on absolute values. might entfallen, if it ogl(RESETCOORD) were.

ogl(STARTLIST)
gives a Integer-names for DisplayList back. the means but, that one with several DLs The jeweiligen names z.B. in a aray take off must, circa filled control to have.
rather would, whom names self vorzugeben, so How in the Original-API. so know one always, How which DL to address would, ausserdem could is a already laid out DL überschreiben.
How would one optionaler Parameter iName% ?
Ausserdem missing another Kapselung of glDeleteList.

oGL(LOADTEXTUREBMP,...)
here counts the same How for STARTLIST; the IntegerName becomes of Profan pretended, could but too of User attached go. Arrays could entfallen. Textures could z.B. in a Loop laid out and be wären then over your Nummerierung To achieve.
BTW: an alternative, circa bmp-Handles To process, would neither badly

ogl(2D,...)
see I the right, that here to that 1. Time the Rückgabewerte of/ one function directly in pretended Zielvariablen written go?? Very gewöhnungsbedürftig!
BTW: The suitable Umkehrfunktion would too very useful!

ogl(TESTMOUSE,...) & ogl(TESTXY,...)
If one with letzterem The Mausposition commit, can itself ersteres save...

ogl(STARTTEST,...) & ogl(ENDTEST)
Praktischer would, if one here rectangle pretending could How in the Original-API. then entspräche the whole useful the middle-aged @Mouse-function. who a point testing wants, can Yes Start- and Endpunkte the Rechtecks übereinanderlegen.

so much for first.
be on comments tensely (particularly of Roland)
PS: will be soon another couple adjusted Demos post.

SeeYou
Pascal
 
05/03/06  
 



 
- Page 2 -


Runs with you the mitgelieferte demonstration lesson13a.prf without crash?
 
05/21/06  
 




Frank
Abbing
Pascal, set the -7 time in clinging, then should it weg. have with my Tests yet some this Stolperstellen discover and Roland too gemeldet. be sure, that it tappt im dunkeln soon korrigiert has.
 
05/21/06  
 




RGH
[quote:60ba900c81=Uwe Pascal Niemeier]
ogl(STARTLIST)
gives a Integer-names for DisplayList back. the means but, that one with several DLs The jeweiligen names z.B. in a aray take off must, circa filled control to have.
rather would, whom names self vorzugeben, so How in the Original-API. so know one always, How which DL to address would, ausserdem could is a already laid out DL überschreiben.
How would one optionaler Parameter iName% ?[/quote:60ba900c81]
your Spieledemo with the Asteroiden has me convincing, that the still meaningfully is. ex the next Subscriptionsversion (the 11.) there this optionalen Parameter. without this Parameter is with glGenList The next free Listennummer determined, with Parameter becomes even these number using.

Greeting
Roland
 
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
05/22/06  
 




RGH
[quote:47f614c4dd=Uwe Pascal Niemeier]If I this Window into background mail (z.B. because I in that dahinterstehende Editorfenster click), I get a wildly Error Message.
OK, the code as such Although quite futile, but therefore same one Gleitkomma-Error?
or have I what overlooking?[/quote:47f614c4dd]
Hm, by me runs it completely free from problems.

Greeting
Roland
 
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
05/22/06  
 




RGH
[quote:b4209c4237=Uwe Pascal Niemeier][quote:b4209c4237]what whom origin the Objects concerns, have I long with me wrestled. i'm of it gone out, that OpenGL in first line for Games inserted go and is there lying The Objects now time any on the soil (the Nulllinie) and ragen not to Half in this into.[/quote:b4209c4237]
is correct, so Have I the not at all gesehen; the power sense !

what IMHO yet with mere ought to: an Skalierfunktion[/quote:b4209c4237]
After längerem there and since have I now decided both To make possible. with oGL(PosMode, n%) can whom mode take on. in the Defaultmodus 0 is the origin the Objects bodenständig reported and in the mode 1 is it the Mittelpunkt the Objektes.

and the function oGL(Scale, n!) to that Decreasing and enhance Objects becomes it too give.

i think time, in the next or übernächsten Subscriptionsversion becomes it so far his.

Greeting
Roland
 
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
05/23/06  
 




RGH
[quote:b46363596f=Uwe Pascal Niemeier]and naturally a function, The whom last ogl-Error as String outputs
(or a suitable Systemvariable and a list to that take after)[/quote:b46363596f]
but not still! Händisches take after in the 21. centenary?

there's no special Fehlerhandling for in the OpenGL-API auftretende Error, separate windows uses here the Windowseigene Fehlerhandling. whom last aufgetretenen Error determined The API-function GetLastError() and over FormatMessage(...) can whom suitable Fehlertext detect. These both Funktionalitäten have I now as System-Variables in XProfan integrate:

%LastError : The latest aufgetretene Windowsfehler. 0 = no Error. The worth the System-Variables changes itself only, if one Another Error appears. Importent Info: One aufgetretener Windowsfehler says not coercive from, that one XProfan-Error aufgetreten is. there's thoroughly too Windowsfehler, The XProfan aware ignoring.

$LastError : The latest aufgetretene Windowsfehler in Textform.

Greeting
Roland
 
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
05/23/06  
 




Uwe
''Pascal''
Niemeier
Hello Roland!

[quote:a770c6eb53]there's no special Fehlerhandling for in the OpenGL-API auftretende Error, separate windows uses here the Windowseigene Fehlerhandling. [/quote:a770c6eb53]
are you there sure??
CompileMarkSeparation
!
window 10,10-700,500

proc glError?--------------------------------

    parameters a$
    declare a&,b&
    a&=ogl("glGetError")
    b&=ogl("gluErrorString",a&)
    messagebox(str$(a&)+": "+string$(b&,0),a$,0)
    endproc--------------------------------------
    ogl("init",%hwnd,0,0,0,1)
    ogl("glClear",0)
    glError? "Test 1"
    ogl("glClear",-1)
    glError? "Test
t;

SeeYou
Pascal
 
05/24/06  
 




Uwe
''Pascal''
Niemeier
Hello people!

[quote:ed5606461a]Uwe Pascal Niemeier: If I this Window into background mail (z.B. because I in that dahinterstehende Editorfenster click), I get a wildly Error Message.[/quote:ed5606461a]
it shining well of OS or. from the Version the oGL-dlls tributary To his...

The Error exit by me on, if the scene to application of Push/Pop on the Z-axis on the zero befindet and then showing should:
CompileMarkSeparation
!
window 50,50-500,500
ogl("init",%hwnd,0,0,0,1)

while 1

    sleep 50
    ogl("clear")
    ogl("origin",0,0,0)--------Fehler!
    ogl("origin",0,0,0.0001)--Klappt!
    ogl("push")
    ogl("move",2,1,-5)
    ogl("sphere",1,5,5)
    ogl("pop")
    ogl("move",0,0,0.0001)--Klappt auch!
    ogl("show")

05/24/06  
 




RGH
[quote:2aa2723ce6=Uwe Pascal Niemeier]Hello Roland!

[quote:2aa2723ce6]there's no special Fehlerhandling for in the OpenGL-API auftretende Error, separate windows uses here the Windowseigene Fehlerhandling. [/quote:2aa2723ce6]
are you there sure??[/quote:2aa2723ce6]
there I had evident what overlooking. but getLastError() works too with with oGL-Fehlern. evident uses OpenGL too the windowseigene Fehlerhandling. but umso rather, then there now a further Systemvariable and a new oGL-function:

e% = %oGLError and e$ = oGL(ErrorString, e%)

(The thing with %LastError and $LastError can I then again einmotten.)

Thank you!

Roland
 
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
05/24/06  
 




Michael
Wodrich
Einmotten???

If one so simply in Profan a Windowsfehler serviert get, then becomes it Perhaps too more frequently using.

i'd these LastError-story drin let. heard Yes to general Fehlerbehandlung in windows.

and it'll Yes always somebody give, the not over Profan separate directly over The windows-API on the system turn - there need one The Fehlerabfrage Yes.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
05/24/06  
 




Frank
Abbing
see I similar. I würds drinlassen...
 
05/24/06  
 



 
- Page 3 -


to that ID-save recommend I get(lastmessage), get(errormessage) or get(oglerror) or whatever...
 
05/24/06  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.461 Views

Untitledvor 0 min.
Peter Max Müller10/23/17
Andreas Koch01/10/13
Deli Beatz08/28/12

Themeninformationen



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