Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » An OpenGL ctrl for Linux / X11
[EDIT] An OpenGL ctrl for Linux / X11 [message #3582 is a reply to message #3578] Sat, 03 June 2006 12:36 Go to previous messageGo to previous message
cyrion is currently offline  cyrion
Messages: 15
Registered: May 2006
Location: Grenoble, France
Promising Member
Hi,
Below are the modifications I have done to the CtrlCore package.
In the attached file you will find a working example of the gl ctrl (a spinning cube). I also added the binary (for Linux i386).

Modifications to CtrlCore.h

(...)
	static dword KEYtoK(dword);
	
protected: 
	bool UseGLXVisual; // here !

private:
	Ctrl(Ctrl&);
	void operator=(Ctrl&);

(...)     


and here:

(...)
#ifdef PLATFORM_X11
protected:
	struct XWindow {
		Ptr<Ctrl>    ctrl;
		bool         exposed;
		Vector<Rect> invalid;
		Ptr<Ctrl>    owner;
		Ptr<Ctrl>    last_active;
		XIC          xic;
	};
	static ArrayMap<Window, XWindow>& Xwindow(); // here !
private:
	static Ptr<Ctrl> WndCaretCtrl;
(...)



Modifications to X11Wnd.cpp
(...)
void Ctrl::DoPaint(const Vector<Rect>& invalid)
{
(...)
				
		if( UseGLXVisual ) // here !
			return; 
		
		GC gc = XCreateGC(Xdisplay, (Drawable)top->window, 0, 0);
	#ifdef PLATFORM_XFT
	
(...)


And finally to Ctrl.cpp

(...)
Ctrl::Ctrl() {
	LLOG("Ctrl::Ctrl");
(...)
	unicode = false;
	UseGLXVisual = false; // here !
}
(...)



Damien.
  • Attachment: example.tgz
    (Size: 774.84KB, Downloaded 1934 times)
 
Read Message icon1.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using DOM like XML parser
Next Topic: Windows Service?
Goto Forum:
  


Current Time: Sun May 05 17:17:49 CEST 2024

Total time taken to generate the page: 0.02665 seconds