Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Marek Olšák e5c6a92a12 mesa: implement clamping controls (ARB_color_buffer_float)
Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    mesa: fix getteximage so that it doesn't clamp values
    mesa: update the compute_version function
    mesa: add display list support for ARB_color_buffer_float
    mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float

commit b2f6ddf907935b2594d2831ddab38cf57a1729ce
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 31 16:50:57 2010 +0200

    mesa: document known possible deviations from ARB_color_buffer_float

commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:54:56 2010 +0200

    mesa: expose GL_ARB_color_buffer_float

commit aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:12:34 2010 +0200

    mesa, mesa/st: handle read color clamping properly

    (I'll squash the st/mesa part to a separate commit. -Marek)

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it.

    TODO: did I get the set of operations mandating it right?

commit 3a9cb5e59b676b6148c50907ce6eef5441677e36
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:09:41 2010 +0200

    mesa: respect color clamping in texenv programs (v2)

    Changes in v2:
    - Fix attributes other than vertex color sometimes getting clamped

commit de26f9e47e886e176aab6e5a2c3d4481efb64362
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:05:53 2010 +0200

    mesa: restore color clamps on glPopAttrib

commit a55ac3c300c189616627c05d924c40a8b55bfafa
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:04:26 2010 +0200

    mesa: clamp color queries if and only if fragment clamping is enabled

commit 9940a3e31c2fb76cc3d28b15ea78dde369825107
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Wed Aug 25 00:00:16 2010 +0200

    mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY

    To do this, we make ClampColor call FLUSH_VERTICES with the appropriate
    _NEW flag.

    We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging
    effects, despite being in the Color attrib group.

    This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g

commit 6244c446e3beed5473b4e811d10787e4019f59d6
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:58:24 2010 +0200

    mesa: add unclamped color parameters
2011-03-29 12:04:55 +02:00
bin mesa: fix build for NetBSD 2011-01-06 08:00:01 -07:00
configs autoconf/make: Don't specify individual llvm libraries. 2011-03-14 20:05:56 +00:00
docs mesa: implement clamping controls (ARB_color_buffer_float) 2011-03-29 12:04:55 +02:00
doxygen doxygen: Add glsl to the Makefile and .gitignore. 2011-01-19 23:49:54 -08:00
include gl.h: reorder some #defines 2011-03-19 14:17:41 -06:00
scons gallivm: Use LLVM MC disassembler, instead of udis86. 2011-03-13 19:24:26 +00:00
src mesa: implement clamping controls (ARB_color_buffer_float) 2011-03-29 12:04:55 +02:00
windows Merge branch '7.8' 2010-03-23 09:14:17 -06:00
.emacs-dirvars Add emacs dirvars file with Mesa indention definition. 2007-09-18 10:02:51 -04:00
.gitattributes Allow CRLF automatic conversion on MSVC project files. 2008-06-24 22:25:52 +09:00
.gitignore .gitignore: Ignore emacs .dir-locals.el files 2010-06-07 10:23:55 -04:00
Makefile Generate lexer and parser files for tarball creation process 2011-03-01 13:43:12 -08:00
SConstruct scons: Avoid depending on scons 2.0 in general. 2011-02-16 18:02:01 +00:00
acinclude.m4 autoconf: Attempt to figure out the PIC flags for the platform 2008-05-09 07:05:16 -07:00
autogen.sh autogen: Make sure MAKEFLAGS is not set before running autoreconf 2009-02-10 11:58:11 +10:30
common.py scons: Fix immediate Python exceptions with SCons on SunOS. 2011-03-08 17:59:57 -08:00
configure.ac autoconf/make: Don't specify individual llvm libraries. 2011-03-14 20:05:56 +00:00

docs/README.WINDML

                        WindML Driver for Mesa 4.0


Requirements
------------

Tornado 2 + WindML, Cumulative Patchs are recommended. 
  
I suppose you have a valid WindML installation. Double buffer hardware
gives better performance than double buffer software so if you can
compile your WindML driver with this option, just do it. I/O
redirection is adviced in target server.


Tested on
---------

During the development, my main target was a CoolMonster:
- Video card: CT69000
- CPU: PENTIUM 266MHz

and my host a Windows NT + Tornado 2.


Installation
------------

1. Mesa sources must be in root directory (C:\)

2. Add the following line to your torVars.bat:
set MESA_BASE=C:\Mesa

OR copy the new torVars.bat in your bin path:
c:/Mesa/src/ugl/tornado/torVars.sample -> 
/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)

3. In a command prompt:
$ torVars
$ cd c:\Mesa
$ make -f Makefile.ugl CPU=PENTIUM

Take a long while...

5. Include all the files from ugldemos folder to build some downloadable
   application modules

4. Download UGL/Mesa object files on target

For example via the WindShell:
ld < c:\Tornado\target\lib\objMesaGL.o
ld < c:\Tornado\target\lib\objMesaUGL.o
ld < c:\Tornado\target\lib\objMesaGLU.o
ld < c:\Tornado\target\lib\objGLUTshapes.o
ld < c:\Tornado\target\lib\objMesaOS.o

You can put the previous lines in a file and use:
< filename

6. Download the application modules.

7. In WindShell, run:
-> uglalldemos

During the show some messages will appear, it provides some useful
information on key management.


Coding
------

Sample Usage:

In addition to the usual ugl calls to initialize UGL, (may be find an
input driver), you must do the following to use the UGL/Mesa interface:

1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context,
   given the display format.

2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an
   UGL/Mesa Context and to make the context the current one.

3. Make gl* calls to render your graphics.

4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers.

5. Before the UGL is destroyed, call MesaDestroyContext().

6. Before exiting, call if required uglEventQDestroy and then
   uglDeinitialize();

Limitations
-----------

I found the following limitations in my driver :
 - Color Indexed management is only in 8 bits
 - It's possible to mix UGL/OpenGL application with a software
   double buffer

Modifications
------------

New files in Mesa:
- Makefile.ugl
- rules.windmlmesa
- docs/README.UGL
- include/GL/uglmesa.h
- si-glu/Makefile.ugl
- src/Makefile.ugl
- src/ugl/torGLUTShapesInit.c
- src/ugl/torMesaUGLInit.c
- src/ugl/ugl_api.c
- src/ugl/ugl_dd.c
- src/ugl/ugl_glutshapes.c
- src/ugl/ugl_line.c
- src/ugl/ugl_span.c
- src/ugl/ugl_tri.c
- src/ugl/uglmesaP.h
- ugldemos/*

Modified files in Tornado 2.0:
- c:\Tornado\host\x86-win32\bin\torVars.bat
rem Command line build environments
set WIND_HOST_TYPE=x86-win32
set WIND_BASE=C:\Tornado
set MESA_BASE=C:\Mesa
set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%
- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf
- c:\Tornado\target\h\GL\*

Todo
----
- GCC 2.96, ASM compilation

Thanks to:
----------

Precision Insight team for their great job around Mesa, XFree, and DRI.
Wind River Systems to take me as an intern.


Stephane Raimbault
<stephane.raimbault@windriver.com>
<stephane.raimbault@deesse.univ-lemans.fr>

July 24, 2001