Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Jul 18, 2025 11:13

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Bugs in dglGLX.pas
BeitragVerfasst: So Okt 24, 2004 20:42 
Offline
DGL Member

Registriert: Mo Okt 11, 2004 17:40
Beiträge: 8
dglGLX.pas file
{ Version 0.1a LINUX BETA }
{ Date : 11.02.2004 }

uses glXGetCurreentDisplay instead of glXGetCurrentDisplay.

Your project will compile without problems if you use glxGetCurreentDisplay, but i think the second form is the right one. I had to go through dglGLX.pas deleting the additional 'e'.

If i find anything else i'll post it under this thread :)

_________________
Ridiela! Que bonito es todo esto!


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Okt 25, 2004 19:24 
Offline
DGL Member

Registriert: Mo Okt 11, 2004 17:40
Beiträge: 8
Well. looks like the problem is a bit more dense than just deleting some 'e' ... in my code (below) , using glXGetCurrentDisplay returns a nil pointer. But using glXGetCurreentDisplay crashes the application. That is probably my fault for not initiating properly OpenGL, but i can't help being new to X.
I want to create a component/widget to render OpenGL primitives on it. In Windows i had derived a new class from TWinControl, and used its handle property to create the rendering context. In Linux there is no such class so i tried to derive a new class from TPanel (inherits from TComponent and has a handle property). In its Paint method i included the openGLinitialized check following the example of selection_demo1_kylix

Code:
  1.   InitOpengl;
  2.   ReadExtensions;
  3.   ReadImplementationProperties;
  4.   display:= glXGetCurreentDisplay;
  5.   //display:=XOpenDisplay(#0);
  6.   screen:= XDefaultScreen(display);
  7.   attributes:= GetAttributes;
  8.   visual:= glXChooseVisual(display,screen,@attributes[0]);
  9.   context:= glXCreateContext(display,visual,nil,true);
  10.   glwin:= QWidget_winId(Handle);
  11.   glXMakeCurrent(display,glwin,context);
  12.  


Using XOpenDisplay(#0) as in the demo (and probably the right option) causes no problems, but gl primitives don't show in the panel.
Using glXGetCurreentDisplay (as is now in dglGLX.pas) crashes the application, (probably because i didn't initiate correctly OpenGL, because that is the very first gl Routine I use.
And finally, using glXGetCurrentDisplay is foolish even if i delete additional e's in dglGLX.pas and recompile because it returns a nil pointer and nothing happens.

Anyone has a clue? :shock:

_________________
Ridiela! Que bonito es todo esto!


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 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.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.007s | 14 Queries | GZIP : On ]