FLTK logo

Re: FLTK Written With OpenGL?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.opengl  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: FLTK Written With OpenGL? Greg Ercolano Oct 07, 2012  
 
On 10/06/12 16:25, Mike Werner wrote:
>> On 10/05/12 16:03, Mike Werner wrote:
>>> I'm fairly sure FLTK is written with OpenGL.
>>
>> 	FLTK supports opengl, but does not use it for implementing widgets.
>> 	For that, FLTK uses the native graphics libraries:
>>
>> 		Linux: Xlib
>> 		Windows: Win32
>> 		OSX: Cocoa
>>
>> 	This allows FLTK apps that don't need openGL to run on machines
>> 	that don't have openGL.
> 
> That's a surprise.

	Yep -- the FLTK widgets are native drawing code.

	OpenGL is simply supported as a feature, implementing opengl as a special
	rectangular area into which only opengl drawing can be done.

	FLTK widgets can appear *around* an opengl drawing area, but not inside it.

	For instance, the FLTK 'cube' demo has two opengl areas inside a single
	FLTK window; the fltk widgets are positioned /between/ the two opengl areas.

	The widgets can control operations that happen inside the opengl areas,
	but FLTK widgets themselves can't be positioned /inside/ the opengl
	rectangular regions, that I know of.

	There is probably no reason FLTK couldn't provide widgets that are
	opengl specific, but currently there are none that I know of that are
	included with the distro. There might be third party extensions, though.

> I thought FLTK widgets were created using the OpenGL graphics library.

	I just checked the FLTK docs introduction to make sure it is correct.

	Quoting the first page of the "Introduction to FLTK" under 'Features':
	http://fltk.org/doc-1.3/intro.html

"Written directly atop core libraries (Xlib, WIN32 or Cocoa) for maximum speed,
 and carefully optimized for code size and performance."

	..which is correct.

	But perhaps elsewhere on that page, one of the mentions of openGL
	might seem to indicate FLTK was /implemented/ with openGL, though
	that's not the case.

	For instance, perhaps this sentence on that same page under
	"History of FLTK" is the one that confused you:

"The need to switch to OpenGL and GLX, portability, and a desire to use C++
 subclassing required a rewrite of Forms. This produced the first version of FLTK."

	I could see reading that and thinking, 'oh, they wanted to switch to opengl
	to implement FLTK to make it more portable than Forms.', when that's
	not actually the case.

	Probably a small fix or two to the wording could clarify that, eg:

"The need to *support* OpenGL and GLX, offer portability across platforms,
and a desire to use C++  subclassing required a rewrite of Forms.
This produced the first version of FLTK..."

	If there are other parts of the docs that gave the impression of FLTK
	being implemented as opengl, let us know.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.