Registriert: Fr Aug 13, 2004 17:43 Beiträge: 60 Wohnort: Belgien
Hi,
When I try to use GLX in Freepascal, I always get an Acces Violation when calling glXChooseVisual. I use the FreePascal GLX header. This is the source:
I tried the DelphiGL GLX header but I get errors while compiling. I also tried to apply Phobeus' patch but the Linux patch command fails to patch the header. Does somebody knows how to use GLX with FreePascal?
Registriert: Fr Aug 13, 2004 17:43 Beiträge: 60 Wohnort: Belgien
One of the FreePascal programmers changed the glx header a bit and I've written a demo program that works. The demo works only with FreePascal 2.1 (a development version) and higher.
cm := XCreateColormap(dpy,RootWindow(dpy,visinfo.screen),visinfo.visual,AllocNone);
winAttr.colormap:= cm;
winAttr.border_pixel:=0;
winAttr.background_pixel:=0;
winAttr.event_mask:= ExposureMask or ButtonPressMask or StructureNotifyMask or KeyPressMask;
//Create a window
win := XCreateWindow(dpy,RootWindow(dpy,visinfo.screen),0,0,640,480,0,visinfo.depth,InputOutput,visinfo.visual,CWBorderPixel or CWColormap or CWEventMask,@winAttr);
title :='FreePascal GLX demo --------- Press any key to exit';
Mitglieder in diesem Forum: 0 Mitglieder und 14 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.