nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: RE: Bogl changes & Nano-X-0.5
From: Greg Haerr
Date: Tue, 18 May 1999 11:13:39 -0600

On Tuesday, May 18, 1999 9:36 AM, Alex Holden [SMTP:alex@linuxhacker.org] wrote:
> I was just wondering what is happening with the Bogl code in Nano-X?
> How far are we away from being able to use an unmodified Bogl library?

There are considerable changes that need to be made to use unmodified bogl libraries.
The first major issue is that all the bogl entry points need to have code added
to support drawing in AND, OR and XOR modes, in addition to SET, which is
already implemented.

Secondly, bogl code currently resets the keyboard, etc when asked to open the
screen.  This code should be removed, or called separately by the upper level.
NanoX currently has separately controlled keyboard drivers.

Thirdly, a ReadPixel() entry point needs to be added to all bogl drivers.

Fourthly, with my nano-X v0.5 modifications (detailed following) I have re-designed
cursor management and no longer use the low-level pointer draw routines in bogl.
This was to give some common upper-level code that knows about a nanoX cursor
format so that we could support the GR_BITMAP format for cursors.  In addition, 
nanoX now supports color cursors, which bogl doesn't.  The new mid-level cursor
routines depend on scrdev.DrawPixel and scrdev.ReadPixel to support any cursor
included with the mini-x demos.

So, the scr_bogl.c routine and the included server/drivers/bogl directory contain
the modifed bogl library code that's necessary to support the advanced draw code
requests in the current demos.  Ben is very interested in contributing, but
I have been discussing a more advanced monochrome/color bitmap format
that would allow pictures etc to be displayed with nanoX using 8/16/24/32 bit color
formats.

So, basically, unless alot more people start coding, we're using the single driver
that I've made work for the demo functionality.  I also have serious architectual
concerns about using non-nanoX drivers, for speed and future bitblt issues...

BTW, in the nano-X v0.5 release that I've prepared, I've included a hardware VGA
driver for 640x480x16 color mode that supports the damned VGA hardware 4-plane
mode.  Currently, this driver is limited to running under DOS or NT DOS emulation.

Some research that needs to be done is how the Linux framebuffer device supports
more than just MODE_SET draw modes, while being just a memory-mapped device.
The VGA hardware supports XOR/AND/OR drawing by setting bits in a control register.
Is this the way that the framebuffer device is supposed to be used also?



> The reason I ask is that I would like to make a NanoGUI demo disk which
> uses the VGA16 driver; I have the boot disk setup with a VGA16 frame
> buffer okay, but the VGA16 driver in Nano-X doesn't work any more...
> Is there anything I can do to help things along myself?

	This shouldn't be too hard, the server/drivers/bogl directory contains
an earlier VGA16 driver.  Just define BOGL_VGA16_FB=1 in the included
makefile, and type make clean; make from the server directory.  That driver
needs all the other mods made in the bogl-cfb8.c file.


> 
> BTW, since Greg has volunteered to clean up all the loose ends I mentioned
> in an earlier mail, I'm working on rewriting the networking code according
> to David's suggestions.

	I've made the changes so that, for instance, Dave's mini-x world
program compiles and runs with a few lines of code changes.


> 
> On the subject of changes, I think we should have several pre-5 releases
> before we release an official new version this time, and make sure
> everything works properly before we release it. Since I've been having
> some problems getting the CVS server to behave, and Greg doesn't want to
> use it anyway, I'll have to juggle the patches myself and put up new
> pre-releases whenever I get a few new things working together.

	I have completed work on an interim v0.5, that, should you want it,
contains the following changes:

 	* Rewrote cursor routines
	* Separated mouse from cursor routines
	* Removed DrawCursor from device driver
	* Added ReadPixel to device driver
	* Made demo programs work with cursor changes
	* Added support for color cursors
	* Added polygon draw and fill routines
	* Added area pixel reading/writing, removed 8-bit limit for colors
	* Reworked color model
	* Added direct hardware 640x480x16 support for VGA real mode systems
	* Made api backwards compatible with mini-x
	* Ported mini-x world demo program to examples library


	I recommend that we post this stuff, since it contains
considerable changes to the driver level, and then you work on a v0.6.
Maybe I'll work on some other things for a while.


Greg

> 
> Okay, I'd like to make up a "To do for V0.5" list. So far I have:
> Rewrite networking code.
> Make Nano-X work with the latest Bogl.
> Tidy up code in general.
> Make whatever API changes are needed to support GDK.
> Implement a basic WM API.
> Document the APIs.
> Make demo disk.
> 
> I'd like to hear suggestions as to what else people think should be done
> before the 0.5 release.
> 
> I'll discuss the WM and GDK API stuff in seperate mails on the subject
> (note that I'm not suggesting writing a WM or porting GDK, just getting
> the necessary changes over with now, so that someone can do it before
> Nano-X-0.6).
> 
> --------------- Linux- the choice of a GNU generation. --------------
> : Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
> -------------------- http://www.linuxhacker.org/ --------------------
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nanogui-unsubscribe@linuxhacker.org
> For additional commands, e-mail: nanogui-help@linuxhacker.org
> 

nanogui@linuxhacker.org