Registriert: Do Dez 05, 2002 10:35 Beiträge: 4234 Wohnort: Dortmund
I dosn't read this thread all the time so im a bit late.
Your texture isn't power of two. The opengl implementation from ati supports opengl core 2.0 which means they also supports non power of two textures. But if you are using npot with mip maps the driver falls back into an software mode. This is the reason for the terrible performance with around 3 fps. Expand the 124x124 into 128x128 and all should work fine.
Normally the glBitmap raises an error if the graphics card dosn't support npot tetxures but ati means they "support" it.
Great! Big THX @ all! Now I just have to find the mistake in my sourcecode, noeska's example works perfect.^^
Dankeschön an Alle! Jetzt muss ich nurnoch den Fehler in meinem Projekt finden, das Bsp funzt jetzt einwandfrei.
Bad news:^^ Now my project renders the cube right, too but the error "stack underflow" appears anyway. In noeska's example it appears, too if I insert this:
Code:
procedure TForm_Main.ErrorHandler;
var
s: string;
begin
s := gluErrorString(glGetError);
if s <> 'no error' then
Showmessage('OpenGL meldet: "' + s + '"');
end;
Code:
IdleHandler(Sender: TObject; var Done: Boolean); ... ErrorHandler; ...
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
From where is your .render called?
Also i think you should call gluErrorString directly after the command you want to check if it gives an error. There is no need doing this in an on idle event i think that in your case the glErrorString is causing your error.
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Where is your Application.OnIdle := ApplicationEventsIdle; (e.g. your idlehandler) called? It should be after initopengl and activating the rendercontext.
Bad news:^^ Now my project renders the cube right, too but the error "stack underflow" appears anyway. In noeska's example it appears, too if I insert this:
Code:
procedure TForm_Main.ErrorHandler;
var
s: string;
begin
s := gluErrorString(glGetError);
if s <> 'no error' then
Showmessage('OpenGL meldet: "' + s + '"');
end;
Code:
IdleHandler(Sender: TObject; var Done: Boolean); ... ErrorHandler; ...
A few posts back I said it worked with the gl3ds example - but I forgot to try ErrorHandler; with your example. If you use ErrorHandler (or gluErrorString(glGetError);) in your example it should appear the "stack underflow"-error.
Can I send my sourcecode to you via email, cause it's not only a "example" but a little game I wanna create?!^^
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Ok found the error. It is in gl3ds.pas in procedure TglMesh.Render;
just before the last end; there needs to be an glpopmatrix();
Then you need to check on glgeterror and not on the string result of glugeterrorstring for calling showmessage as my driver outputs dutch errors and so even with no error the combobox is shown. You could use the enum GL_NO_ERROR for that: http://www.opengl.org/documentation/spe ... error.html
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Oops i checked using the new rewritten version of gl3ds.
In the gl3ds.pas as released it is in procedure T3dsMesh.Render;
But the problem is different there also as there is an glpopmatrix() just before the last end; So in the old version you need to place it one end upwards. As otherwise when using displaylists a glpopmatrix is executed when no glpushmatrix is executed. But on testing it i get no errors. Not even with the glpopmartix in the wrong place.
if you are using glpopmartix en glpushmatrix yourselves you should check these.
Mitglieder in diesem Forum: 0 Mitglieder und 8 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.