PDA

View Full Version : DGA mouse and xlib



zen
06-04-2002, 05:20 PM
How can I use DGA's input event handling(which seems to be better than xlib's),w/o using its framebuffer access functionality.I want to use xlib for that since it supports both fullscreen and windowed mode.q3a's linux port seems to do this but I'm not sure how.

06-05-2002, 06:09 PM
Q3 is using DGA 1.0 but I do not think this will be supported in the future. Here is some general information http://www.linuxgames.com/gdc2001/material2/index.html
A quote:
While DGA 1.0 smashed the core X mouse events replacing absolute positions with relative ones, DGA 2.0 takes the more reasonable approach of creating new event types to pass relative mouse motion events. Internally, this simplifies things greatly while also avoiding application interaction problems when sticking DGA code alongside non-DGA code.


Some information about DGA 2.0
ftp://ftp.xfree86.org/pub/XFree86/4.2.0/doc/README.DGA
From the last document:
DGA provides its own events. These can be enabled by calling
XDGASelectInput(). This function is similar to XSelectInput()
and all Xlib Key, Button and Motion masks are supported.

zen
06-06-2002, 01:34 AM
Zico,I've read all the docs you posted but the problem is that if I use XDGASelectInput I get an X error saying that I didn't initialize DGA first.The only way I've found to initialize DGA is to set a videomode which makes the screen go blank,propably because I don't render anything to the framebuffer.The thing is I want to use the mouse routines but bypass everything else.