Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.ctags/pre-merge-glsl-compiler-1
@@ -0,0 +1,8 @@ | |||
*~ | |||
*.a | |||
*.o | |||
*.so | |||
depend | |||
depend.bak | |||
lib | |||
lib64 |
@@ -174,7 +174,6 @@ MAIN_FILES = \ | |||
$(DIRECTORY)/include/GL/internal/glcore.h \ | |||
$(DIRECTORY)/include/GL/amesa.h \ | |||
$(DIRECTORY)/include/GL/dmesa.h \ | |||
$(DIRECTORY)/include/GL/directfbgl.h \ | |||
$(DIRECTORY)/include/GL/fxmesa.h \ | |||
$(DIRECTORY)/include/GL/ggimesa.h \ | |||
$(DIRECTORY)/include/GL/gl.h \ | |||
@@ -205,25 +204,35 @@ MAIN_FILES = \ | |||
$(DIRECTORY)/src/mesa/depend \ | |||
$(DIRECTORY)/src/mesa/main/*.[chS] \ | |||
$(DIRECTORY)/src/mesa/main/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/main/sources \ | |||
$(DIRECTORY)/src/mesa/glapi/*.[chS] \ | |||
$(DIRECTORY)/src/mesa/glapi/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/glapi/sources \ | |||
$(DIRECTORY)/src/mesa/array_cache/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/array_cache/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/array_cache/sources \ | |||
$(DIRECTORY)/src/mesa/math/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/math/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/math/sources \ | |||
$(DIRECTORY)/src/mesa/shader/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/shader/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/shader/sources \ | |||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/shader/grammar/sources \ | |||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/shader/slang/sources \ | |||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/swrast/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/swrast/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/swrast/sources \ | |||
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/swrast_setup/sources \ | |||
$(DIRECTORY)/src/mesa/tnl/*.[chS] \ | |||
$(DIRECTORY)/src/mesa/tnl/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/tnl/sources \ | |||
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \ | |||
@@ -231,6 +240,7 @@ MAIN_FILES = \ | |||
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \ | |||
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/drivers/common/sources \ | |||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \ | |||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \ | |||
@@ -251,6 +261,7 @@ MAIN_FILES = \ | |||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \ | |||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \ | |||
$(DIRECTORY)/src/mesa/drivers/x11/sources \ | |||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \ | |||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \ |
@@ -65,6 +65,7 @@ if [ $# -ge 2 ] ; then | |||
elif [ -f "$FILE" ] ; then | |||
#echo "$FILE" is a regular file | |||
$RM "$DEST/`basename $FILE`" | |||
cp "$FILE" "$DEST" | |||
if [ $MODE ] ; then | |||
FILE=`basename "$FILE"` |
@@ -283,7 +283,9 @@ case $ARCH in | |||
ar -ruv ${LIBNAME} ${OBJECTS} | |||
FINAL_LIBS=${LIBNAME} | |||
else | |||
LIBNAME="lib${LIBNAME}.so" | |||
if [ $NOPREFIX = 0 ] ; then | |||
LIBNAME="lib${LIBNAME}.so" | |||
fi | |||
echo "mklib: Making SunOS shared library: " ${LIBNAME} | |||
if [ "x$LINK" = "x" ] ; then | |||
@@ -333,9 +335,14 @@ case $ARCH in | |||
# for debug: | |||
#echo "mklib: linker is" ${LINK} ${OPTS} | |||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} | |||
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} | |||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} | |||
if [ $NOPREFIX = 1 ] ; then | |||
rm -f ${LIBNAME} | |||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | |||
else | |||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} | |||
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} | |||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} | |||
fi | |||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" | |||
fi | |||
;; |
@@ -0,0 +1 @@ | |||
current |
@@ -28,7 +28,8 @@ ASM_SOURCES = | |||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | |||
LIBDRM_LIB = `pkg-config --libs libdrm` | |||
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB) | |||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB) | |||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | |||
-lm -lpthread $(LIBDRM_LIB) | |||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm | |||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11 |
@@ -41,7 +41,8 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib | |||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | |||
LIBDRM_LIB = `pkg-config --libs libdrm` | |||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) | |||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ | |||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | |||
-lm -lpthread -ldl \ | |||
$(LIBDRM_LIB) | |||
@@ -20,5 +20,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64 | |||
# the new interface. i810 are missing because there is no x86-64 | |||
# system where they could *ever* be used. | |||
# | |||
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300 | |||
DRI_DIRS = i915tex i915 i965 mach64 mga r128 r200 radeon tdfx unichrome savage r300 | |||
@@ -4,17 +4,13 @@ include $(TOP)/configs/linux | |||
CONFIG_NAME = linux-fbdev | |||
DRIVER_DIRS = fbdev | |||
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER | |||
SRC_DIRS = mesa glu glut/fbdev | |||
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER | |||
SRC_DIRS = mesa glu glut/fbdev | |||
DRIVER_DIRS = fbdev | |||
DRIVER_DIRS = fbdev osmesa | |||
PROGRAM_DIRS = fbdev demos redbook samples | |||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread | |||
OSMESA_LIB_DEPS = -lm -lpthread | |||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm | |||
@@ -19,3 +19,8 @@ OSMESA_LIB_DEPS = | |||
GLU_LIB_DEPS = | |||
GLUT_LIB_DEPS = | |||
GLW_LIB_DEPS = | |||
# Need to specify all libraries we may need | |||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm \ | |||
-L/usr/X11R6/lib/ -lX11 -lXmu -lXi -lpthread | |||
@@ -6,7 +6,7 @@ Requirements | |||
============ | |||
To build Mesa with DirectFB (DirectFBGL) support you need: | |||
- DirectFB at least 0.9.21 (http://directfb.org) | |||
- DirectFB at least 1.0.0 (http://directfb.org) | |||
- pkg-config at least 0.9 (http://pkgconfig.sf.net) | |||
@@ -1,47 +0,0 @@ | |||
Mesa 6.4.1 Release Notes | |||
Introduction | |||
------------ | |||
Mesa uses an even/odd version number scheme like the Linux kernel. | |||
Odd numbered versions (such as 6.3) designate new developmental releases. | |||
Even numbered versions (such as 6.4) designate stable releases. | |||
6.4.1 is a bug-fix release. See the VERSIONS file for details. | |||
GLUT tarball | |||
------------ | |||
Starting with 6.4, the GLUT library sources are distributed in a separate | |||
tarball. This was done at the request of Linux distro vendors who prefer | |||
to use freeglut. | |||
Driver Status | |||
---------------------- ---------------------- | |||
DRI drivers varies with the driver | |||
XMesa (Xlib) implements OpenGL 1.5 | |||
OSMesa (off-screen) implements OpenGL 1.5 | |||
Windows/Win32 implements OpenGL 1.5 | |||
Glide (3dfx Voodoo1/2) requires updates | |||
SVGA requires updates | |||
DJGPP requires updates | |||
GGI requires updates | |||
BeOS requires updates | |||
Allegro requires updates | |||
D3D requires updates | |||
The drivers which require updates mostly need to be updated to work | |||
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced | |||
in Mesa 6.3. | |||
---------------------------------------------------------------------- | |||
$Id: RELNOTES-6.4.1,v 3.1 2006/02/03 17:21:54 brianp Exp $ |
@@ -1,47 +0,0 @@ | |||
Mesa 6.4.2 Release Notes | |||
Introduction | |||
------------ | |||
Mesa uses an even/odd version number scheme like the Linux kernel. | |||
Odd numbered versions (such as 6.3) designate new developmental releases. | |||
Even numbered versions (such as 6.4) designate stable releases. | |||
6.4.2 is a minor bug-fix release. See the VERSIONS file for details. | |||
GLUT tarball | |||
------------ | |||
Starting with 6.4, the GLUT library sources are distributed in a separate | |||
tarball. This was done at the request of Linux distro vendors who prefer | |||
to use freeglut. | |||
Driver Status | |||
---------------------- ---------------------- | |||
DRI drivers varies with the driver | |||
XMesa (Xlib) implements OpenGL 1.5 | |||
OSMesa (off-screen) implements OpenGL 1.5 | |||
Windows/Win32 implements OpenGL 1.5 | |||
Glide (3dfx Voodoo1/2) requires updates | |||
SVGA requires updates | |||
DJGPP requires updates | |||
GGI requires updates | |||
BeOS requires updates | |||
Allegro requires updates | |||
D3D requires updates | |||
The drivers which require updates mostly need to be updated to work | |||
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced | |||
in Mesa 6.3. | |||
---------------------------------------------------------------------- | |||
$Id: RELNOTES-6.4.2,v 3.1 2006/02/03 17:21:54 brianp Exp $ |
@@ -1,97 +0,0 @@ | |||
Mesa 6.5 Release Notes | |||
Introduction | |||
------------ | |||
Mesa uses an even/odd version number scheme like the Linux kernel. | |||
Odd numbered versions (such as 6.5) designate new developmental releases. | |||
Even numbered versions (such as 6.4) designate stable releases. | |||
New Features | |||
------------ | |||
OpenGL Shading language support | |||
This includes the GL_ARB_shader_objects, GL_ARB_shading_language_100, | |||
GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions. Most of | |||
the work was done by Michal Krol. | |||
There's probably a fair number of bugs since this is a pretty large, | |||
complicated body of code. | |||
The OpenGL 2.0 interface to these features will be implemented in a | |||
future version of Mesa, | |||
GL_EXT_timer_query | |||
Used to measure the time of OpenGL operations at high precision. | |||
Only supported in the software/Xlib driver at this time. | |||
GL_EXT_packed_depth_stencil | |||
Defines a new GL_DEPTH_STENCIL_EXT pixel format. | |||
GL_EXT_framebuffer_blit | |||
A simplified glCopyPixels-like feature for copying pixel rectangles. | |||
GL_ARB_half_float_pixel | |||
Adds a new half-precision floating point format for image transfers, | |||
such as for glDrawPixels, glReadPixels, glTexImage, etc. | |||
Removed Extensions | |||
------------------ | |||
The following extensions have been removed: | |||
GL_HP_occlusion_test - this is superceded by GL_ARB_occlusion_query. | |||
Known Issues | |||
------------ | |||
Rendering to depth textures will not work. Rendering to GL_DEPTH_STENCIL | |||
textures should work. | |||
Driver Interface Changes | |||
------------------------ | |||
Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by | |||
the two-sided versions: Driver.Stencil*Separate(). | |||
Render-to-texture: The functions for rendering to textures have changed. | |||
To Do (someday) items | |||
--------------------- | |||
Switch to freeglut | |||
Increase MAX_DRAWBUFFERS | |||
Fix linux-glide target/driver. | |||
Fix lambda calculation for frag progs. | |||
Driver Status | |||
---------------------- ---------------------- | |||
DRI drivers varies with the driver | |||
XMesa/GLX (on Xlib) implements OpenGL 1.5 | |||
OSMesa (off-screen) implements OpenGL 1.5 | |||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3 | |||
SVGA implements OpenGL 1.3 | |||
Wind River UGL implements OpenGL 1.3 | |||
Windows/Win32 implements OpenGL 1.5 | |||
DJGPP implements OpenGL 1.5 | |||
GGI implements OpenGL 1.3 | |||
BeOS implements OpenGL 1.5 | |||
Allegro needs updating | |||
D3D needs updating | |||
---------------------------------------------------------------------- | |||
$Id: RELNOTES-6.5,v 3.4 2006/03/29 04:53:02 brianp Exp $ |
@@ -1,60 +0,0 @@ | |||
Mesa 6.5.1 Release Notes | |||
Introduction | |||
------------ | |||
Mesa uses an even/odd version number scheme like the Linux kernel. | |||
Odd numbered versions (such as 6.5) designate new developmental releases. | |||
Even numbered versions (such as 6.4) designate stable releases. | |||
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of | |||
bug fixes (see the VERSIONS file). | |||
New Features | |||
------------ | |||
Intel i965 "broadwater" DRI driver | |||
GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex | |||
arrays in an object. | |||
GL_EXT_texture_sRGB - non-linearly mapped texture formats | |||
GL_EXT_gpu_program_parameters - addes a few new functions for setting | |||
multiple vertex/fragment program parameters with one call. | |||
To Do (someday) items | |||
--------------------- | |||
Switch to freeglut | |||
Increase MAX_DRAWBUFFERS | |||
Fix linux-glide target/driver. | |||
Fix lambda calculation for frag progs. | |||
Driver Status | |||
---------------------- ---------------------- | |||
DRI drivers varies with the driver | |||
XMesa/GLX (on Xlib) implements OpenGL 1.5 | |||
OSMesa (off-screen) implements OpenGL 1.5 | |||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3 | |||
SVGA implements OpenGL 1.3 | |||
Wind River UGL implements OpenGL 1.3 | |||
Windows/Win32 implements OpenGL 1.5 | |||
DJGPP implements OpenGL 1.5 | |||
GGI implements OpenGL 1.3 | |||
BeOS implements OpenGL 1.5 | |||
Allegro needs updating | |||
D3D needs updating | |||
---------------------------------------------------------------------- | |||
$Id: RELNOTES-6.5.1,v 1.2 2006/08/18 20:24:54 brianp Exp $ |
@@ -63,8 +63,7 @@ a:visited { | |||
<b>Developer Topics</b> | |||
<ul> | |||
<li><a href="http://sourceforge.net/projects/mesa3d" target="_parent">SourceForge homepage</a> | |||
<li><a href="cvs_access.html" target="MainFrame">CVS Access</a> | |||
<li><a href="cvs_branches.html" target="MainFrame">CVS Branch Info</a> | |||
<li><a href="repository.html" target="MainFrame">Source Code Repository</a> | |||
<li><a href="utilities.html" target="MainFrame">Utilities</a> | |||
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a> | |||
<li><a href="devinfo.html" target="MainFrame">Development Notes</a> |
@@ -1,106 +0,0 @@ | |||
<HTML> | |||
<TITLE>CVS Access</TITLE> | |||
<link rel="stylesheet" type="text/css" href="mesa.css"></head> | |||
<BODY> | |||
<h1>CVS Access</h1> | |||
<p> | |||
Mesa's CVS repository (code management system) is hosted on | |||
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>. | |||
</p> | |||
<p> | |||
You may access the repository either as an | |||
<a href="#anonymous">anonymous user</a> (read-only) or as a | |||
<a href="#developer">developer</a> | |||
(read/write). | |||
</p> | |||
<p> | |||
You may also | |||
<a href="http://freedesktop.org/cgi-bin/viewcvs.cgi/mesa/Mesa/" | |||
target="_parent">browse the CVS repository</a>. | |||
</p> | |||
<a name="anonymous"> | |||
<H2>Anonymous CVS Access</H2> | |||
<p> | |||
Anonymous, public, read-only access to the CVS repository is available. | |||
Here are the basic instructions for Unix systems: | |||
</p> | |||
<ol> | |||
<li>Install CVS client software on your computer if needed. | |||
Version 1.9.28 is known to work. | |||
<li>Login as an anonymous user: | |||
<pre> | |||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa login | |||
</pre> | |||
Just press Enter/Return when prompted for a password. | |||
<br> | |||
<br> | |||
<li>Check out the code: | |||
<pre> | |||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa co Mesa | |||
</pre> | |||
</ol> | |||
<p>To update your Mesa CVS source to the latest CVS source:</p> | |||
<ol> | |||
<li><code>cd Mesa</code> | |||
<li><code>cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa update</code> | |||
</ol> | |||
<a name="developer"> | |||
<H2>Developer CVS Access</H2> | |||
<p> | |||
Mesa developers working with the Mesa CVS repository need to first | |||
have an account on <a href="http://www.freedesktop.org" target="_parent"> | |||
freedesktop.org</a>. | |||
To get an account, please ask Brian or the other Mesa developers for | |||
permission. | |||
Then, if there are no objections, follow this | |||
<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent"> | |||
procedure</a>. | |||
</p> | |||
<p> | |||
Once your account is established, you can check out the Mesa CVS tree | |||
with: | |||
<pre> | |||
setenv CVS_RSH ssh (if using a csh-like shell) | |||
</pre> | |||
<em>OR</em> | |||
<pre> | |||
export CVS_RSH=rsh (if using a bash-like shell) | |||
</pre> | |||
followed by: | |||
<pre> | |||
cvs -d:ext:yourusername@cvs.freedesktop.org:/cvs/mesa co Mesa | |||
</pre> | |||
<p> | |||
Of course, replace <em>yourusername</em> with your actual login name. | |||
</p> | |||
<p> | |||
Subsequent updates should only require: | |||
</p> | |||
<pre> | |||
cvs update | |||
</pre> | |||
</body> | |||
</html> |
@@ -1,80 +0,0 @@ | |||
<HTML> | |||
<TITLE>CVS Branches</TITLE> | |||
<link rel="stylesheet" type="text/css" href="mesa.css"></head> | |||
<BODY> | |||
<H1>CVS Branch Information</H1> | |||
<p> | |||
At any given time, there may be several active branches in Mesa's | |||
CVS repository. | |||
Generally, the CVS trunk contains the latest development (unstable) | |||
code while a CVS branch has the latest stable code. | |||
</p> | |||
<p> | |||
Currently (Oct 2004), the trunk is the Mesa 6.3 development code | |||
while the mesa_6_2_branch branch has the stable Mesa 6.2.x code. | |||
</p> | |||
<p> | |||
Mesa releases use an even/odd numbering scheme to represent stable/development | |||
releases. | |||
For example, Mesa 6.2 (0 is considered even) is a stable release while | |||
Mesa 6.3 is a development release. | |||
</p> | |||
<p> | |||
To checkout a specific CVS branch pass <code>-r</code> and | |||
the branch tag after your CVS command. | |||
For example <code>cvs checkout -r mesa_6_2_branch Mesa</code> will | |||
checkout the 6.2 branch and <code>cvs update -r | |||
mesa_6_2_branch</code> will convert your current CVS tree to the 6.2 | |||
branch. | |||
Consult <a href="http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54" | |||
target="_parent">http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54</a> | |||
for more on branching in CVS. | |||
</p> | |||
<p> | |||
To see a list of all the CVS branches run <code>cvs log README</code> (or any | |||
other file) and look for the section labeled <code>symbolic names</code>. | |||
You'll see something like this: | |||
</p> | |||
<pre> symbolic names: | |||
mesa_4_0: 1.3 | |||
mesa_4_0_branch: 1.3.0.6 | |||
mesa_3_5: 1.3 | |||
mesa_3_4_2: 1.3 | |||
mesa_3_4_1: 1.3 | |||
mesa_3_4: 1.3 | |||
mesa_3_4_branch: 1.3.0.4 | |||
mesa_3_3: 1.3 | |||
mesa_3_2_1: 1.1.1.1 | |||
mesa_3_3_texture_env_combine2: 1.3.0.2 | |||
mesa_3_2: 1.1.1.1 | |||
mesa_3_2_beta_1: 1.1.1.1 | |||
mesa_3_1: 1.1.1.1 | |||
mesa_3_2_dev: 1.1.1.1.0.2 | |||
mesa_3_1_beta_3: 1.1.1.1 | |||
start: 1.1.1.1 | |||
mesa: 1.1.1 | |||
</pre> | |||
<p> | |||
Most will be obsolete branches. Generally, the newer branches are at | |||
the top. Ask on the mesa3d-dev mailing list to learn which branches | |||
are active. | |||
</p> | |||
</body> | |||
</html> |
@@ -9,7 +9,7 @@ | |||
<H1>Downloading</H1> | |||
<p> | |||
Last development release: <b>6.5.1</b> | |||
Last development release: <b>6.5.2</b> | |||
</p> | |||
<p> |
@@ -9,47 +9,52 @@ | |||
<H1>Mailing Lists</H1> | |||
<p>There are four Mesa mailing lists:</p> | |||
<p>There are four Mesa mailing lists: | |||
</p> | |||
<ul> | |||
<li><b>mesa3d-users</b> - intended for users of the Mesa library. | |||
Newbie questions are appropriate, but please try reading the Mesa documentation first. | |||
</li><li><b>mesa3d-dev</b> - intended for developers of the Mesa library. | |||
This is not for beginners. | |||
</li><li><b>mesa3d-cvs</b> - CVS check-in messages are sent to this list. | |||
This is useful for tracking ongoing development changes. | |||
</li><li><b>mesa3d-announce</b> - announcements of new Mesa versions are sent to this list. | |||
</li></ul> | |||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-announce" | |||
target="_parent">mesa3d-announce</a> - announcements of new Mesa | |||
versions are sent to this list. | |||
</li> | |||
<br> | |||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users" | |||
target="_parent">mesa3d-users</a> - intended for users of the Mesa library. | |||
Newbie questions are appropriate, but please try the general OpenGL | |||
resources and Mesa documentation first. | |||
</li> | |||
<br> | |||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev" | |||
target="_parent">mesa3d-dev</a> - for discussion of Mesa development. | |||
Not for beginners. | |||
</li> | |||
<br> | |||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit" | |||
target="_parent">mesa-commit</a> - relays git check-in messages | |||
(for developers). | |||
</li> | |||
</ul> | |||
<p> | |||
To subscribe or unsubscribe, go to the | |||
<a href="http://www.sourceforge.net/mail/?group_id=3" target="_parent"> | |||
SourceForge lists page.</a> | |||
</p> | |||
<p>Note: the old mesa3d-cvs list is no longer in use.</p> | |||
<p>The mailing lists are managed by SourceForge. If you're having trouble | |||
with the mailing lists please contact the SourceForge administrators for help.</p> | |||
<br> | |||
<p>Archives of the old Mesa mailing list which was hosted by unicamp.br | |||
are available <a href="http://groups.yahoo.com/group/mesa/messages/" | |||
target="_parent">here</a>.</p> | |||
<H1>OpenGL Forums</H1> | |||
<p> | |||
Here are some other OpenGL-related forums you might find useful: | |||
</p> | |||
<p> | |||
Usenet newsgroups: | |||
<ul> | |||
<li>comp.graphics.algorithms | |||
<li>comp.graphics.api.opengl | |||
<li>comp.os.linux.x | |||
<li><a href="http://www.opengl.org/cgi-bin/ubb/ultimatebb.cgi" | |||
target="_parent">OpenGL discussion forums</A> at www.opengl.org</li> | |||
<li>Usenet newsgroups: | |||
<ul> | |||
<li>comp.graphics.algorithms</li> | |||
<li>comp.graphics.api.opengl</li> | |||
<li>comp.os.linux.x</li> | |||
</ul> | |||
</ul> | |||
</p> | |||
<p> | |||
<a href="http://www.opengl.org/" target="_parent">OpenGL discussion forums</A> | |||
at www.opengl.org | |||
</p> | |||
</HTML> | |||
</BODY> |
@@ -19,6 +19,10 @@ This results in all the Mesa functions being prefixed with | |||
<p> | |||
To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE. | |||
Add the flag to CFLAGS in the configuration file which you want to use. | |||
For example: | |||
<pre> | |||
CFLAGS += -DUSE_MGL_NAMESPACE | |||
</pre> | |||
</p> | |||
@@ -11,6 +11,19 @@ | |||
<H1>News</H1> | |||
<h2>December 5, 2006</h2> | |||
<p> | |||
Mesa is now using git as its source code management system. | |||
The previous CVS repository should no longer be used. | |||
See the <a href="repository.html">repository page</a> for more information. | |||
</p> | |||
<h2>December 2, 2006</h2> | |||
<p> | |||
<a href="relnotes-6.5.2.html">Mesa 6.5.2</a> has been released. | |||
This is a new development release. | |||
</p> | |||
<h2>September 15, 2006</h2> | |||
<p> | |||
<a href="relnotes-6.5.1.html">Mesa 6.5.1</a> has been released. | |||
@@ -1070,6 +1083,6 @@ source code</a>.</p> | |||
<hr> | |||
$Id: news.html,v 3.32 2006/09/21 22:51:16 brianp Exp $ | |||
$Id: news.html,v 3.33 2006/12/02 18:18:41 brianp Exp $ | |||
</body> | |||
</html> |
@@ -12,7 +12,7 @@ | |||
<p> | |||
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of | |||
<a href="versions.html#6.5.1">bug fixes</a>. | |||
bug fixes. | |||
</p> | |||
@@ -8,26 +8,59 @@ | |||
<body bgcolor="#eeeeee"> | |||
<H1>Mesa 6.5.2 Release Notes / (in progress)</H1> | |||
<H1>Mesa 6.5.2 Release Notes / December 2, 2006</H1> | |||
<p> | |||
Mesa 6.5.2 is a 6.5 follow-on development release mostly consisting of | |||
<a href="versions.html#6.5.1">bug fixes</a>. | |||
Mesa 6.5.2 is a 6.5 follow-on development release with a few new features | |||
but mostly consisting of bug fixes. | |||
</p> | |||
<h2>MD5 checksums</h2> | |||
<pre> | |||
11a033b078e090b3caaeb467234fe299 MesaLib-6.5.2.tar.gz | |||
e4d894181f1859651658b3704633e10d MesaLib-6.5.2.tar.bz2 | |||
63bf1d444fa738cca52ce1043e284021 MesaLib-6.5.2.zip | |||
2b8f1375d16bda5f5a2304174cd5bcf7 MesaDemos-6.5.2.tar.gz | |||
e870efe98d3a50be01ab211b9b2e25d9 MesaDemos-6.5.2.tar.bz2 | |||
d92cc6f5fee5ca75af0be04f9f4908f0 MesaDemos-6.5.2.zip | |||
8d4d77e3a7132f4217bbc7c1ab157030 MesaGLUT-6.5.2.tar.gz | |||
e84edbb11c69c8e408dfadd2ed08e95b MesaGLUT-6.5.2.tar.bz2 | |||
c6d7134843ed5faf11f6686ecb5d2a2e MesaGLUT-6.5.2.zip | |||
</pre> | |||
<h2>New Features</h2> | |||
<h2>New features</h2> | |||
<ul> | |||
<li>New DRI memory manager system. Currently used by the i915tex driver. | |||
Other DRI drivers will be updated to use the new memory manager in coming | |||
months. | |||
<br> | |||
To use the new driver you'll need the most recent DRM library and drivers | |||
(version 2.2 or later) and a recent xf86-video-intel driver module from X.org. | |||
<br> | |||
New features resulting from this work include: | |||
<ul> | |||
<li>EXT_framebuffer_objects, render to texture | |||
<li>ARB_pixel_buffer_objects | |||
<li>Accelerated CopyTexSubimage, DrawPixels, ReadPixels, CopyPixels | |||
<li>Accelerated texture uploads from pixel buffer objects | |||
<li>Potentially texturing directly from the pixel buffer object (zero | |||
copy texturing). | |||
</ul> | |||
<li>New Intel i965 DRI driver | |||
<li>New <code>minstall</code> script to replace normal install program | |||
<li>Faster fragment program execution in software | |||
</ul> | |||
<h2>Changes</h2> | |||
<li>Added (or fixed) support for <a href="http://www.opengl.org/registry/specs/SGI/make_current_read.txt"> | |||
GLX_SGI_make_current_read</a> to the following drivers:</li> | |||
<ul> | |||
<li>radeon</li> | |||
<li>savage</li> | |||
<li>mga</li> | |||
<li>tdfx</li> | |||
</ul> | |||
<li>Added support for ARB_occlusion_query to the tdfx driver (Ian | |||
Romanick).</li> | |||
</ul> | |||
<h2>Bug fixes</h2> | |||
@@ -39,11 +72,26 @@ Mesa 6.5.2 is a 6.5 follow-on development release mostly consisting of | |||
<li>glDrawPixels into a user-created framebuffer object could crash Xlib driver | |||
<li>Line clipping was broken in some circumstances | |||
<li>fragment.fogcoord register didn't always contain the correct value | |||
<li>RGBA logicops didn't work reliably in some DRI drivers | |||
<li>Fixed broken RGBA LogicOps in Intel DRI drivers | |||
<li>Fixed some fragment program bugs in Intel i915 DRI driver | |||
<li>Fixed glGetVertexAttribfvARB bug 8883 | |||
<li>Implemented glGetUniform[fi]vARB() functions | |||
<li>Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044) | |||
<li>Fixed some gluBuild2DMipmaps() bugs (Greg McGarragh) | |||
<li>Fixed broken "mgl" name mangling | |||
<li>Indirect rending was broken for glMap* functions (bug 8899) | |||
</ul> | |||
<h2>Internal code changes</h2> | |||
<ul> | |||
<li>The device driver functions ResizeBuffers and GetBufferSize have been | |||
decprecated. | |||
<li>OpenGL 2.0 and 2.1 support is nearly done. We need to do quite a bit | |||
more testing of the shading language functions. | |||
</ul> | |||
<h2>To Do (someday) items</h2> |
@@ -0,0 +1,79 @@ | |||
<HTML> | |||
<TITLE>Mesa Release Notes</TITLE> | |||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head> | |||
<BODY> | |||
<body bgcolor="#eeeeee"> | |||
<H1>Mesa 6.5.3 Release Notes / (in progress)</H1> | |||
<p> | |||
Mesa 6.5.3 is a 6.5 follow-on development release mostly consisting of | |||
bug fixes</a>. | |||
</p> | |||
<h2>MD5 checksums</h2> | |||
<pre> | |||
TBD | |||
</pre> | |||
<h2>New features</h2> | |||
<ul> | |||
</ul> | |||
<h2>Bug fixes</h2> | |||
<ul> | |||
<li>Fog was errantly applied when a fragment shader was enabled (bug 9346) | |||
<li>glPush/PopClientAttrib didn't handle VBO bindings correctly (bug 9445) | |||
<li>With 32-bit Z buffer, the fragment Z of lines and points was sometimes wrong. | |||
</ul> | |||
<h2>Internal code changes</h2> | |||
<ul> | |||
<li>The _MaintainTnlProgram, _MaintainTexEnvProgram, _TexEnvProgram and | |||
_TnlProgram fields have been moved. | |||
<li>The ctx->FragmentProgram._Active field has been removed. | |||
<li>The ctx->Vertex/FragmentProgram._Current fields point to the program | |||
in effect, whether it comes from a shader, user-program or generated | |||
fixed-function program. | |||
<li>The _UseTexEnvProgram field has been removed. | |||
</ul> | |||
<h2>To Do (someday) items</h2> | |||
<ul> | |||
<li>Switch to freeglut | |||
<li>Increase MAX_DRAWBUFFERS | |||
<li>Fix linux-glide target/driver. | |||
<li>Improved lambda and derivative calculation for frag progs. | |||
</ul> | |||
<h2>Driver Status</h2> | |||
<pre> | |||
Driver Status | |||
---------------------- ---------------------- | |||
DRI drivers varies with the driver | |||
XMesa/GLX (on Xlib) implements OpenGL 1.5 | |||
OSMesa (off-screen) implements OpenGL 1.5 | |||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3 | |||
SVGA implements OpenGL 1.3 | |||
Wind River UGL implements OpenGL 1.3 | |||
Windows/Win32 implements OpenGL 1.5 | |||
DJGPP implements OpenGL 1.5 | |||
GGI implements OpenGL 1.3 | |||
BeOS implements OpenGL 1.5 | |||
Allegro needs updating | |||
D3D needs updating | |||
</pre> | |||
</body> | |||
</html> |
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release. | |||
</p> | |||
<UL> | |||
<LI><A HREF="relnotes-6.5.3.html">6.5.3 release notes</A> | |||
<LI><A HREF="relnotes-6.5.2.html">6.5.2 release notes</A> | |||
<LI><A HREF="relnotes-6.5.1.html">6.5.1 release notes</A> | |||
<LI><A HREF="relnotes-6.5.html">6.5 release notes</A> |
@@ -0,0 +1,107 @@ | |||
<HTML> | |||
<TITLE>Cocd Repository</TITLE> | |||
<link rel="stylesheet" type="text/css" href="mesa.css"></head> | |||
<BODY> | |||
<h1>Code Repository</h1> | |||
<p> | |||
As of December 5, 2006, Mesa is using | |||
<a href="http://git.or.cz/"target="_parent">git</a> | |||
as its source code management system. | |||
CVS was used previously. | |||
The old CVS repository should no longer be used. | |||
</p> | |||
The master git repository is hosted on | |||
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>. | |||
</p> | |||
<p> | |||
You may access the repository either as an | |||
<a href="#anonymous">anonymous user</a> (read-only) or as a | |||
<a href="#developer">developer</a> | |||
(read/write). | |||
</p> | |||
<p> | |||
You may also | |||
<a href="http://gitweb.freedesktop.org/?p=mesa/mesa.git" | |||
target="_parent">browse the git repository</a>. | |||
</p> | |||
<a name="anonymous"> | |||
<H2>Anonymous git Access</H2> | |||
<p> | |||
To get the Mesa sources anonymously (read-only): | |||
</p> | |||
<ol> | |||
<li>Install the git software on your computer if needed.<br><br> | |||
<li>Get an initial, local copy of the repository with: | |||
<pre> | |||
git clone git://anongit.freedesktop.org/git/mesa/mesa | |||
</pre> | |||
<li>Later, you can update your tree from the master repository with: | |||
<pre> | |||
git pull origin | |||
</pre> | |||
</ol> | |||
<a name="developer"> | |||
<H2>Developer git Access</H2> | |||
<p> | |||
Mesa developers need to first have an account on | |||
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>. | |||
To get an account, please ask Brian or the other Mesa developers for | |||
permission. | |||
Then, if there are no objections, follow this | |||
<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent"> | |||
procedure</a>. | |||
</p> | |||
<p> | |||
Once your account is established: | |||
</p> | |||
<ol> | |||
<li>Install the git software on your computer if needed.<br><br> | |||
<li>Get an initial, local copy of the repository with: | |||
<pre> | |||
git clone git+ssh://username@git.freedesktop.org/git/mesa/mesa | |||
</pre> | |||
Replace <em>username</em> with your actual login name.<br><br> | |||
<li>Later, you can update your tree from the master repository with: | |||
<pre> | |||
git pull origin | |||
</pre> | |||
</ol> | |||
<a name="developer"> | |||
<H2>Development Branches</H2> | |||
<p> | |||
At any given time, there may be several active branches in Mesa's | |||
repository. | |||
Generally, the trunk contains the latest development (unstable) | |||
code while a branch has the latest stable code. | |||
</p> | |||
<p> | |||
Questions about active Mesa development branches should be posted to | |||
the mesa3d-dev mailing list. | |||
</p> | |||
</body> | |||
</html> | |||
@@ -2172,37 +2172,6 @@ GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, | |||
#endif /* GL_ARB_shader_objects */ | |||
/* | |||
* ???. GL_MESA_trace | |||
* XXX obsolete | |||
*/ | |||
#ifndef GL_MESA_trace | |||
#define GL_MESA_trace 1 | |||
#define GL_TRACE_ALL_BITS_MESA 0xFFFF | |||
#define GL_TRACE_OPERATIONS_BIT_MESA 0x0001 | |||
#define GL_TRACE_PRIMITIVES_BIT_MESA 0x0002 | |||
#define GL_TRACE_ARRAYS_BIT_MESA 0x0004 | |||
#define GL_TRACE_TEXTURES_BIT_MESA 0x0008 | |||
#define GL_TRACE_PIXELS_BIT_MESA 0x0010 | |||
#define GL_TRACE_ERRORS_BIT_MESA 0x0020 | |||
#define GL_TRACE_MASK_MESA 0x8755 | |||
#define GL_TRACE_NAME_MESA 0x8756 | |||
GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask ); | |||
GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask ); | |||
GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName ); | |||
GLAPI void GLAPIENTRY glEndTraceMESA( void ); | |||
GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask ); | |||
GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment ); | |||
GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment ); | |||
GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment ); | |||
GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment ); | |||
GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment ); | |||
#endif /* GL_MESA_trace */ | |||
/* | |||
* ???. GL_MESA_packed_depth_stencil | |||
* XXX obsolete |
@@ -274,7 +274,6 @@ | |||
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS) | |||
#define glDisableClientState MANGLE(DisableClientState) | |||
#define glDisable MANGLE(Disable) | |||
#define glDisableTraceMESA MANGLE(DisableTraceMESA) | |||
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT) | |||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB) | |||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray) | |||
@@ -302,7 +301,6 @@ | |||
#define glElementPointerATI MANGLE(ElementPointerATI) | |||
#define glEnableClientState MANGLE(EnableClientState) | |||
#define glEnable MANGLE(Enable) | |||
#define glEnableTraceMESA MANGLE(EnableTraceMESA) | |||
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT) | |||
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB) | |||
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray) | |||
@@ -312,7 +310,6 @@ | |||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV) | |||
#define glEndQueryARB MANGLE(EndQueryARB) | |||
#define glEndQuery MANGLE(EndQuery) | |||
#define glEndTraceMESA MANGLE(EndTraceMESA) | |||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT) | |||
#define glEvalCoord1d MANGLE(EvalCoord1d) | |||
#define glEvalCoord1dv MANGLE(EvalCoord1dv) | |||
@@ -781,7 +778,6 @@ | |||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf) | |||
#define glNewList MANGLE(NewList) | |||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI) | |||
#define glNewTraceMESA MANGLE(NewTraceMESA) | |||
#define glNormal3b MANGLE(Normal3b) | |||
#define glNormal3bv MANGLE(Normal3bv) | |||
#define glNormal3d MANGLE(Normal3d) | |||
@@ -923,6 +919,7 @@ | |||
#define glRectsv MANGLE(Rectsv) | |||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX) | |||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT) | |||
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT) | |||
#define glRenderMode MANGLE(RenderMode) | |||
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN) | |||
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN) | |||
@@ -1022,6 +1019,7 @@ | |||
#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX) | |||
#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX) | |||
#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX) | |||
#define glStencilClearTagEXT MANGLE(StencilClearTagEXT) | |||
#define glStencilFunc MANGLE(StencilFunc) | |||
#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI) | |||
#define glStencilFuncSeparate MANGLE(StencilFuncSeparate) | |||
@@ -1140,12 +1138,6 @@ | |||
#define glTextureLightEXT MANGLE(TextureLightEXT) | |||
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT) | |||
#define glTextureNormalEXT MANGLE(TextureNormalEXT) | |||
#define glTraceAssertAttribMESA MANGLE(TraceAssertAttribMESA) | |||
#define glTraceCommentMESA MANGLE(TraceCommentMESA) | |||
#define glTraceListMESA MANGLE(TraceListMESA) | |||
#define glTracePointerMESA MANGLE(TracePointerMESA) | |||
#define glTracePointerRangeMESA MANGLE(TracePointerRangeMESA) | |||
#define glTraceTextureMESA MANGLE(TraceTextureMESA) | |||
#define glTrackMatrixNV MANGLE(TrackMatrixNV) | |||
#define glTranslated MANGLE(Translated) | |||
#define glTranslatef MANGLE(Translatef) | |||
@@ -1183,10 +1175,16 @@ | |||
#define glUniform4iv MANGLE(Uniform4iv) | |||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB) | |||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv) | |||
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv) | |||
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv) | |||
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB) | |||
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv) | |||
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv) | |||
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv) | |||
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB) | |||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv) | |||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv) | |||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv) | |||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT) | |||
#define glUnmapBufferARB MANGLE(UnmapBufferARB) | |||
#define glUnmapBuffer MANGLE(UnmapBuffer) |
@@ -1,21 +1,25 @@ | |||
/* | |||
* Mesa 3-D graphics library | |||
* Version: 4.1 | |||
* Copyright (C) 1995-1998 Brian Paul | |||
* | |||
* This library is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Library General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 2 of the License, or (at your option) any later version. | |||
* | |||
* This library is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Library General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Library General Public | |||
* License along with this library; if not, write to the Free | |||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
* Version: 6.5 | |||
* | |||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved. | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included | |||
* in all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
*/ | |||
@@ -48,6 +52,28 @@ | |||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI | |||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI | |||
/* GLX 1.2 */ | |||
#define glXGetCurrentDisplay mglXGetCurrentDisplay | |||
/* GLX 1.3 */ | |||
#define glXChooseFBConfig mglXChooseFBConfig | |||
#define glXGetFBConfigAttrib mglXGetFBConfigAttrib | |||
#define glXGetFBConfigs mglXGetFBConfigs | |||
#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig | |||
#define glXCreateWindow mglXCreateWindow | |||
#define glXDestroyWindow mglXDestroyWindow | |||
#define glXCreatePixmap mglXCreatePixmap | |||
#define glXDestroyPixmap mglXDestroyPixmap | |||
#define glXCreatePbuffer mglXCreatePbuffer | |||
#define glXDestroyPbuffer mglXDestroyPbuffer | |||
#define glXQueryDrawable mglXQueryDrawable | |||
#define glXCreateNewContext mglXCreateNewContext | |||
#define glXMakeContextCurrent mglXMakeContextCurrent | |||
#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable | |||
#define glXQueryContext mglXQueryContext | |||
#define glXSelectEvent mglXSelectEvent | |||
#define glXGetSelectedEvent mglXGetSelectedEvent | |||
/* GLX 1.4 */ | |||
#define glXGetProcAddress mglXGetProcAddress | |||
@@ -237,6 +237,26 @@ struct __DRIinterfaceMethodsRec { | |||
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable, | |||
int32_t * numerator, int32_t * denominator); | |||
/*@}*/ | |||
/** | |||
* Reports areas of the given drawable which have been modified by the | |||
* driver. | |||
* | |||
* \param drawable which the drawing was done to. | |||
* \param rects rectangles affected, with the drawable origin as the | |||
* origin. | |||
* \param x X offset of the drawable within the screen (used in the | |||
* front_buffer case) | |||
* \param y Y offset of the drawable within the screen. | |||
* \param front_buffer boolean flag for whether the drawing to the | |||
* drawable was actually done directly to the front buffer (instead | |||
* of backing storage, for example) | |||
*/ | |||
void (*reportDamage)(__DRInativeDisplay * dpy, int screen, | |||
__DRIid drawable, | |||
int x, int y, | |||
drm_clip_rect_t *rects, int num_rects, | |||
int front_buffer); | |||
}; | |||
@@ -1,4 +1,3 @@ | |||
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */ | |||
#ifndef __gl_core_h_ | |||
#define __gl_core_h_ | |||
@@ -37,9 +36,7 @@ | |||
** | |||
*/ | |||
#ifndef XFree86LOADER | |||
#include <sys/types.h> | |||
#endif | |||
#ifdef CAPI | |||
#undef CAPI |
@@ -25,6 +25,7 @@ PROGS = \ | |||
fire \ | |||
fogcoord \ | |||
fplight \ | |||
fslight \ | |||
gamma \ | |||
gearbox \ | |||
gears \ |
@@ -0,0 +1,334 @@ | |||
/** | |||
* Test OpenGL 2.0 vertex/fragment shaders. | |||
* Brian Paul | |||
* 1 November 2006 | |||
* | |||
* Based on ARB version by: | |||
* Michal Krol | |||
* 20 February 2006 | |||
* | |||
* Based on the original demo by: | |||
* Brian Paul | |||
* 17 April 2003 | |||
*/ | |||
#include <assert.h> | |||
#include <string.h> | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <math.h> | |||
#include <GL/gl.h> | |||
#include <GL/glut.h> | |||
#include <GL/glext.h> | |||
static GLfloat diffuse[4] = { 0.5f, 0.5f, 1.0f, 1.0f }; | |||
static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f }; | |||
static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 1.0f }; | |||
static GLfloat delta = 1.0f; | |||
static GLuint fragShader; | |||
static GLuint vertShader; | |||
static GLuint program; | |||
static GLint uLightPos; | |||
static GLint uDiffuse; | |||
static GLint uSpecular; | |||
static GLint win = 0; | |||
static GLboolean anim = GL_TRUE; | |||
static GLboolean wire = GL_FALSE; | |||
static GLboolean pixelLight = GL_TRUE; | |||
static GLint t0 = 0; | |||
static GLint frames = 0; | |||
static GLfloat xRot = 0.0f, yRot = 0.0f; | |||
static PFNGLCREATESHADERPROC glCreateShader_func = NULL; | |||
static PFNGLSHADERSOURCEPROC glShaderSource_func = NULL; | |||
static PFNGLGETSHADERSOURCEPROC glGetShaderSource_func = NULL; | |||
static PFNGLCOMPILESHADERPROC glCompileShader_func = NULL; | |||
static PFNGLCREATEPROGRAMPROC glCreateProgram_func = NULL; | |||
static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL; | |||
static PFNGLDELETESHADERPROC glDeleteShader_func = NULL; | |||
static PFNGLATTACHSHADERPROC glAttachShader_func = NULL; | |||
static PFNGLLINKPROGRAMPROC glLinkProgram_func = NULL; | |||
static PFNGLUSEPROGRAMPROC glUseProgram_func = NULL; | |||
static PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation_func = NULL; | |||
static PFNGLISPROGRAMPROC glIsProgram_func = NULL; | |||
static PFNGLISSHADERPROC glIsShader_func = NULL; | |||
static PFNGLUNIFORM3FVPROC glUniform3fv_func = NULL; | |||
static PFNGLUNIFORM3FVPROC glUniform4fv_func = NULL; | |||
static void | |||
normalize(GLfloat *dst, const GLfloat *src) | |||
{ | |||
GLfloat len = sqrtf(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]); | |||
dst[0] = src[0] / len; | |||
dst[1] = src[1] / len; | |||
dst[2] = src[2] / len; | |||
} | |||
static void | |||
Redisplay(void) | |||
{ | |||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | |||
if (pixelLight) { | |||
GLfloat vec[3]; | |||
glUseProgram_func(program); | |||
normalize(vec, lightPos); | |||
glUniform3fv_func(uLightPos, 1, vec); | |||
glDisable(GL_LIGHTING); | |||
} | |||
else { | |||
glUseProgram_func(0); | |||
glLightfv(GL_LIGHT0, GL_POSITION, lightPos); | |||
glEnable(GL_LIGHTING); | |||
} | |||
glPushMatrix(); | |||
glRotatef(xRot, 1.0f, 0.0f, 0.0f); | |||
glRotatef(yRot, 0.0f, 1.0f, 0.0f); | |||
glutSolidSphere(2.0, 10, 5); | |||
glPopMatrix(); | |||
glutSwapBuffers(); | |||
frames++; | |||
if (anim) { | |||
GLint t = glutGet(GLUT_ELAPSED_TIME); | |||
if (t - t0 >= 5000) { | |||
GLfloat seconds =(GLfloat)(t - t0) / 1000.0f; | |||
GLfloat fps = frames / seconds; | |||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", | |||
frames, seconds, fps); | |||
t0 = t; | |||
frames = 0; | |||
} | |||
} | |||
} | |||
static void | |||
Idle(void) | |||
{ | |||
lightPos[0] += delta; | |||
if (lightPos[0] > 25.0f || lightPos[0] < -25.0f) | |||
delta = -delta; | |||
glutPostRedisplay(); | |||
} | |||
static void | |||
Reshape(int width, int height) | |||
{ | |||
glViewport(0, 0, width, height); | |||
glMatrixMode(GL_PROJECTION); | |||
glLoadIdentity(); | |||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0); | |||
glMatrixMode(GL_MODELVIEW); | |||
glLoadIdentity(); | |||
glTranslatef(0.0f, 0.0f, -15.0f); | |||
} | |||
static void | |||
CleanUp(void) | |||
{ | |||
glDeleteShader_func(fragShader); | |||
glDeleteShader_func(vertShader); | |||
glDeleteProgram_func(program); | |||
glutDestroyWindow(win); | |||
} | |||
static void | |||
Key(unsigned char key, int x, int y) | |||
{ | |||
(void) x; | |||
(void) y; | |||
switch(key) { | |||
case ' ': | |||
case 'a': | |||
anim = !anim; | |||
if (anim) | |||
glutIdleFunc(Idle); | |||
else | |||
glutIdleFunc(NULL); | |||
break; | |||
case 'x': | |||
lightPos[0] -= 1.0f; | |||
break; | |||
case 'X': | |||
lightPos[0] += 1.0f; | |||
break; | |||
case 'w': | |||
wire = !wire; | |||
if (wire) | |||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | |||
else | |||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | |||
break; | |||
case 'p': | |||
pixelLight = !pixelLight; | |||
if (pixelLight) | |||
printf("Per-pixel lighting\n"); | |||
else | |||
printf("Conventional lighting\n"); | |||
break; | |||
case 27: | |||
CleanUp(); | |||
exit(0); | |||
break; | |||
} | |||
glutPostRedisplay(); | |||
} | |||
static void | |||
SpecialKey(int key, int x, int y) | |||
{ | |||
const GLfloat step = 3.0f; | |||
(void) x; | |||
(void) y; | |||
switch(key) { | |||
case GLUT_KEY_UP: | |||
xRot -= step; | |||
break; | |||
case GLUT_KEY_DOWN: | |||
xRot += step; | |||
break; | |||
case GLUT_KEY_LEFT: | |||
yRot -= step; | |||
break; | |||
case GLUT_KEY_RIGHT: | |||
yRot += step; | |||
break; | |||
} | |||
glutPostRedisplay(); | |||
} | |||
static void | |||
Init(void) | |||
{ | |||
static const char *fragShaderText = | |||
"uniform vec3 lightPos;\n" | |||
"uniform vec4 diffuse;\n" | |||
"uniform vec4 specular;\n" | |||
"varying vec3 normal;\n" | |||
"void main() {\n" | |||
" // Compute dot product of light direction and normal vector\n" | |||
" float dotProd = max(dot(lightPos, normalize(normal)), 0.0);\n" | |||
" // Compute diffuse and specular contributions\n" | |||
" gl_FragColor = diffuse * dotProd + specular * pow(dotProd, 20.0);\n" | |||
"}\n"; | |||
static const char *vertShaderText = | |||
"varying vec3 normal;\n" | |||
"void main() {\n" | |||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" | |||
" normal = gl_NormalMatrix * gl_Normal;\n" | |||
"}\n"; | |||
const char *version; | |||
version = (const char *) glGetString(GL_VERSION); | |||
if (version[0] != '2' || version[1] != '.') { | |||
printf("Warning: this program expects OpenGL 2.0\n"); | |||
/*exit(1);*/ | |||
} | |||
glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader"); | |||
glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader"); | |||
glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram"); | |||
glShaderSource_func = (PFNGLSHADERSOURCEPROC) glutGetProcAddress("glShaderSource"); | |||
glGetShaderSource_func = (PFNGLGETSHADERSOURCEPROC) glutGetProcAddress("glGetShaderSource"); | |||
glCompileShader_func = (PFNGLCOMPILESHADERPROC) glutGetProcAddress("glCompileShader"); | |||
glCreateProgram_func = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress("glCreateProgram"); | |||
glAttachShader_func = (PFNGLATTACHSHADERPROC) glutGetProcAddress("glAttachShader"); | |||
glLinkProgram_func = (PFNGLLINKPROGRAMPROC) glutGetProcAddress("glLinkProgram"); | |||
glUseProgram_func = (PFNGLUSEPROGRAMPROC) glutGetProcAddress("glUseProgram"); | |||
glGetUniformLocation_func = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress("glGetUniformLocation"); | |||
glIsProgram_func = (PFNGLISPROGRAMPROC) glutGetProcAddress("glIsProgram"); | |||
glIsShader_func = (PFNGLISSHADERPROC) glutGetProcAddress("glIsShader"); | |||
glUniform3fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform3fv"); | |||
glUniform4fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform4fv"); | |||
fragShader = glCreateShader_func(GL_FRAGMENT_SHADER); | |||
glShaderSource_func(fragShader, 1, &fragShaderText, NULL); | |||
glCompileShader_func(fragShader); | |||
vertShader = glCreateShader_func(GL_VERTEX_SHADER); | |||
glShaderSource_func(vertShader, 1, &vertShaderText, NULL); | |||
glCompileShader_func(vertShader); | |||
program = glCreateProgram_func(); | |||
glAttachShader_func(program, fragShader); | |||
glAttachShader_func(program, vertShader); | |||
glLinkProgram_func(program); | |||
glUseProgram_func(program); | |||
uLightPos = glGetUniformLocation_func(program, "lightPos"); | |||
uDiffuse = glGetUniformLocation_func(program, "diffuse"); | |||
uSpecular = glGetUniformLocation_func(program, "specular"); | |||
glUniform4fv_func(uDiffuse, 1, diffuse); | |||
glUniform4fv_func(uSpecular, 1, specular); | |||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f); | |||
glEnable(GL_DEPTH_TEST); | |||
glEnable(GL_LIGHT0); | |||
glEnable(GL_LIGHTING); | |||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse); | |||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular); | |||
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0f); | |||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER)); | |||
printf("Press p to toggle between per-pixel and per-vertex lighting\n"); | |||
/* test glGetShaderSource() */ | |||
{ | |||
GLsizei len = strlen(fragShaderText) + 1; | |||
GLsizei lenOut; | |||
GLchar *src =(GLchar *) malloc(len * sizeof(GLchar)); | |||
glGetShaderSource_func(fragShader, 0, NULL, src); | |||
glGetShaderSource_func(fragShader, len, &lenOut, src); | |||
assert(len == lenOut + 1); | |||
assert(strcmp(src, fragShaderText) == 0); | |||
free(src); | |||
} | |||
assert(glIsProgram_func(program)); | |||
assert(glIsShader_func(fragShader)); | |||
assert(glIsShader_func(vertShader)); | |||
} | |||
int | |||
main(int argc, char *argv[]) | |||
{ | |||
glutInit(&argc, argv); | |||
glutInitWindowPosition( 0, 0); | |||
glutInitWindowSize(200, 200); | |||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); | |||
win = glutCreateWindow(argv[0]); | |||
glutReshapeFunc(Reshape); | |||
glutKeyboardFunc(Key); | |||
glutSpecialFunc(SpecialKey); | |||
glutDisplayFunc(Redisplay); | |||
if (anim) | |||
glutIdleFunc(Idle); | |||
Init(); | |||
glutMainLoop(); | |||
return 0; | |||
} | |||
@@ -27,9 +27,9 @@ | |||
#include <math.h> | |||
#include <directfb.h> | |||
#include <directfbgl.h> | |||
#include <GL/gl.h> | |||
#include <GL/directfbgl.h> | |||
/* the super interface */ |
@@ -159,9 +159,9 @@ So the angle is: | |||
#include <unistd.h> | |||
#include <directfb.h> | |||
#include <directfbgl.h> | |||
#include <GL/gl.h> | |||
#include <GL/directfbgl.h> | |||
/* the super interface */ |
@@ -27,9 +27,9 @@ | |||
#include <math.h> | |||
#include <directfb.h> | |||
#include <directfbgl.h> | |||
#include <GL/glu.h> | |||
#include <GL/directfbgl.h> | |||
#include "util/showbuffer.c" | |||
#include "util/readtex.c" |
@@ -1,4 +1,4 @@ | |||
/* $Id: cva.c,v 1.7 2003/12/08 09:03:35 joukj Exp $ */ | |||
/* $Id: cva.c,v 1.8 2006/11/22 19:37:21 sroland Exp $ */ | |||
/* | |||
* Trivial CVA test, good for testing driver fastpaths (especially | |||
@@ -119,6 +119,7 @@ int main( int argc, char **argv ) | |||
{ | |||
GLenum type; | |||
char *string; | |||
double version; | |||
glutInit( &argc, argv ); | |||
@@ -138,9 +139,8 @@ int main( int argc, char **argv ) | |||
*/ | |||
string = (char *) glGetString( GL_VERSION ); | |||
if ( !strstr(string, "1.2") && | |||
!strstr(string, "1.3") && | |||
!strstr(string, "1.4")) { | |||
version = atof(string); | |||
if ( version < 1.2 ) { | |||
fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" ); | |||
exit( -1 ); | |||
} |
@@ -268,6 +268,75 @@ test_VertexAttrib4dvNV(generic_func func) | |||
} | |||
static GLboolean | |||
test_StencilFuncSeparate(generic_func func) | |||
{ | |||
#ifdef GL_VERSION_2_0 | |||
PFNGLSTENCILFUNCSEPARATEPROC stencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) func; | |||
GLint frontFunc, backFunc; | |||
GLint frontRef, backRef; | |||
GLint frontMask, backMask; | |||
(*stencilFuncSeparate)(GL_BACK, GL_GREATER, 2, 0xa); | |||
glGetIntegerv(GL_STENCIL_FUNC, &frontFunc); | |||
glGetIntegerv(GL_STENCIL_BACK_FUNC, &backFunc); | |||
glGetIntegerv(GL_STENCIL_REF, &frontRef); | |||
glGetIntegerv(GL_STENCIL_BACK_REF, &backRef); | |||
glGetIntegerv(GL_STENCIL_VALUE_MASK, &frontMask); | |||
glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, &backMask); | |||
if (frontFunc != GL_ALWAYS || | |||
backFunc != GL_GREATER || | |||
frontRef != 0 || | |||
backRef != 2 || | |||
frontMask == 0xa || /* might be 0xff or ~0 */ | |||
backMask != 0xa) | |||
return GL_FALSE; | |||
#endif | |||
return GL_TRUE; | |||
} | |||
static GLboolean | |||
test_StencilOpSeparate(generic_func func) | |||
{ | |||
#ifdef GL_VERSION_2_0 | |||
PFNGLSTENCILOPSEPARATEPROC stencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) func; | |||
GLint frontFail, backFail; | |||
GLint frontZFail, backZFail; | |||
GLint frontZPass, backZPass; | |||
(*stencilOpSeparate)(GL_BACK, GL_INCR, GL_DECR, GL_INVERT); | |||
glGetIntegerv(GL_STENCIL_FAIL, &frontFail); | |||
glGetIntegerv(GL_STENCIL_BACK_FAIL, &backFail); | |||
glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &frontZFail); | |||
glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, &backZFail); | |||
glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &frontZPass); | |||
glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, &backZPass); | |||
if (frontFail != GL_KEEP || | |||
backFail != GL_INCR || | |||
frontZFail != GL_KEEP || | |||
backZFail != GL_DECR || | |||
frontZPass != GL_KEEP || | |||
backZPass != GL_INVERT) | |||
return GL_FALSE; | |||
#endif | |||
return GL_TRUE; | |||
} | |||
static GLboolean | |||
test_StencilMaskSeparate(generic_func func) | |||
{ | |||
#ifdef GL_VERSION_2_0 | |||
PFNGLSTENCILMASKSEPARATEPROC stencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) func; | |||
GLint frontMask, backMask; | |||
(*stencilMaskSeparate)(GL_BACK, 0x1b); | |||
glGetIntegerv(GL_STENCIL_WRITEMASK, &frontMask); | |||
glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, &backMask); | |||
if (frontMask == 0x1b || | |||
backMask != 0x1b) | |||
return GL_FALSE; | |||
#endif | |||
return GL_TRUE; | |||
} | |||
/* | |||
* The following file is auto-generated with Python. | |||
*/ | |||
@@ -302,12 +371,19 @@ check_functions( const char *extensions ) | |||
for (entry = functions; entry->name; entry++) { | |||
if (entry->name[0] == '-') { | |||
/* XXX update for OpenGL 2.0 */ | |||
const char *version = (const char *) glGetString(GL_VERSION); | |||
if (entry->name[1] == '1') { | |||
/* check GL version X.Y */ | |||
const char *version = (const char *) glGetString(GL_VERSION); | |||
if (version[0] == entry->name[1] && | |||
version[1] == entry->name[2] && | |||
/* check GL version 1.x */ | |||
if (version[0] == '1' && | |||
version[1] == '.' && | |||
version[2] >= entry->name[3]) | |||
doTests = 1; | |||
else | |||
doTests = 0; | |||
} | |||
else if (entry->name[1] == '2') { | |||
if (version[0] == '2' && | |||
version[1] == '.' && | |||
version[2] >= entry->name[3]) | |||
doTests = 1; | |||
else | |||
@@ -377,12 +453,14 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect) | |||
GLX_RED_SIZE, 1, | |||
GLX_GREEN_SIZE, 1, | |||
GLX_BLUE_SIZE, 1, | |||
GLX_STENCIL_SIZE, 1, | |||
None }; | |||
int attribDouble[] = { | |||
GLX_RGBA, | |||
GLX_RED_SIZE, 1, | |||
GLX_GREEN_SIZE, 1, | |||
GLX_BLUE_SIZE, 1, | |||
GLX_STENCIL_SIZE, 1, | |||
GLX_DOUBLEBUFFER, | |||
None }; | |||
@@ -127,7 +127,7 @@ static void display(void) | |||
GLfloat tcm = 4.0; | |||
printf("BASE_LEVEL = %d MAX_LEVEL = %d MIN_LOD = %f MAX_LOD = %f Bias = %.2g filter = %s\n", | |||
BaseLevel, MaxLevel, MinLod, MaxLod, LodBias, | |||
NearestFilter ? "LINEAR" : "NEAREST"); | |||
NearestFilter ? "NEAREST" : "LINEAR"); | |||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, BaseLevel); | |||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, MaxLevel); | |||
@@ -24,11 +24,11 @@ PROGS = glthreads \ | |||
pbinfo \ | |||
pbdemo \ | |||
wincopy \ | |||
xdemo \ | |||
xfont \ | |||
xrotfontdemo \ | |||
yuvrect_client | |||
# omit this XMesa API demo: xdemo | |||
##### RULES ##### |
@@ -473,7 +473,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(displayName); | |||
if (!dpy) { | |||
fprintf(stderr, "Unable to open display %s\n", displayName); | |||
fprintf(stderr, "Unable to open display %s\n", XDisplayName(displayName)); | |||
return -1; | |||
} | |||
} |
@@ -587,8 +587,8 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", | |||
dpyName ? dpyName : getenv("DISPLAY")); | |||
fprintf(stderr, "Error: couldn't open display %s\n", | |||
XDisplayName(dpyName)); | |||
return -1; | |||
} | |||
@@ -575,7 +575,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", dpyName); | |||
printf("Error: couldn't open display %s\n", XDisplayName(dpyName)); | |||
return -1; | |||
} | |||
@@ -57,7 +57,7 @@ static int NumHeads = 0; | |||
static void | |||
Error(const char *display, const char *msg) | |||
{ | |||
fprintf(stderr, "Error on display %s - %s\n", display, msg); | |||
fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg); | |||
exit(1); | |||
} | |||
@@ -456,7 +456,19 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) | |||
} | |||
printf("display: %s screen: %d\n", displayName, scrnum); | |||
free(displayName); | |||
printf("direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No"); | |||
printf("direct rendering: "); | |||
if (glXIsDirect(dpy, ctx)) { | |||
printf("Yes\n"); | |||
} else { | |||
if (!allowDirect) { | |||
printf("No (-i specified)\n"); | |||
} else if (getenv("LIBGL_ALWAYS_INDIRECT")) { | |||
printf("No (LIBGL_ALWAYS_INDIRECT set)\n"); | |||
} else { | |||
printf("No (If you want to find out why, try setting " | |||
"LIBGL_DEBUG=verbose)\n"); | |||
} | |||
} | |||
printf("server glx vendor string: %s\n", serverVendor); | |||
printf("server glx version string: %s\n", serverVersion); | |||
printf("server glx extensions:\n"); | |||
@@ -927,7 +939,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(displayName); | |||
if (!dpy) { | |||
fprintf(stderr, "Error: unable to open display %s\n", displayName); | |||
fprintf(stderr, "Error: unable to open display %s\n", XDisplayName(displayName)); | |||
return -1; | |||
} | |||
@@ -749,7 +749,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", dpyName); | |||
printf("Error: couldn't open display %s\n", XDisplayName(dpyName)); | |||
return -1; | |||
} | |||
@@ -59,7 +59,7 @@ static GLuint TexObj = 0; | |||
static void | |||
Error(const char *display, const char *msg) | |||
{ | |||
fprintf(stderr, "Error on display %s - %s\n", display, msg); | |||
fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg); | |||
exit(1); | |||
} | |||
@@ -91,7 +91,7 @@ make_window( const char * dpyName, const char *name, | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", dpyName); | |||
printf("Error: couldn't open display %s\n", XDisplayName(dpyName)); | |||
exit(1); | |||
} | |||
@@ -95,7 +95,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", dpyName ? dpyName : ":0"); | |||
printf("Error: couldn't open display %s\n", XDisplayName(dpyName)); | |||
return 1; | |||
} | |||
@@ -296,7 +296,7 @@ main(int argc, char *argv[]) | |||
dpy = XOpenDisplay(dpyName); | |||
if (!dpy) { | |||
printf("Error: couldn't open display %s\n", | |||
dpyName ? dpyName : getenv("DISPLAY")); | |||
XDisplayName(dpyName)); | |||
return -1; | |||
} | |||
@@ -18,7 +18,7 @@ Status | |||
Version | |||
10 (10 August 2005) | |||
11 (27 January 2006) | |||
Number | |||
@@ -127,22 +127,8 @@ Issues | |||
isn't always reliable (consider video projectors) but can still be | |||
used to determine the pixel aspect ratio. | |||
Arguments for: | |||
X supports a similar query with DisplayWidthMM(), DisplayHeightMM(). | |||
If this information can be easily queried with EDID, why not | |||
make it available to the user? | |||
Arguments against: | |||
Historically, these values aren't always accurate. Also, they're | |||
not always applicable to the display device. | |||
Other options: | |||
Perhaps just a pixel aspect ratio should be supported. [M. Danzer] | |||
Postpone for a future extension, if needed. [A. Jackson] | |||
Resolution: Omit. The EGL 1.2 specification includes queries for | |||
the display resolution and pixel aspect ratio. | |||
6. Should detailed mode timing information be exposed by this API? | |||
@@ -222,7 +208,7 @@ Issues | |||
14. What if the physical screen size can't be determined? Should | |||
a query of EGL_PHYSICAL_SIZE_MESA return [0,0]? | |||
TBD. | |||
Obsolete: EGL_PHYSICAL_SIZE_MESA not used. | |||
15. Suppose the device's number of RAMDACs is different from the | |||
@@ -317,7 +303,6 @@ New Tokens | |||
EGL_SCREEN_COUNT_MESA | |||
EGL_SCREEN_POSITION_MESA | |||
EGL_PHYSICAL_SIZE_MESA | |||
EGL_SCREEN_BIT_MESA | |||
EGL_SCREEN_POSITION_GRANULARITY_MESA | |||
@@ -488,8 +473,6 @@ Additions to Chapter X of the EGL 1.1 Specification | |||
EGL_SCREEN_POSITION_GRANULARITY_MESA | |||
Returns the granularity, in pixels, for | |||
which the screen position is constrained. | |||
EGL_PHYSICAL_SIZE_MESA Physical width and height of the screen | |||
in millimeters | |||
Any other token will generate the error EGL_BAD_ATTRIBUTE. | |||
@@ -576,3 +559,6 @@ Version History | |||
10. 10 August 2005 - BrianP | |||
Added EGL_SCREEN_POSITION_GRANULARITY_MESA. | |||
11. 27 January 2006 - BrianP | |||
EGL_PHYSICAL_SIZE_MESA removed since EGL 1.2 has a similar feature. | |||
@@ -377,6 +377,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLubyte *s; | |||
const char *t; | |||
@@ -390,6 +391,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -405,6 +407,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -476,6 +479,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLbyte *s; | |||
const char *t; | |||
@@ -489,6 +493,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -504,6 +509,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -573,6 +579,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLushort *s; | |||
const char *t; | |||
@@ -586,6 +593,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -602,6 +610,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
else | |||
@@ -616,6 +625,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -708,6 +718,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLshort *s; | |||
const char *t; | |||
@@ -721,6 +732,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -737,6 +749,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
else | |||
@@ -758,6 +771,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -850,6 +864,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLuint *s; | |||
const char *t; | |||
@@ -863,6 +878,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -881,6 +897,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
else | |||
@@ -899,6 +916,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -990,6 +1008,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLint *s; | |||
const char *t; | |||
@@ -1003,6 +1022,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -1019,6 +1039,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
else | |||
@@ -1041,6 +1062,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -1134,6 +1156,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height, | |||
{ | |||
int i, j, k; | |||
int newwidth, newheight; | |||
int padBytes; | |||
GLfloat *s; | |||
const char *t; | |||
@@ -1147,6 +1170,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height, | |||
newwidth = width / 2; | |||
newheight = height / 2; | |||
padBytes = ysize - (width*group_size); | |||
s = dataout; | |||
t = (const char *)datain; | |||
@@ -1163,6 +1187,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
else | |||
@@ -1183,6 +1208,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height, | |||
} | |||
t += group_size; | |||
} | |||
t += padBytes; | |||
t += ysize; | |||
} | |||
} | |||
@@ -3845,10 +3871,12 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, | |||
if (width == newwidth && height == newheight) { | |||
/* Use usersImage for level userLevel */ | |||
if (baseLevel <= level && level <= maxLevel) { | |||
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); | |||
glTexImage2D(target, level, internalFormat, width, | |||
height, 0, format, type, | |||
usersImage); | |||
} | |||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); | |||
if(levels == 0) { /* we're done. clean up and return */ | |||
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); | |||
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); | |||
@@ -8643,7 +8671,8 @@ static void halveImageSlice(int components, | |||
int halfHeight= height / 2; | |||
int halfDepth= depth / 2; | |||
const char *src= (const char *)dataIn; | |||
int padBytes= rowSizeInBytes - (width * groupSizeInBytes); | |||
int rowPadBytes= rowSizeInBytes - (width * groupSizeInBytes); | |||
int imagePadBytes= imageSizeInBytes - (width*height*groupSizeInBytes); | |||
int outIndex= 0; | |||
assert((width == 1 || height == 1) && depth >= 2); | |||
@@ -8727,7 +8756,7 @@ static void halveImageSlice(int components, | |||
/* skip over to next horizontal square of 4 */ | |||
src+= groupSizeInBytes; | |||
} /* for jj */ | |||
src+= padBytes; | |||
src+= rowPadBytes; | |||
src+= rowSizeInBytes; | |||
} /* for ii */ | |||
@@ -8772,11 +8801,12 @@ static void halveImageSlice(int components, | |||
src+= elementSizeInBytes; | |||
} /* for cc */ | |||
src+= padBytes; | |||
src+= rowPadBytes; | |||
/* skip over to next vertical square of 4 */ | |||
src+= rowSizeInBytes; | |||
} /* for jj */ | |||
src+= imagePadBytes; | |||
src+= imageSizeInBytes; | |||
} /* for ii */ | |||
@@ -8816,7 +8846,8 @@ static void halveImage3D(int components, | |||
int halfHeight= height / 2; | |||
int halfDepth= depth / 2; | |||
const char *src= (const char *) dataIn; | |||
int padBytes= rowSizeInBytes - (width*groupSizeInBytes); | |||
int rowPadBytes= rowSizeInBytes - (width*groupSizeInBytes); | |||
int imagePadBytes= imageSizeInBytes - (width*height*groupSizeInBytes); | |||
int outIndex= 0; | |||
for (dd= 0; dd < halfDepth; dd++) { | |||
@@ -8872,7 +8903,7 @@ static void halveImage3D(int components, | |||
src+= groupSizeInBytes; | |||
} /* for jj */ | |||
/* skip past pad bytes, if any, to get to next row */ | |||
src+= padBytes; | |||
src+= rowPadBytes; | |||
/* src is at beginning of a row here, but it's the second row of | |||
* the square block of 4 pixels that we just worked on so we | |||
@@ -8887,6 +8918,9 @@ static void halveImage3D(int components, | |||
src+= rowSizeInBytes; | |||
} /* for ii */ | |||
/* skip past pad bytes, if any, to get to next image */ | |||
src+= imagePadBytes; | |||
src+= imageSizeInBytes; | |||
} /* for dd */ | |||
@@ -156,6 +156,13 @@ glutGetProcAddress( const char *name ) | |||
return glut_functions[i].address; | |||
} | |||
#if DIRECTFBGL_INTERFACE_VERSION >= 1 | |||
if (g_current) { | |||
void *address = NULL; | |||
g_current->gl->GetProcAddress( g_current->gl, name, &address ); | |||
return address; | |||
} | |||
#endif | |||
return NULL; | |||
} | |||
@@ -26,8 +26,9 @@ | |||
#include <directfb.h> | |||
#include <directfb_version.h> | |||
#include <directfbgl.h> | |||
#include "GL/glut.h" | |||
#include "GL/directfbgl.h" | |||
#define VERSION_CODE( M, m, r ) (((M) << 16) | ((m) << 8) | ((r))) |
@@ -24,6 +24,8 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <stdlib.h> | |||
#include <GL/glut.h> | |||
#include "internal.h" | |||
@@ -72,19 +74,16 @@ void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y)) | |||
void glutMouseFunc(void (*func)(int button, int state, int x, int y)) | |||
{ | |||
MouseEnabled = 1; | |||
MouseFunc = func; | |||
} | |||
void glutMotionFunc(void (*func)(int x, int y)) | |||
{ | |||
MouseEnabled = 1; | |||
MotionFunc = func; | |||
} | |||
void glutPassiveMotionFunc(void (*func)(int x, int y)) | |||
{ | |||
MouseEnabled = 1; | |||
PassiveMotionFunc = func; | |||
} | |||
@@ -24,6 +24,7 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <linux/fb.h> | |||
@@ -37,7 +38,7 @@ | |||
#define TORMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat)(REVERSECMAPSIZE-1)) | |||
#define FROMCMAP(x) (GLfloat)x / (GLfloat)((1<<16) - 1) | |||
static struct fb_cmap ColorMap; | |||
static struct fb_cmap ColorMap, OriginalColorMap; | |||
unsigned short RedColorMap[256], GreenColorMap[256], BlueColorMap[256]; | |||
@@ -91,12 +92,18 @@ static void FillReverseColorMap(void) | |||
void RestoreColorMap(void) | |||
{ | |||
if(FixedInfo.visual == FB_VISUAL_TRUECOLOR) | |||
return; | |||
if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &ColorMap) < 0) | |||
sprintf(exiterror, "ioctl(FBIOPUTCMAP) failed!\n"); | |||
} | |||
void LoadColorMap(void) | |||
{ | |||
if(FixedInfo.visual == FB_VISUAL_TRUECOLOR) | |||
return; | |||
ColorMap.start = 0; | |||
ColorMap.red = RedColorMap; | |||
ColorMap.green = GreenColorMap; |
@@ -28,8 +28,10 @@ | |||
to render the cursor, this is faster, it would be good to use a hardware | |||
cursor if it exists instead */ | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <inttypes.h> | |||
#include <string.h> | |||
#include <linux/fb.h> | |||
@@ -64,6 +66,9 @@ void EraseCursor(void) | |||
unsigned char *src = MouseBuffer; | |||
if(!MouseVisible || CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS) | |||
return; | |||
for(i = 0; i<CURSOR_HEIGHT; i++) { | |||
memcpy(BackBuffer + off, src, stride); | |||
src += stride; | |||
@@ -108,7 +113,7 @@ void DrawCursor(void) | |||
unsigned char *c; | |||
const unsigned char *d; | |||
if(CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS) | |||
if(!MouseVisible || CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS) | |||
return; | |||
px = MouseX - CursorsXOffset[CurrentCursor]; | |||
@@ -210,10 +215,12 @@ void SwapCursor(void) | |||
int miny = MIN(py, LastMouseY); | |||
int sizey = abs(py - LastMouseY); | |||
DrawCursor(); | |||
/* now update the portion of the screen that has changed */ | |||
if(MouseVisible) | |||
DrawCursor(); | |||
if(DisplayMode & GLUT_DOUBLE && (sizex || sizey)) { | |||
/* now update the portion of the screen that has changed, this is also | |||
used to hide the mouse if MouseVisible is 0 */ | |||
if(DisplayMode & GLUT_DOUBLE && ((sizex || sizey) || !MouseVisible)) { | |||
int off, stride, i; | |||
if(minx < 0) | |||
minx = 0; | |||
@@ -228,7 +235,7 @@ void SwapCursor(void) | |||
+ minx * VarInfo.bits_per_pixel / 8; | |||
stride = (sizex + CURSOR_WIDTH) * VarInfo.bits_per_pixel / 8; | |||
for(i = 0; i< sizey + CURSOR_HEIGHT; i++) { | |||
for(i = 0; i < sizey + CURSOR_HEIGHT; i++) { | |||
memcpy(FrameBuffer+off, BackBuffer+off, stride); | |||
off += FixedInfo.line_length; | |||
} | |||
@@ -258,11 +265,8 @@ void glutSetCursor(int cursor) | |||
if(cursor == GLUT_CURSOR_FULL_CROSSHAIR) | |||
cursor = GLUT_CURSOR_CROSSHAIR; | |||
if(CurrentCursor >= 0 && CurrentCursor < NUM_CURSORS) | |||
EraseCursor(); | |||
EraseCursor(); | |||
MouseVisible = 1; | |||
CurrentCursor = cursor; | |||
MouseEnabled = 1; | |||
SwapCursor(); | |||
} |
@@ -24,6 +24,8 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <stdio.h> | |||
#include <GL/gl.h> | |||
#include <GL/glut.h> | |||
@@ -74,6 +74,7 @@ int Redisplay; | |||
int Visible; | |||
int VisibleSwitch; | |||
int Active; | |||
static int Resized; | |||
/* we have to poll to see if we are visible | |||
on a framebuffer that is not active */ | |||
int VisiblePoll; | |||
@@ -127,8 +128,10 @@ static void Cleanup(void) | |||
fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", | |||
strerror(errno)); | |||
munmap(FrameBuffer, FixedInfo.smem_len); | |||
if(FrameBuffer) | |||
munmap(FrameBuffer, FixedInfo.smem_len); | |||
close(FrameBufferFD); | |||
} | |||
/* free allocated back buffer */ | |||
@@ -424,6 +427,8 @@ static void ProcessTimers(void) | |||
void glutMainLoop(void) | |||
{ | |||
int idleiters; | |||
if(ReshapeFunc) | |||
ReshapeFunc(VarInfo.xres, VarInfo.yres); | |||
@@ -440,8 +445,6 @@ void glutMainLoop(void) | |||
else | |||
if(VisiblePoll) | |||
TestVisible(); | |||
else | |||
usleep(1); | |||
if(IdleFunc) | |||
IdleFunc(); | |||
@@ -452,17 +455,48 @@ void glutMainLoop(void) | |||
VisibilityFunc(Visible ? GLUT_VISIBLE : GLUT_NOT_VISIBLE); | |||
} | |||
if(Resized) { | |||
SetVideoMode(); | |||
CreateBuffer(); | |||
if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) { | |||
sprintf(exiterror, "Failure to Make Current\n"); | |||
exit(0); | |||
} | |||
InitializeMenus(); | |||
if(ReshapeFunc) | |||
ReshapeFunc(VarInfo.xres, VarInfo.yres); | |||
Redisplay = 1; | |||
Resized = 0; | |||
} | |||
if(Visible && Redisplay) { | |||
Redisplay = 0; | |||
if(MouseEnabled) | |||
EraseCursor(); | |||
EraseCursor(); | |||
DisplayFunc(); | |||
if(!(DisplayMode & GLUT_DOUBLE)) { | |||
if(ActiveMenu) | |||
DrawMenus(); | |||
if(MouseEnabled) | |||
DrawCursor(); | |||
DrawCursor(); | |||
} | |||
idleiters = 0; | |||
} else { | |||
/* we sleep if not receiving redisplays, and | |||
the main loop is running faster than 2khz */ | |||
static int lasttime; | |||
int time = glutGet(GLUT_ELAPSED_TIME); | |||
if(time > lasttime) { | |||
if(idleiters >= 2) | |||
usleep(100); | |||
idleiters = 0; | |||
lasttime = time; | |||
} | |||
idleiters++; | |||
} | |||
} | |||
} | |||
@@ -536,17 +570,16 @@ int ParseFBModes(int minw, int maxw, int minh, int maxh, int minf, int maxf) | |||
return 0; | |||
} | |||
/* ---------- Window Management ----------*/ | |||
void SetVideoMode(void) | |||
{ | |||
/* set new variable screen info */ | |||
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) { | |||
sprintf(exiterror, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", | |||
strerror(errno)); | |||
sprintf(exiterror, "FBIOPUT_VSCREENINFO failed: %s\n", strerror(errno)); | |||
strcat(exiterror, "Perhaps the device does not support the selected mode\n"); | |||
exit(0); | |||
} | |||
/* reload the screen info to update offsets */ | |||
/* reload the screen info to update rgb bits */ | |||
if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &VarInfo)) { | |||
sprintf(exiterror, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", | |||
strerror(errno)); | |||
@@ -574,7 +607,7 @@ void SetVideoMode(void) | |||
LoadColorMap(); | |||
} | |||
void CreateBuffer() | |||
void CreateBuffer(void) | |||
{ | |||
int size = VarInfo.xres_virtual * VarInfo.yres_virtual | |||
* VarInfo.bits_per_pixel / 8; | |||
@@ -673,20 +706,6 @@ void CreateVisual(void) | |||
} | |||
} | |||
static void ResizeVisual(void) | |||
{ | |||
if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) { | |||
sprintf(exiterror, "Failure to Make Current\n"); | |||
exit(0); | |||
} | |||
InitializeMenus(); | |||
if(ReshapeFunc) | |||
ReshapeFunc(VarInfo.xres, VarInfo.yres); | |||
Redisplay = 1; | |||
} | |||
static void SignalWinch(int arg) | |||
{ | |||
/* we can't change bitdepth without destroying the visual */ | |||
@@ -708,10 +727,7 @@ static void SignalWinch(int arg) | |||
VarInfo.blue = blue; | |||
VarInfo.transp = transp; | |||
SetVideoMode(); | |||
CreateBuffer(); | |||
ResizeVisual(); | |||
Resized = 1; | |||
} | |||
int glutCreateWindow (const char *title) | |||
@@ -786,6 +802,7 @@ void glutDestroyWindow(int win) | |||
glFBDevDestroyContext(Context); | |||
glFBDevDestroyBuffer(Buffer); | |||
glFBDevDestroyVisual(Visual); | |||
Visual = NULL; | |||
} | |||
@@ -803,12 +820,14 @@ void glutSwapBuffers(void) | |||
{ | |||
glFlush(); | |||
if(!(DisplayMode & GLUT_DOUBLE)) | |||
return; | |||
if(ActiveMenu) | |||
DrawMenus(); | |||
if(MouseEnabled) | |||
DrawCursor(); | |||
DrawCursor(); | |||
if(DisplayMode & GLUT_DOUBLE && Visible) { | |||
if(Visible) { | |||
Swapping = 1; | |||
glFBDevSwapBuffers(Buffer); | |||
Swapping = 0; | |||
@@ -837,10 +856,8 @@ void glutReshapeWindow(int width, int height) | |||
signal(SIGWINCH, SIG_IGN); | |||
SetVideoMode(); | |||
CreateBuffer(); | |||
ResizeVisual(); | |||
signal(SIGWINCH, SignalWinch); | |||
Resized = 1; | |||
} | |||
void glutFullScreen(void) |
@@ -24,6 +24,7 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <string.h> | |||
@@ -53,7 +53,7 @@ | |||
int GpmMouse; | |||
#endif | |||
int CurrentVT; | |||
int CurrentVT = 0; | |||
int ConsoleFD = -1; | |||
int KeyboardModifiers; | |||
@@ -65,8 +65,8 @@ double MouseSpeed = 0; | |||
int KeyRepeatMode = GLUT_KEY_REPEAT_DEFAULT; | |||
/* only display the mouse if there is a registered callback for it */ | |||
int MouseEnabled = 0; | |||
int MouseVisible = 0; | |||
int LastMouseTime = 0; | |||
static int OldKDMode = -1; | |||
static int OldMode = KD_TEXT; | |||
@@ -79,6 +79,8 @@ static int MouseFD; | |||
static int kbdpipe[2]; | |||
static int LastStdinKeyTime, LastStdinSpecialKey = -1, LastStdinCode = -1; | |||
#define MODIFIER(mod) \ | |||
KeyboardModifiers = release ? KeyboardModifiers & ~mod \ | |||
: KeyboardModifiers | mod; | |||
@@ -93,7 +95,6 @@ static void KeyboardHandler(int sig) | |||
unsigned char code; | |||
while(read(ConsoleFD, &code, 1) == 1) { | |||
int release, labelval; | |||
struct kbentry entry; | |||
static int lalt; /* only left alt does vt switch */ | |||
@@ -163,10 +164,46 @@ static void LedModifier(int led, int release) | |||
KeyboardLedState ^= led; | |||
releaseflag &= ~led; | |||
} | |||
ioctl(ConsoleFD, KDSKBLED, KeyboardLedState); | |||
ioctl(ConsoleFD, KDSETLED, 0x80); | |||
} | |||
static void HandleKeyPress(unsigned char key, int up) | |||
{ | |||
if(up) { | |||
if(KeyboardUpFunc) | |||
KeyboardUpFunc(key, MouseX, MouseY); | |||
} else | |||
if(KeyboardFunc) | |||
KeyboardFunc(key, MouseX, MouseY); | |||
else | |||
if(key == 27) | |||
exit(0); /* no handler, to provide a way to exit */ | |||
} | |||
static void HandleSpecialPress(int key, int up) | |||
{ | |||
if(up) { | |||
if(SpecialUpFunc) | |||
SpecialUpFunc(key, MouseX, MouseY); | |||
} else | |||
if(SpecialFunc) | |||
SpecialFunc(key, MouseX, MouseY); | |||
} | |||
static void ReleaseStdinKey(void) | |||
{ | |||
if(LastStdinSpecialKey != -1) { | |||
HandleSpecialPress(LastStdinSpecialKey, 1); | |||
LastStdinSpecialKey = -1; | |||
} | |||
if(LastStdinCode != -1) { | |||
HandleKeyPress(LastStdinCode, 1); | |||
LastStdinCode = -1; | |||
} | |||
} | |||
#define READKEY read(kbdpipe[0], &code, 1) | |||
static int ReadKey(void) | |||
{ | |||
@@ -175,8 +212,14 @@ static int ReadKey(void) | |||
int specialkey = 0; | |||
struct kbentry entry; | |||
if(READKEY != 1) | |||
if(READKEY != 1) { | |||
/* if we are reading from stdin, we detect key releases when the key | |||
does not repeat after a given timeout */ | |||
if(ConsoleFD == 0 && LastStdinKeyTime + 100 < glutGet(GLUT_ELAPSED_TIME)) | |||
ReleaseStdinKey(); | |||
return 0; | |||
} | |||
if(code == 0) | |||
return 0; | |||
@@ -185,65 +228,82 @@ static int ReadKey(void) | |||
KeyboardModifiers = 0; | |||
altset: | |||
if(code == 27 && READKEY == 1) { | |||
switch(code) { | |||
case 79: /* function key */ | |||
READKEY; | |||
if(code == 50) { | |||
READKEY; | |||
shiftfunc: | |||
KeyboardModifiers |= GLUT_ACTIVE_SHIFT; | |||
specialkey = GLUT_KEY_F1 + code - 53; | |||
READKEY; | |||
} else { | |||
READKEY; | |||
specialkey = GLUT_KEY_F1 + code - 80; | |||
} | |||
break; | |||
case 91: | |||
READKEY; | |||
switch(code) { | |||
case 68: | |||
specialkey = GLUT_KEY_LEFT; break; | |||
case 65: | |||
specialkey = GLUT_KEY_UP; break; | |||
case 67: | |||
specialkey = GLUT_KEY_RIGHT; break; | |||
case 66: | |||
specialkey = GLUT_KEY_DOWN; break; | |||
case 53: | |||
specialkey = GLUT_KEY_PAGE_UP; READKEY; break; | |||
case 54: | |||
specialkey = GLUT_KEY_PAGE_DOWN; READKEY; break; | |||
case 49: | |||
specialkey = GLUT_KEY_HOME; READKEY; break; | |||
case 52: | |||
specialkey = GLUT_KEY_END; READKEY; break; | |||
case 50: | |||
READKEY; | |||
if(code != 126) | |||
goto shiftfunc; | |||
specialkey = GLUT_KEY_INSERT; | |||
break; | |||
case 51: | |||
code = '\b'; | |||
goto stdkey; | |||
case 91: | |||
READKEY; | |||
specialkey = GLUT_KEY_F1 + code - 65; | |||
break; | |||
default: | |||
return 0; | |||
} | |||
break; | |||
default: | |||
if(code != 91) { | |||
KeyboardModifiers |= GLUT_ACTIVE_ALT; | |||
goto altset; | |||
} | |||
READKEY; | |||
switch(code) { | |||
case 68: | |||
specialkey = GLUT_KEY_LEFT; break; | |||
case 65: | |||
specialkey = GLUT_KEY_UP; break; | |||
case 67: | |||
specialkey = GLUT_KEY_RIGHT; break; | |||
case 66: | |||
specialkey = GLUT_KEY_DOWN; break; | |||
case 52: | |||
specialkey = GLUT_KEY_END; READKEY; break; | |||
case 53: | |||
specialkey = GLUT_KEY_PAGE_UP; READKEY; break; | |||
case 54: | |||
specialkey = GLUT_KEY_PAGE_DOWN; READKEY; break; | |||
case 49: | |||
READKEY; | |||
if(code == 126) | |||
specialkey = GLUT_KEY_HOME; | |||
else { | |||
specialkey = GLUT_KEY_F1 + code - 50; | |||
READKEY; | |||
} | |||
break; | |||
case 50: | |||
READKEY; | |||
if(code == 126) | |||
specialkey = GLUT_KEY_INSERT; | |||
else { | |||
if(code > '1') | |||
code--; | |||
if(code > '6') | |||
code--; | |||
if(code > '3') { | |||
KeyboardModifiers |= GLUT_ACTIVE_SHIFT; | |||
code -= 12; | |||
} | |||
specialkey = GLUT_KEY_F1 + code - 40; | |||
READKEY; | |||
} | |||
break; | |||
case 51: | |||
READKEY; | |||
if(code == 126) { | |||
code = '\b'; | |||
goto stdkey; | |||
} | |||
KeyboardModifiers |= GLUT_ACTIVE_SHIFT; | |||
specialkey = GLUT_KEY_F1 + code - 45; | |||
READKEY; | |||
break; | |||
case 91: | |||
READKEY; | |||
specialkey = GLUT_KEY_F1 + code - 65; | |||
break; | |||
default: | |||
return 0; | |||
} | |||
} | |||
if(specialkey) { | |||
if(SpecialFunc) | |||
SpecialFunc(specialkey, MouseX, MouseY); | |||
LastStdinKeyTime = glutGet(GLUT_ELAPSED_TIME); | |||
if(LastStdinSpecialKey != specialkey) { | |||
ReleaseStdinKey(); | |||
HandleSpecialPress(specialkey, 0); | |||
LastStdinSpecialKey = specialkey; | |||
LastStdinKeyTime += 200; /* initial repeat */ | |||
} else | |||
if(KeyRepeatMode != GLUT_KEY_REPEAT_OFF) | |||
HandleSpecialPress(specialkey, 0); | |||
} else { | |||
if(code >= 1 && code <= 26 && code != '\r') { | |||
KeyboardModifiers |= GLUT_ACTIVE_CTRL; | |||
@@ -255,8 +315,15 @@ static int ReadKey(void) | |||
KeyboardModifiers |= GLUT_ACTIVE_SHIFT; | |||
stdkey: | |||
if(KeyboardFunc) | |||
KeyboardFunc(code, MouseX, MouseY); | |||
LastStdinKeyTime = glutGet(GLUT_ELAPSED_TIME); | |||
if(LastStdinCode != code) { | |||
ReleaseStdinKey(); | |||
HandleKeyPress(code, 0); | |||
LastStdinCode = code; | |||
LastStdinKeyTime += 200; /* initial repeat */ | |||
} else | |||
if(KeyRepeatMode != GLUT_KEY_REPEAT_OFF) | |||
HandleSpecialPress(code, 0); | |||
} | |||
return 1; | |||
} | |||
@@ -342,19 +409,17 @@ static int ReadKey(void) | |||
labelval = '\b'; | |||
break; | |||
case K_ENTER: | |||
case K_ENTER - 1: /* keypad enter */ | |||
labelval = '\r'; break; | |||
} | |||
/* likely a keypad input, but depends on keyboard mapping, ignore */ | |||
if(labelval == 512) | |||
return 1; | |||
/* dispatch callback */ | |||
if(specialkey) { | |||
if(release) { | |||
if(SpecialUpFunc) | |||
SpecialUpFunc(specialkey, MouseX, MouseY); | |||
} else | |||
if(SpecialFunc) | |||
SpecialFunc(specialkey, MouseX, MouseY); | |||
} else { | |||
if(specialkey) | |||
HandleSpecialPress(specialkey, release); | |||
else { | |||
char c = labelval; | |||
if(KeyboardLedState & LED_CAP) { | |||
@@ -364,12 +429,7 @@ static int ReadKey(void) | |||
if(c >= 'a' && c <= 'z') | |||
c += 'A' - 'a'; | |||
} | |||
if(release) { | |||
if(KeyboardUpFunc) | |||
KeyboardUpFunc(c, MouseX, MouseY); | |||
} else | |||
if(KeyboardFunc) | |||
KeyboardFunc(c, MouseX, MouseY); | |||
HandleKeyPress(c, release); | |||
} | |||
return 1; | |||
} | |||
@@ -432,28 +492,22 @@ static int ReadMouse(void) | |||
dy = event.dy; | |||
} else | |||
#endif | |||
{ | |||
char data[4]; | |||
if(MouseFD == -1) | |||
return 0; | |||
{ | |||
char data[4]; | |||
if(fcntl(MouseFD, F_SETFL, O_NONBLOCK) == -1) { | |||
close(MouseFD); | |||
MouseFD = -1; | |||
return 0; | |||
} | |||
if(MouseFD == -1) | |||
return 0; | |||
if(read(MouseFD, data, 4) != 4) | |||
return 0; | |||
if(read(MouseFD, data, 4) != 4) | |||
return 0; | |||
l = ((data[0] & 0x20) >> 3); | |||
m = ((data[3] & 0x10) >> 3); | |||
r = ((data[0] & 0x10) >> 4); | |||
l = ((data[0] & 0x20) >> 3); | |||
m = ((data[3] & 0x10) >> 3); | |||
r = ((data[0] & 0x10) >> 4); | |||
dx = (((data[0] & 0x03) << 6) | (data[1] & 0x3F)); | |||
dy = (((data[0] & 0x0C) << 4) | (data[2] & 0x3F)); | |||
} | |||
dx = (((data[0] & 0x03) << 6) | (data[1] & 0x3F)); | |||
dy = (((data[0] & 0x0C) << 4) | (data[2] & 0x3F)); | |||
} | |||
MouseX += dx * MouseSpeed; | |||
if(MouseX < 0) | |||
@@ -478,7 +532,7 @@ static int ReadMouse(void) | |||
ll = l, lm = m, lr = r; | |||
if(dx || dy) { | |||
if(dx || dy || !MouseVisible) { | |||
if(l || m || r) { | |||
if(MotionFunc) | |||
MotionFunc(MouseX, MouseY); | |||
@@ -488,12 +542,16 @@ static int ReadMouse(void) | |||
EraseCursor(); | |||
MouseVisible = 1; | |||
if(ActiveMenu) | |||
Redisplay = 1; | |||
else | |||
SwapCursor(); | |||
} | |||
LastMouseTime = glutGet(GLUT_ELAPSED_TIME); | |||
return 1; | |||
} | |||
@@ -502,8 +560,14 @@ void ReceiveInput(void) | |||
if(ConsoleFD != -1) | |||
while(ReadKey()); | |||
if(MouseEnabled) | |||
while(ReadMouse()); | |||
while(ReadMouse()); | |||
/* implement a 2 second timeout on the mouse */ | |||
if(MouseVisible && glutGet(GLUT_ELAPSED_TIME) - LastMouseTime > 2000) { | |||
EraseCursor(); | |||
MouseVisible = 0; | |||
SwapCursor(); | |||
} | |||
} | |||
static void VTSwitchHandler(int sig) | |||
@@ -526,9 +590,6 @@ static void VTSwitchHandler(int sig) | |||
if(st.v_active) | |||
ioctl(ConsoleFD, VT_RELDISP, VT_ACKACQ); | |||
/* this is a hack to turn the cursor off */ | |||
ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo); | |||
RestoreColorMap(); | |||
Active = 1; | |||
@@ -536,7 +597,6 @@ static void VTSwitchHandler(int sig) | |||
VisibleSwitch = 1; | |||
Redisplay = 1; | |||
break; | |||
} | |||
} | |||
@@ -549,37 +609,11 @@ void InitializeVT(int usestdin) | |||
signal(SIGIO, SIG_IGN); | |||
/* save old terminos settings */ | |||
if (tcgetattr(0, &OldTermios) < 0) { | |||
sprintf(exiterror, "tcgetattr failed\n"); | |||
exit(0); | |||
} | |||
tio = OldTermios; | |||
/* terminos settings for straight-through mode */ | |||
tio.c_lflag &= ~(ICANON | ECHO | ISIG); | |||
tio.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON); | |||
tio.c_iflag |= IGNBRK; | |||
tio.c_cc[VMIN] = 0; | |||
tio.c_cc[VTIME] = 0; | |||
if (tcsetattr(0, TCSANOW, &tio) < 0) { | |||
sprintf(exiterror, "tcsetattr failed\n"); | |||
exit(0); | |||
} | |||
if(fcntl(0, F_SETFL, O_NONBLOCK | O_ASYNC) < 0) { | |||
sprintf(exiterror, "Failed to set keyboard to non-blocking\n"); | |||
exit(0); | |||
} | |||
Active = 1; | |||
if(usestdin) { | |||
ConsoleFD = 0; | |||
return; | |||
goto setattribs; | |||
} | |||
/* detect the current vt if it was not specified */ | |||
@@ -590,15 +624,16 @@ void InitializeVT(int usestdin) | |||
sprintf(exiterror, "Failed to open /dev/tty\n"); | |||
exit(0); | |||
} | |||
if(ioctl(fd, VT_GETSTATE, &st) == -1) { | |||
fprintf(stderr, "Could not detect current vt, specify with -vt\n"); | |||
fprintf(stderr, "Defaulting to stdin input\n"); | |||
ConsoleFD = 0; | |||
close(fd); | |||
return; | |||
} else | |||
CurrentVT = st.v_active; | |||
goto setattribs; | |||
} | |||
CurrentVT = st.v_active; | |||
close(fd); | |||
} | |||
@@ -613,7 +648,7 @@ void InitializeVT(int usestdin) | |||
sprintf(exiterror, "error couldn't open %s," | |||
" defaulting to stdin \n", console); | |||
ConsoleFD = 0; | |||
return; | |||
goto setattribs; | |||
} | |||
signal(SIGUSR1, VTSwitchHandler); | |||
@@ -623,7 +658,7 @@ void InitializeVT(int usestdin) | |||
sprintf(exiterror,"Failed to grab %s, defaulting to stdin\n", console); | |||
close(ConsoleFD); | |||
ConsoleFD = 0; | |||
return; | |||
goto setattribs; | |||
} | |||
vt = OldVTMode; | |||
@@ -655,7 +690,7 @@ void InitializeVT(int usestdin) | |||
exit(0); | |||
} | |||
fcntl(0, F_SETOWN, getpid()); | |||
fcntl(ConsoleFD, F_SETOWN, getpid()); | |||
if(ioctl(ConsoleFD, KDGETMODE, &OldMode) < 0) | |||
sprintf(exiterror, "Warning: Failed to get terminal mode\n"); | |||
@@ -668,7 +703,6 @@ void InitializeVT(int usestdin) | |||
if(ioctl(ConsoleFD, KDSKBMODE, K_MEDIUMRAW) < 0) { | |||
sprintf(exiterror, "ioctl KDSKBMODE failed!\n"); | |||
tcsetattr(0, TCSANOW, &OldTermios); | |||
exit(0); | |||
} | |||
@@ -676,6 +710,34 @@ void InitializeVT(int usestdin) | |||
sprintf(exiterror, "ioctl KDGKBLED failed!\n"); | |||
exit(0); | |||
} | |||
setattribs: | |||
/* enable async input input */ | |||
if(fcntl(ConsoleFD, F_SETFL, O_ASYNC) < 0) { | |||
sprintf(exiterror, "Failed to set O_ASYNC mode on fd %d\n", ConsoleFD); | |||
exit(0); | |||
} | |||
/* save old terminos settings */ | |||
if (tcgetattr(ConsoleFD, &OldTermios) < 0) { | |||
sprintf(exiterror, "tcgetattr failed\n"); | |||
exit(0); | |||
} | |||
tio = OldTermios; | |||
/* terminos settings for straight-through mode */ | |||
tio.c_lflag &= ~(ICANON | ECHO | ISIG); | |||
tio.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON); | |||
tio.c_iflag |= IGNBRK; | |||
tio.c_cc[VMIN] = 0; | |||
tio.c_cc[VTIME] = 0; | |||
if (tcsetattr(ConsoleFD, TCSANOW, &tio) < 0) { | |||
sprintf(exiterror, "tcsetattr failed\n"); | |||
exit(0); | |||
} | |||
} | |||
void RestoreVT(void) | |||
@@ -683,13 +745,13 @@ void RestoreVT(void) | |||
if(ConsoleFD < 0) | |||
return; | |||
if (tcsetattr(0, TCSANOW, &OldTermios) < 0) | |||
fprintf(stderr, "tcsetattr failed\n"); | |||
if (tcsetattr(ConsoleFD, TCSANOW, &OldTermios) < 0) | |||
sprintf(exiterror, "tcsetattr failed\n"); | |||
/* setting the mode to text from graphics restores the colormap*/ | |||
/* setting the mode to text from graphics restores the colormap */ | |||
if( | |||
#ifdef HAVE_GPM | |||
GpmMouse || | |||
!GpmMouse || | |||
#endif | |||
ConsoleFD == 0) | |||
if(ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) | |||
@@ -725,11 +787,11 @@ void InitializeMouse(void) | |||
const char *mousedev = getenv("MOUSE"); | |||
if(!mousedev) | |||
mousedev = MOUSEDEV; | |||
if((MouseFD = open(mousedev, O_RDONLY)) >= 0) { | |||
if(!MouseSpeed) | |||
MouseSpeed = 1; | |||
NumMouseButtons = 3; | |||
return; | |||
if((MouseFD = open(mousedev, O_RDONLY | O_NONBLOCK)) >= 0) { | |||
if(!MouseSpeed) | |||
MouseSpeed = 1; | |||
NumMouseButtons = 3; | |||
return; | |||
} | |||
} | |||
#ifdef HAVE_GPM |
@@ -51,6 +51,8 @@ extern int Swapping, VTSwitch; | |||
void TestVisible(void); | |||
int ParseFBModes(int, int, int, int, int, int); | |||
void SetVideoMode(void); | |||
void CreateBuffer(void); | |||
void CreateVisual(void); | |||
extern int FrameBufferFD; | |||
@@ -72,20 +74,20 @@ extern GLFBDevVisualPtr Visual; | |||
#define REVERSECMAPSIZE (1<<REVERSECMAPSIZELOG) | |||
extern unsigned short RedColorMap[256], | |||
GreenColorMap[256], | |||
BlueColorMap[256]; | |||
GreenColorMap[256], | |||
BlueColorMap[256]; | |||
extern unsigned char ReverseColorMap[REVERSECMAPSIZE] | |||
[REVERSECMAPSIZE] | |||
[REVERSECMAPSIZE]; | |||
void LoadOldColorMap(void); | |||
void LoadColorMap(void); | |||
void UnloadColorMap(void); | |||
void RestoreColorMap(void); | |||
/* --- mouse --- */ | |||
extern int MouseX, MouseY; | |||
extern int CurrentCursor; | |||
extern int MouseEnabled; | |||
extern int MouseVisible; | |||
extern int LastMouseTime; | |||
extern int NumMouseButtons; | |||
void InitializeCursor(void); |
@@ -25,6 +25,8 @@ | |||
*/ | |||
#include <stdlib.h> | |||
#include <stdio.h> | |||
#include <string.h> | |||
#include <linux/fb.h> | |||
@@ -69,6 +71,7 @@ void FreeMenus(void) | |||
free(Menus[i].Items[j].name); | |||
free(Menus[i].Items); | |||
} | |||
free(Menus); | |||
} | |||
@@ -204,7 +207,6 @@ void CloseMenu(void) | |||
int glutCreateMenu(void (*func)(int value)) | |||
{ | |||
MouseEnabled = 1; | |||
CurrentMenu = NumMenus; | |||
NumMenus++; | |||
Menus = realloc(Menus, sizeof(*Menus) * NumMenus); |
@@ -24,6 +24,7 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <stdlib.h> | |||
#include <GL/gl.h> | |||
void glutEstablishOverlay(void) |
@@ -24,6 +24,7 @@ | |||
* Written by Sean D'Epagnier (c) 2006 | |||
*/ | |||
#include <string.h> | |||
#include <sys/time.h> | |||
#include <linux/fb.h> |
@@ -2310,7 +2310,9 @@ __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn, | |||
GLXDrawable drawable = (GLXDrawable) draw; | |||
drm_clip_rect_t * cliprect; | |||
Display* display = (Display*)dpy; | |||
__DRIscreenPrivate *psp = display->driScreen.private; | |||
__DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; | |||
__DRIdrawablePrivate *pdp = pcp->driDrawablePriv; | |||
if (drawable == 0) { | |||
return GL_FALSE; | |||
} | |||
@@ -2325,6 +2327,7 @@ __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn, | |||
*index = display->clientID; | |||
*stamp = pcp->driScreenPriv->pSAREA->drawableTable[display->clientID].stamp; | |||
drmUpdateDrawableInfo(psp->fd, pdp->hHWDrawable, DRM_DRAWABLE_CLIPRECTS, 1, cliprect); | |||
*x = drawable->x; | |||
*y = drawable->y; | |||
*width = drawable->w; | |||
@@ -2352,14 +2355,23 @@ static GLboolean | |||
xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable, | |||
drm_drawable_t *hHWDrawable ) | |||
{ | |||
return GL_TRUE; | |||
Display *display = (Display *)dpy; | |||
__DRIscreenPrivate *psp = display->driScreen.private; | |||
int ret; | |||
ret = drmCreateDrawable(psp->fd, hHWDrawable); | |||
fprintf(stderr, "drawable is %d %08X ret is %d\n", *hHWDrawable, drawable, -ret); | |||
if (ret != 0) | |||
return GL_FALSE; | |||
return GL_TRUE; | |||
} | |||
static GLboolean | |||
xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable) | |||
{ | |||
return GL_TRUE; | |||
return GL_TRUE; | |||
} | |||
@@ -0,0 +1 @@ | |||
glcontextmodes.c |
@@ -203,7 +203,7 @@ PUBLIC Bool XF86DRIOpenConnection(dpy, screen, hSAREA, busIdString) | |||
*hSAREA = rep.hSAREALow; | |||
if (sizeof(drm_handle_t) == 8) { | |||
const int shift = 32; /* var to prevent warning on next line */ | |||
int shift = 32; /* var to prevent warning on next line */ | |||
*hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << shift; | |||
} | |||
@@ -566,7 +566,7 @@ PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer, | |||
*hFrameBuffer = rep.hFrameBufferLow; | |||
if (sizeof(drm_handle_t) == 8) { | |||
const int shift = 32; /* var to prevent warning on next line */ | |||
int shift = 32; /* var to prevent warning on next line */ | |||
*hFrameBuffer |= ((drm_handle_t) rep.hFrameBufferHigh) << shift; | |||
} | |||
@@ -2883,8 +2883,9 @@ int __glXGetInternalVersion(void) | |||
* 20050727 - Gut all the old interfaces. This breaks compatability with | |||
* any DRI driver built to any previous version. | |||
* 20060314 - Added support for GLX_MESA_copy_sub_buffer. | |||
* 20070105 - Added support for damage reporting. | |||
*/ | |||
return 20060314; | |||
return 20070105; | |||
} | |||
@@ -48,6 +48,8 @@ | |||
#include <stdio.h> | |||
#include <X11/extensions/Xext.h> | |||
#include <X11/extensions/extutil.h> | |||
#include <X11/extensions/Xfixes.h> | |||
#include <X11/extensions/Xdamage.h> | |||
#include <assert.h> | |||
#include "indirect_init.h" | |||
#include "glapi.h" | |||
@@ -698,6 +700,68 @@ static __DRIfuncPtr get_proc_address( const char * proc_name ) | |||
return NULL; | |||
} | |||
#ifdef XDAMAGE_1_1_INTERFACE | |||
static GLboolean has_damage_post(__DRInativeDisplay *dpy) | |||
{ | |||
static GLboolean inited = GL_FALSE; | |||
static GLboolean has_damage; | |||
if (!inited) { | |||
int major, minor; | |||
if (XDamageQueryVersion(dpy, &major, &minor) && | |||
major == 1 && minor >= 1) | |||
{ | |||
has_damage = GL_TRUE; | |||
} else { | |||
has_damage = GL_FALSE; | |||
} | |||
inited = GL_TRUE; | |||
} | |||
return has_damage; | |||
} | |||
#endif /* XDAMAGE_1_1_INTERFACE */ | |||
static void __glXReportDamage(__DRInativeDisplay *dpy, int screen, | |||
__DRIid drawable, | |||
int x, int y, | |||
drm_clip_rect_t *rects, int num_rects, | |||
GLboolean front_buffer) | |||
{ | |||
#ifdef XDAMAGE_1_1_INTERFACE | |||
XRectangle *xrects; | |||
XserverRegion region; | |||
int i; | |||
int x_off, y_off; | |||
if (!has_damage_post(dpy)) | |||
return; | |||
if (front_buffer) { | |||
x_off = x; | |||
y_off = y; | |||
drawable = RootWindow(dpy, screen); | |||
} else{ | |||
x_off = 0; | |||
y_off = 0; | |||
} | |||
xrects = malloc(sizeof(XRectangle) * num_rects); | |||
if (xrects == NULL) | |||
return; | |||
for (i = 0; i < num_rects; i++) { | |||
xrects[i].x = rects[i].x1 + x_off; | |||
xrects[i].y = rects[i].y1 + y_off; | |||
xrects[i].width = rects[i].x2 - rects[i].x1; | |||
xrects[i].height = rects[i].y2 - rects[i].y1; | |||
} | |||
region = XFixesCreateRegion(dpy, xrects, num_rects); | |||
XDamageAdd(dpy, drawable, region); | |||
XFixesDestroyRegion(dpy, region); | |||
#endif | |||
} | |||
/** | |||
* Table of functions exported by the loader to the driver. | |||
@@ -720,70 +784,10 @@ static const __DRIinterfaceMethods interface_methods = { | |||
__glXGetUST, | |||
__glXGetMscRateOML, | |||
}; | |||
#define DRM_MAX_FDS 16 | |||
static struct { | |||
char *BusID; | |||
int fd; | |||
int refcount; | |||
} connection[DRM_MAX_FDS]; | |||
static int nr_fds = 0; | |||
int drmOpenOnce(void *unused, | |||
const char *BusID, | |||
int *newlyopened) | |||
{ | |||
int i; | |||
int fd; | |||
for (i = 0; i < nr_fds; i++) | |||
if (strcmp(BusID, connection[i].BusID) == 0) { | |||
connection[i].refcount++; | |||
*newlyopened = 0; | |||
return connection[i].fd; | |||
} | |||
fd = drmOpen(unused, BusID); | |||
if (fd <= 0 || nr_fds == DRM_MAX_FDS) | |||
return fd; | |||
connection[nr_fds].BusID = strdup(BusID); | |||
connection[nr_fds].fd = fd; | |||
connection[nr_fds].refcount = 1; | |||
*newlyopened = 1; | |||
if (0) | |||
fprintf(stderr, "saved connection %d for %s %d\n", | |||
nr_fds, connection[nr_fds].BusID, | |||
strcmp(BusID, connection[nr_fds].BusID)); | |||
nr_fds++; | |||
return fd; | |||
} | |||
__glXReportDamage, | |||
}; | |||
void drmCloseOnce(int fd) | |||
{ | |||
int i; | |||
for (i = 0; i < nr_fds; i++) { | |||
if (fd == connection[i].fd) { | |||
if (--connection[i].refcount == 0) { | |||
drmClose(connection[i].fd); | |||
free(connection[i].BusID); | |||
if (i < --nr_fds) | |||
connection[i] = connection[nr_fds]; | |||
return; | |||
} | |||
} | |||
} | |||
} | |||
/** |
@@ -31,8 +31,8 @@ | |||
#include "glxclient.h" | |||
#include "indirect_size.h" | |||
#include "dispatch.h" | |||
#include "glthread.h" | |||
#include "glapi.h" | |||
#include "glthread.h" | |||
#include <GL/glxproto.h> | |||
#ifdef USE_XCB | |||
#include <X11/Xlib-xcb.h> |
@@ -123,10 +123,8 @@ __glXInitVertexArrayState( __GLXcontext * gc ) | |||
struct array_state_vector * arrays; | |||
unsigned array_count; | |||
unsigned texture_units = 1; | |||
unsigned i; | |||
unsigned j; | |||
unsigned vertex_program_attribs = 0; | |||
int texture_units = 1, vertex_program_attribs = 0; | |||
unsigned i, j; | |||
GLboolean got_fog = GL_FALSE; | |||
GLboolean got_secondary_color = GL_FALSE; | |||
@@ -529,7 +527,7 @@ static GLubyte * | |||
emit_DrawArrays_header_old( __GLXcontext * gc, | |||
struct array_state_vector * arrays, | |||
size_t * elements_per_request, | |||
unsigned int * total_requests, | |||
size_t * total_requests, | |||
GLenum mode, GLsizei count ) | |||
{ | |||
size_t command_size; | |||
@@ -642,7 +640,7 @@ emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count ) | |||
GLubyte * pc; | |||
size_t elements_per_request; | |||
unsigned total_requests = 0; | |||
size_t total_requests = 0; | |||
unsigned i; | |||
size_t total_sent = 0; | |||
@@ -772,7 +770,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type, | |||
GLubyte * pc; | |||
size_t elements_per_request; | |||
unsigned total_requests = 0; | |||
size_t total_requests = 0; | |||
unsigned i; | |||
unsigned req; | |||
@@ -0,0 +1,2 @@ | |||
*/gen_matypes | |||
*/matypes.h |
@@ -33,8 +33,8 @@ default: | |||
$(MAKE) beos ; \ | |||
elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \ | |||
$(MAKE) directfb ; \ | |||
elif [ "$(DRIVER_DIRS)" = "fbdev" ]; then \ | |||
$(MAKE) fbdev ; \ | |||
elif [ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \ | |||
$(MAKE) fbdev ; $(MAKE) osmesa-only ; \ | |||
else \ | |||
$(MAKE) stand-alone ; \ | |||
fi |
@@ -0,0 +1,7 @@ | |||
MESA_ARRAY_CACHE_SOURCES = \ | |||
ac_context.c \ | |||
ac_import.c | |||
MESA_ARRAY_CACHE_HEADERS = \ | |||
ac_context.h \ | |||
acache.h |
@@ -25,24 +25,16 @@ | |||
#include <pthread.h> | |||
#include <direct/messages.h> | |||
#include <direct/interface.h> | |||
#include <direct/mem.h> | |||
#include <directfb.h> | |||
#include <directfb_version.h> | |||
#define VERSION_CODE( M, m, r ) (((M) * 1000) + ((m) * 100) + ((r))) | |||
#define DIRECTFB_VERSION_CODE VERSION_CODE( DIRECTFB_MAJOR_VERSION, \ | |||
DIRECTFB_MINOR_VERSION, \ | |||
DIRECTFB_MICRO_VERSION ) | |||
#include <directfbgl.h> | |||
#include <direct/mem.h> | |||
#include <direct/messages.h> | |||
#include <direct/interface.h> | |||
#ifdef CLAMP | |||
# undef CLAMP | |||
#endif | |||
#include "GL/directfbgl.h" | |||
#undef CLAMP | |||
#include "glheader.h" | |||
#include "buffers.h" | |||
#include "context.h" | |||
@@ -62,6 +54,12 @@ | |||
#include "drivers/common/driverfuncs.h" | |||
#define VERSION_CODE( M, m, r ) (((M) * 1000) + ((m) * 100) + ((r))) | |||
#define DIRECTFB_VERSION_CODE VERSION_CODE( DIRECTFB_MAJOR_VERSION, \ | |||
DIRECTFB_MINOR_VERSION, \ | |||
DIRECTFB_MICRO_VERSION ) | |||
static DFBResult | |||
Probe( void *data ); | |||
@@ -79,7 +77,7 @@ DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL, Mesa ) | |||
typedef struct { | |||
int ref; /* reference counter */ | |||
DFBBoolean locked; | |||
int locked; | |||
IDirectFBSurface *surface; | |||
DFBSurfacePixelFormat format; | |||
@@ -87,8 +85,8 @@ typedef struct { | |||
int height; | |||
struct { | |||
__u8 *start; | |||
__u8 *end; | |||
GLubyte *start; | |||
GLubyte *end; | |||
int pitch; | |||
} video; | |||
@@ -185,12 +183,14 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) | |||
IDirectFBSurface *surface; | |||
int width = 0; | |||
int height = 0; | |||
DFBResult err; | |||
DFBResult ret; | |||
DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); | |||
if (data->locked) | |||
return DFB_LOCKED; | |||
if (data->locked) { | |||
data->locked++; | |||
return DFB_OK; | |||
} | |||
if (directfbgl_lock()) | |||
return DFB_LOCKED; | |||
@@ -198,11 +198,12 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) | |||
surface = data->surface; | |||
surface->GetSize( surface, &width, &height ); | |||
err = surface->Lock( surface, DSLF_READ | DSLF_WRITE, | |||
ret = surface->Lock( surface, DSLF_READ | DSLF_WRITE, | |||
(void*)&data->video.start, &data->video.pitch ); | |||
if (err != DFB_OK) { | |||
if (ret) { | |||
D_ERROR( "DirectFBGL/Mesa: couldn't lock surface.\n" ); | |||
return err; | |||
directfbgl_unlock(); | |||
return ret; | |||
} | |||
data->video.end = data->video.start + (height-1) * data->video.pitch; | |||
@@ -212,13 +213,13 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) | |||
&data->framebuffer, &data->framebuffer ); | |||
if (data->width != width || data->height != height) { | |||
_mesa_resize_framebuffer( &data->context, | |||
&data->framebuffer, width, height ); | |||
data->width = width; | |||
data->height = height; | |||
_mesa_resize_framebuffer(&data->context, | |||
&data->framebuffer, width, height); | |||
data->height = height; | |||
} | |||
data->locked = DFB_TRUE; | |||
data->locked++; | |||
return DFB_OK; | |||
} | |||
@@ -230,14 +231,14 @@ IDirectFBGL_Mesa_Unlock( IDirectFBGL *thiz ) | |||
if (!data->locked) | |||
return DFB_OK; | |||
_mesa_make_current( NULL, NULL, NULL ); | |||
if (--data->locked == 0) { | |||
_mesa_make_current( NULL, NULL, NULL ); | |||
data->surface->Unlock( data->surface ); | |||
directfbgl_unlock(); | |||
data->surface->Unlock( data->surface ); | |||
data->locked = DFB_FALSE; | |||
directfbgl_unlock(); | |||
} | |||
return DFB_OK; | |||
} | |||
@@ -270,12 +271,32 @@ IDirectFBGL_Mesa_GetAttributes( IDirectFBGL *thiz, | |||
attributes->accum_green_size = visual->accumGreenBits; | |||
attributes->accum_blue_size = visual->accumBlueBits; | |||
attributes->accum_alpha_size = visual->accumAlphaBits; | |||
attributes->double_buffer = (caps & DSCAPS_FLIPPING) ? 1 : 0; | |||
attributes->double_buffer = ((caps & DSCAPS_FLIPPING) != 0); | |||
attributes->stereo = (visual->stereoMode != 0); | |||
return DFB_OK; | |||
} | |||
#if DIRECTFBGL_INTERFACE_VERSION >= 1 | |||
static DFBResult | |||
IDirectFBGL_Mesa_GetProcAddress( IDirectFBGL *thiz, | |||
const char *name, | |||
void **ret_address ) | |||
{ | |||
DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); | |||
if (!name) | |||
return DFB_INVARG; | |||
if (!ret_address) | |||
return DFB_INVARG; | |||
*ret_address = _glapi_get_proc_address( name ); | |||
return (*ret_address) ? DFB_OK : DFB_UNSUPPORTED; | |||
} | |||
#endif | |||
/* exported symbols */ | |||
@@ -288,6 +309,8 @@ Probe( void *data ) | |||
static DFBResult | |||
Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) | |||
{ | |||
DFBResult ret; | |||
/* Initialize global resources. */ | |||
if (directfbgl_init()) | |||
return DFB_INIT; | |||
@@ -296,12 +319,17 @@ Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) | |||
DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL ); | |||
/* Initialize interface data. */ | |||
data->ref = 1; | |||
data->surface = surface; | |||
data->ref = 1; | |||
surface->AddRef( surface ); | |||
surface->GetPixelFormat( surface, &data->format ); | |||
surface->GetSize( surface, &data->width, &data->height ); | |||
/* Duplicate destination surface. */ | |||
ret = surface->GetSubSurface( surface, NULL, &data->surface ); | |||
if (ret) { | |||
IDirectFBGL_Mesa_Destruct( thiz ); | |||
return ret; | |||
} | |||
data->surface->GetPixelFormat( data->surface, &data->format ); | |||
data->surface->GetSize( data->surface, &data->width, &data->height ); | |||
/* Configure visual. */ | |||
if (!directfbgl_init_visual( &data->visual, data->format )) { | |||
@@ -319,11 +347,14 @@ Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) | |||
} | |||
/* Assign interface pointers. */ | |||
thiz->AddRef = IDirectFBGL_Mesa_AddRef; | |||
thiz->Release = IDirectFBGL_Mesa_Release; | |||
thiz->Lock = IDirectFBGL_Mesa_Lock; | |||
thiz->Unlock = IDirectFBGL_Mesa_Unlock; | |||
thiz->GetAttributes = IDirectFBGL_Mesa_GetAttributes; | |||
thiz->AddRef = IDirectFBGL_Mesa_AddRef; | |||
thiz->Release = IDirectFBGL_Mesa_Release; | |||
thiz->Lock = IDirectFBGL_Mesa_Lock; | |||
thiz->Unlock = IDirectFBGL_Mesa_Unlock; | |||
thiz->GetAttributes = IDirectFBGL_Mesa_GetAttributes; | |||
#if DIRECTFBGL_INTERFACE_VERSION >= 1 | |||
thiz->GetProcAddress = IDirectFBGL_Mesa_GetProcAddress; | |||
#endif | |||
return DFB_OK; | |||
} | |||
@@ -363,71 +394,54 @@ dfbGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) | |||
static void | |||
dfbSetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) | |||
{ | |||
GLuint newWidth, newHeight; | |||
GLframebuffer *buffer = ctx->WinSysDrawBuffer; | |||
dfbGetBufferSize( buffer, &newWidth, &newHeight ); | |||
if (buffer->Width != newWidth || buffer->Height != newHeight) { | |||
_mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight ); | |||
} | |||
/* Nothing to do (the surface can't be resized while it's locked). */ | |||
return; | |||
} | |||
static void | |||
dfbClear( GLcontext *ctx, GLbitfield mask ) | |||
{ | |||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; | |||
int x = ctx->DrawBuffer->_Xmin; | |||
int y = ctx->DrawBuffer->_Ymin; | |||
int width = ctx->DrawBuffer->_Xmax - x; | |||
int height = ctx->DrawBuffer->_Ymax - y; | |||
GLboolean all = (width == ctx->DrawBuffer->Width && height == ctx->DrawBuffer->height) | |||
if (mask & BUFFER_BIT_FRONT_LEFT && | |||
ctx->Color.ColorMask[0] && | |||
ctx->Color.ColorMask[1] && | |||
ctx->Color.ColorMask[2] && | |||
#define BUFFER_BIT_MASK (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT | \ | |||
BUFFER_BIT_BACK_LEFT | BUFFER_BIT_BACK_RIGHT ) | |||
if (mask & BUFFER_BIT_MASK && | |||
ctx->Color.ColorMask[0] && | |||
ctx->Color.ColorMask[1] && | |||
ctx->Color.ColorMask[2] && | |||
ctx->Color.ColorMask[3]) | |||
{ | |||
DFBRegion clip; | |||
__u8 a, r, g, b; | |||
GLubyte a, r, g, b; | |||
UNCLAMPED_FLOAT_TO_UBYTE( a, ctx->Color.ClearColor[ACOMP] ); | |||
UNCLAMPED_FLOAT_TO_UBYTE( r, ctx->Color.ClearColor[RCOMP] ); | |||
UNCLAMPED_FLOAT_TO_UBYTE( g, ctx->Color.ClearColor[GCOMP] ); | |||
UNCLAMPED_FLOAT_TO_UBYTE( b, ctx->Color.ClearColor[BCOMP] ); | |||
data->surface->Unlock( data->surface ); | |||
#if DIRECTFB_VERSION_CODE >= VERSION_CODE(0,9,25) | |||
data->surface->GetClip( data->surface, &clip ); | |||
#else | |||
(void)clip; | |||
#endif | |||
clip.x1 = ctx->DrawBuffer->_Xmin; | |||
clip.y1 = ctx->DrawBuffer->_Ymin; | |||
clip.x2 = ctx->DrawBuffer->_Xmax - 1; | |||
clip.y2 = ctx->DrawBuffer->_Ymax - 1; | |||
data->surface->SetClip( data->surface, &clip ); | |||
if (all) { | |||
data->surface->SetClip( data->surface, NULL ); | |||
} | |||
else { | |||
DFBRegion reg = { x1:x, y1:y, x2:x+width-1, y2:y+height-1 }; | |||
data->surface->SetClip( data->surface, ® ); | |||
} | |||
data->surface->Unlock( data->surface ); | |||
data->surface->Clear( data->surface, r, g, b, a ); | |||
#if DIRECTFB_VERSION_CODE >= VERSION_CODE(0,9,25) | |||
data->surface->SetClip( data->surface, &clip ); | |||
#endif | |||
data->surface->Lock( data->surface, DSLF_READ | DSLF_WRITE, | |||
(void*)&data->video.start, &data->video.pitch ); | |||
data->video.end = data->video.start + (data->height-1) * data->video.pitch; | |||
data->render.Data = data->video.start; | |||
mask &= ~BUFFER_BIT_FRONT_LEFT; | |||
mask &= ~BUFFER_BIT_MASK; | |||
} | |||
#undef BUFFER_BIT_MASK | |||
if (mask) | |||
_swrast_Clear( ctx, mask ); | |||
} | |||
} | |||
/************************ RenderBuffer functions *****************************/ | |||
@@ -790,6 +804,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_RGB332; | |||
data->render.GetValues = get_values_RGB332; | |||
data->render.PutRow = put_row_RGB332; | |||
data->render.PutRowRGB = put_row_rgb_RGB332; | |||
data->render.PutMonoRow = put_mono_row_RGB332; | |||
data->render.PutValues = put_values_RGB332; | |||
data->render.PutMonoValues = put_mono_values_RGB332; | |||
@@ -798,6 +813,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_ARGB4444; | |||
data->render.GetValues = get_values_ARGB4444; | |||
data->render.PutRow = put_row_ARGB4444; | |||
data->render.PutRowRGB = put_row_rgb_ARGB4444; | |||
data->render.PutMonoRow = put_mono_row_ARGB4444; | |||
data->render.PutValues = put_values_ARGB4444; | |||
data->render.PutMonoValues = put_mono_values_ARGB4444; | |||
@@ -806,6 +822,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_ARGB2554; | |||
data->render.GetValues = get_values_ARGB2554; | |||
data->render.PutRow = put_row_ARGB2554; | |||
data->render.PutRowRGB = put_row_rgb_ARGB2554; | |||
data->render.PutMonoRow = put_mono_row_ARGB2554; | |||
data->render.PutValues = put_values_ARGB2554; | |||
data->render.PutMonoValues = put_mono_values_ARGB2554; | |||
@@ -814,6 +831,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_ARGB1555; | |||
data->render.GetValues = get_values_ARGB1555; | |||
data->render.PutRow = put_row_ARGB1555; | |||
data->render.PutRowRGB = put_row_rgb_ARGB1555; | |||
data->render.PutMonoRow = put_mono_row_ARGB1555; | |||
data->render.PutValues = put_values_ARGB1555; | |||
data->render.PutMonoValues = put_mono_values_ARGB1555; | |||
@@ -822,6 +840,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_RGB16; | |||
data->render.GetValues = get_values_RGB16; | |||
data->render.PutRow = put_row_RGB16; | |||
data->render.PutRowRGB = put_row_rgb_RGB16; | |||
data->render.PutMonoRow = put_mono_row_RGB16; | |||
data->render.PutValues = put_values_RGB16; | |||
data->render.PutMonoValues = put_mono_values_RGB16; | |||
@@ -830,6 +849,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_RGB24; | |||
data->render.GetValues = get_values_RGB24; | |||
data->render.PutRow = put_row_RGB24; | |||
data->render.PutRowRGB = put_row_rgb_RGB24; | |||
data->render.PutMonoRow = put_mono_row_RGB24; | |||
data->render.PutValues = put_values_RGB24; | |||
data->render.PutMonoValues = put_mono_values_RGB24; | |||
@@ -838,6 +858,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_RGB32; | |||
data->render.GetValues = get_values_RGB32; | |||
data->render.PutRow = put_row_RGB32; | |||
data->render.PutRowRGB = put_row_rgb_RGB32; | |||
data->render.PutMonoRow = put_mono_row_RGB32; | |||
data->render.PutValues = put_values_RGB32; | |||
data->render.PutMonoValues = put_mono_values_RGB32; | |||
@@ -846,6 +867,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_ARGB; | |||
data->render.GetValues = get_values_ARGB; | |||
data->render.PutRow = put_row_ARGB; | |||
data->render.PutRowRGB = put_row_rgb_ARGB; | |||
data->render.PutMonoRow = put_mono_row_ARGB; | |||
data->render.PutValues = put_values_ARGB; | |||
data->render.PutMonoValues = put_mono_values_ARGB; | |||
@@ -854,6 +876,7 @@ directfbgl_create_context( GLcontext *context, | |||
data->render.GetRow = get_row_AiRGB; | |||
data->render.GetValues = get_values_AiRGB; | |||
data->render.PutRow = put_row_AiRGB; | |||
data->render.PutRowRGB = put_row_rgb_AiRGB; | |||
data->render.PutMonoRow = put_mono_row_AiRGB; | |||
data->render.PutValues = put_values_AiRGB; | |||
data->render.PutMonoValues = put_mono_values_AiRGB; |
@@ -411,13 +411,18 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) | |||
if (!pcp | |||
|| ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) { | |||
/* ERROR!!! */ | |||
return; | |||
/* ERROR!!! | |||
* ...but we must ignore it. There can be many contexts bound to a | |||
* drawable. | |||
*/ | |||
} | |||
psp = pdp->driScreenPriv; | |||
if (!psp) { | |||
/* ERROR!!! */ | |||
_mesa_problem("Warning! Possible infinite loop due to bug " | |||
"in file %s, line %d\n", | |||
__FILE__, __LINE__); | |||
return; | |||
} | |||
@@ -477,8 +482,27 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) | |||
static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate ) | |||
{ | |||
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; | |||
drm_clip_rect_t rect; | |||
dPriv->swapBuffers(dPriv); | |||
(void) dpy; | |||
/* Check that we actually have the new damage report method */ | |||
if (api_ver < 20070105 || dri_interface->reportDamage == NULL) | |||
return; | |||
/* Assume it's affecting the whole drawable for now */ | |||
rect.x1 = 0; | |||
rect.y1 = 0; | |||
rect.x2 = rect.x1 + dPriv->w; | |||
rect.y2 = rect.y1 + dPriv->h; | |||
/* Report the damage. Currently, all our drivers draw directly to the | |||
* front buffer, so we report the damage there rather than to the backing | |||
* store (if any). | |||
*/ | |||
(*dri_interface->reportDamage)(dpy, dPriv->screen, dPriv->draw, | |||
dPriv->x, dPriv->y, | |||
&rect, 1, GL_TRUE); | |||
} | |||
/** |
@@ -52,8 +52,11 @@ typedef struct { | |||
*/ | |||
GLboolean depthHasSurface; | |||
/* XXX this is for s3v only. A handy flag to know if this is the back | |||
* color buffer. | |||
/** | |||
* A handy flag to know if this is the back color buffer. | |||
* | |||
* \note | |||
* This is currently only used by s3v and tdfx. | |||
*/ | |||
GLboolean backBuffer; | |||
} driRenderbuffer; |
@@ -0,0 +1,5 @@ | |||
de | |||
es | |||
fr | |||
nl | |||
sv |
@@ -41,7 +41,7 @@ | |||
# - info gettext | |||
# The set of supported languages. Add languages as needed. | |||
POS=de.po es.po nl.po fr.po | |||
POS=de.po es.po nl.po fr.po sv.po | |||
# | |||
# Don't change anything below, unless you know what you're doing. |
@@ -58,7 +58,8 @@ DRI_CONF_SECTION_BEGIN \ | |||
DRI_CONF_DESC(de,"Fehlersuche") \ | |||
DRI_CONF_DESC(es,"Depurando") \ | |||
DRI_CONF_DESC(nl,"Debuggen") \ | |||
DRI_CONF_DESC(fr,"Debogage") | |||
DRI_CONF_DESC(fr,"Debogage") \ | |||
DRI_CONF_DESC(sv,"Felsökning") | |||
#define DRI_CONF_NO_RAST(def) \ | |||
DRI_CONF_OPT_BEGIN(no_rast,bool,def) \ | |||
@@ -67,6 +68,7 @@ DRI_CONF_OPT_BEGIN(no_rast,bool,def) \ | |||
DRI_CONF_DESC(es,"Desactivar aceleración 3D") \ | |||
DRI_CONF_DESC(nl,"3D versnelling uitschakelen") \ | |||
DRI_CONF_DESC(fr,"Désactiver l'accélération 3D") \ | |||
DRI_CONF_DESC(sv,"Inaktivera 3D-accelerering") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_PERFORMANCE_BOXES(def) \ | |||
@@ -76,6 +78,7 @@ DRI_CONF_OPT_BEGIN(performance_boxes,bool,def) \ | |||
DRI_CONF_DESC(es,"Mostrar cajas de rendimiento") \ | |||
DRI_CONF_DESC(nl,"Laat prestatie boxjes zien") \ | |||
DRI_CONF_DESC(fr,"Afficher les boîtes de performance") \ | |||
DRI_CONF_DESC(sv,"Visa prestandarutor") \ | |||
DRI_CONF_OPT_END | |||
@@ -86,7 +89,8 @@ DRI_CONF_SECTION_BEGIN \ | |||
DRI_CONF_DESC(de,"Bildqualität") \ | |||
DRI_CONF_DESC(es,"Calidad de imagen") \ | |||
DRI_CONF_DESC(nl,"Beeldkwaliteit") \ | |||
DRI_CONF_DESC(fr,"Qualité d'image") | |||
DRI_CONF_DESC(fr,"Qualité d'image") \ | |||
DRI_CONF_DESC(sv,"Bildkvalitet") | |||
#define DRI_CONF_EXCESS_MIPMAP(def) \ | |||
DRI_CONF_OPT_BEGIN(excess_mipmap,bool,def) \ | |||
@@ -129,6 +133,12 @@ DRI_CONF_OPT_BEGIN_V(texture_depth,enum,def,"0:3") \ | |||
DRI_CONF_ENUM(2,"Prérérer 16 bits par texel") \ | |||
DRI_CONF_ENUM(3,"Forcer 16 bits par texel") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Färgdjup för texturer") \ | |||
DRI_CONF_ENUM(0,"Föredra färgdjupet för framebuffer") \ | |||
DRI_CONF_ENUM(1,"Föredra 32 bitar per texel") \ | |||
DRI_CONF_ENUM(2,"Föredra 16 bitar per texel") \ | |||
DRI_CONF_ENUM(3,"Tvinga 16 bitar per texel") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_DEF_MAX_ANISOTROPY(def,range) \ | |||
@@ -138,6 +148,7 @@ DRI_CONF_OPT_BEGIN_V(def_max_anisotropy,float,def,range) \ | |||
DRI_CONF_DESC(es,"Valor máximo inicial para filtrado anisotrópico de textura") \ | |||
DRI_CONF_DESC(nl,"Initïele maximum waarde voor anisotrophische textuur filtering") \ | |||
DRI_CONF_DESC(fr,"Valeur maximale initiale pour le filtrage anisotropique de texture") \ | |||
DRI_CONF_DESC(sv,"Initialt maximalt värde för anisotropisk texturfiltrering") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_NO_NEG_LOD_BIAS(def) \ | |||
@@ -147,6 +158,7 @@ DRI_CONF_OPT_BEGIN(no_neg_lod_bias,bool,def) \ | |||
DRI_CONF_DESC(es,"Prohibir valores negativos de Nivel De Detalle (LOD) de texturas") \ | |||
DRI_CONF_DESC(nl,"Verbied negatief niveau detailonderscheid (LOD) van texturen") \ | |||
DRI_CONF_DESC(fr,"Interdire le LOD bias negatif") \ | |||
DRI_CONF_DESC(sv,"Förbjud negativ LOD-kompensation för texturer") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_FORCE_S3TC_ENABLE(def) \ | |||
@@ -156,6 +168,7 @@ DRI_CONF_OPT_BEGIN(force_s3tc_enable,bool,def) \ | |||
DRI_CONF_DESC(es,"Activar la compresión de texturas S3TC incluso si el soporte por software no está disponible") \ | |||
DRI_CONF_DESC(nl,"Schakel S3TC textuurcompressie in, zelfs als softwareondersteuning niet aanwezig is") \ | |||
DRI_CONF_DESC(fr,"Activer la compression de texture S3TC même si le support logiciel est absent") \ | |||
DRI_CONF_DESC(sv,"Aktivera S3TC-texturkomprimering även om programvarustöd saknas") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_COLOR_REDUCTION_ROUND 0 | |||
@@ -182,6 +195,10 @@ DRI_CONF_OPT_BEGIN_V(color_reduction,enum,def,"0:1") \ | |||
DRI_CONF_ENUM(0,"Arrondir les valeurs de couleur") \ | |||
DRI_CONF_ENUM(1,"Tramer les couleurs") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Initial färgminskningsmetod") \ | |||
DRI_CONF_ENUM(0,"Avrunda färger") \ | |||
DRI_CONF_ENUM(1,"Utjämna färger") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_ROUND_TRUNC 0 | |||
@@ -208,6 +225,10 @@ DRI_CONF_OPT_BEGIN_V(round_mode,enum,def,"0:1") \ | |||
DRI_CONF_ENUM(0,"Arrondi à l'inférieur") \ | |||
DRI_CONF_ENUM(1,"Arrondi au plus proche") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Färgavrundningsmetod") \ | |||
DRI_CONF_ENUM(0,"Avrunda färdkomponenter nedåt") \ | |||
DRI_CONF_ENUM(1,"Avrunda till närmsta färg") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_DITHER_XERRORDIFF 0 | |||
@@ -240,6 +261,11 @@ DRI_CONF_OPT_BEGIN_V(dither_mode,enum,def,"0:2") \ | |||
DRI_CONF_ENUM(1,"Diffusion d'erreur horizontale, réinitialisé pour chaque ligne") \ | |||
DRI_CONF_ENUM(2,"Tramage ordonné des couleurs") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Färgutjämningsmetod") \ | |||
DRI_CONF_ENUM(0,"Horisontell felspridning") \ | |||
DRI_CONF_ENUM(1,"Horisontell felspridning, återställ fel vid radbörjan") \ | |||
DRI_CONF_ENUM(2,"Ordnad 2D-färgutjämning") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_FLOAT_DEPTH(def) \ | |||
@@ -249,6 +275,7 @@ DRI_CONF_OPT_BEGIN(float_depth,bool,def) \ | |||
DRI_CONF_DESC(es,"Búfer de profundidad en coma flotante") \ | |||
DRI_CONF_DESC(nl,"Dieptebuffer als commagetal") \ | |||
DRI_CONF_DESC(fr,"Z-buffer en virgule flottante") \ | |||
DRI_CONF_DESC(sv,"Buffert för flytande punktdjup") \ | |||
DRI_CONF_OPT_END | |||
/** \brief Performance-related options */ | |||
@@ -258,7 +285,8 @@ DRI_CONF_SECTION_BEGIN \ | |||
DRI_CONF_DESC(de,"Leistung") \ | |||
DRI_CONF_DESC(es,"Rendimiento") \ | |||
DRI_CONF_DESC(nl,"Prestatie") \ | |||
DRI_CONF_DESC(fr,"Performance") | |||
DRI_CONF_DESC(fr,"Performance") \ | |||
DRI_CONF_DESC(sv,"Prestanda") | |||
#define DRI_CONF_TCL_SW 0 | |||
#define DRI_CONF_TCL_PIPELINED 1 | |||
@@ -296,6 +324,12 @@ DRI_CONF_OPT_BEGIN_V(tcl_mode,enum,def,"0:3") \ | |||
DRI_CONF_ENUM(2,"Court-circuiter le pipeline TCL") \ | |||
DRI_CONF_ENUM(3,"Court-circuiter le pipeline TCL par une machine à états qui génère le codede TCL à la volée") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"TCL-läge (Transformation, Clipping, Lighting)") \ | |||
DRI_CONF_ENUM(0,"Använd programvaru-TCL-rörledning") \ | |||
DRI_CONF_ENUM(1,"Använd maskinvaru-TCL som första TCL-rörledningssteg") \ | |||
DRI_CONF_ENUM(2,"Kringgå TCL-rörledningen") \ | |||
DRI_CONF_ENUM(3,"Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_FTHROTTLE_BUSY 0 | |||
@@ -328,6 +362,11 @@ DRI_CONF_OPT_BEGIN_V(fthrottle_mode,enum,def,"0:2") \ | |||
DRI_CONF_ENUM(1,"Attente utilisant usleep()") \ | |||
DRI_CONF_ENUM(2,"Utiliser les interruptions") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Metod för att begränsa renderingslatens") \ | |||
DRI_CONF_ENUM(0,"Upptagen med att vänta på grafikhårdvaran") \ | |||
DRI_CONF_ENUM(1,"Sov i korta intervall under väntan på grafikhårdvaran") \ | |||
DRI_CONF_ENUM(2,"Låt grafikhårdvaran sända ut ett programvaruavbrott och sov") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_VBLANK_NEVER 0 | |||
@@ -366,6 +405,12 @@ DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \ | |||
DRI_CONF_ENUM(2,"Synchroniser avec le balayage vertical par défaut, mais obéir au choix de l'application") \ | |||
DRI_CONF_ENUM(3,"Toujours synchroniser avec le balayage vertical, l'application choisit l'intervalle minimal") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Synkronisering med vertikal uppdatering (växlingsintervall)") \ | |||
DRI_CONF_ENUM(0,"Synkronisera aldrig med vertikal uppdatering, ignorera programmets val") \ | |||
DRI_CONF_ENUM(1,"Initialt växlingsintervall 0, följ programmets val") \ | |||
DRI_CONF_ENUM(2,"Initialt växlingsintervall 1, följ programmets val") \ | |||
DRI_CONF_ENUM(3,"Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta växlingsintervallen") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_HYPERZ_DISABLED 0 | |||
@@ -377,6 +422,7 @@ DRI_CONF_OPT_BEGIN(hyperz,bool,def) \ | |||
DRI_CONF_DESC(es,"Usar HyperZ para potenciar rendimiento") \ | |||
DRI_CONF_DESC(nl,"Gebruik HyperZ om de prestaties te verbeteren") \ | |||
DRI_CONF_DESC(fr,"Utiliser le HyperZ pour améliorer les performances") \ | |||
DRI_CONF_DESC(sv,"Använd HyperZ för att maximera prestandan") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_MAX_TEXTURE_UNITS(def,min,max) \ | |||
@@ -386,6 +432,7 @@ DRI_CONF_OPT_BEGIN_V(texture_units,int,def, # min ":" # max ) \ | |||
DRI_CONF_DESC(es,"Número de unidades de textura usadas") \ | |||
DRI_CONF_DESC(nl,"Aantal textuureenheden in gebruik") \ | |||
DRI_CONF_DESC(fr,"Nombre d'unités de texture") \ | |||
DRI_CONF_DESC(sv,"Antal använda texturenheter") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_ALLOW_LARGE_TEXTURES(def) \ | |||
@@ -415,6 +462,11 @@ DRI_CONF_OPT_BEGIN_V(allow_large_textures,enum,def,"0:2") \ | |||
DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \ | |||
DRI_CONF_ENUM(2,"Announce hardware limits") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Stöd för större texturer är inte garanterat att passa i grafikminnet") \ | |||
DRI_CONF_ENUM(0,"Nej") \ | |||
DRI_CONF_ENUM(1,"Åtminstone en textur måste passa för antaget sämsta förhållande") \ | |||
DRI_CONF_ENUM(2,"Annonsera hårdvarubegränsningar") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_TEXTURE_BLEND_QUALITY(def,range) \ | |||
@@ -424,6 +476,7 @@ DRI_CONF_OPT_BEGIN_V(texture_blend_quality,float,def,range) \ | |||
DRI_CONF_DESC(es,"Calidad de filtrado de textura vs. velocidad, alias filtrado ”brilinear“ de textura") \ | |||
DRI_CONF_DESC(nl,"Textuurfilterkwaliteit versus -snelheid, ookwel bekend als “brilineaire” textuurfiltering") \ | |||
DRI_CONF_DESC(fr,"Qualité/performance du filtrage trilinéaire de texture (filtrage brilinéaire)") \ | |||
DRI_CONF_DESC(sv,"Texturfiltreringskvalitet mot hastighet, även kallad ”brilinear”-texturfiltrering") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_TEXTURE_HEAPS_ALL 0 | |||
@@ -456,6 +509,11 @@ DRI_CONF_OPT_BEGIN_V(texture_heaps,enum,def,"0:2") \ | |||
DRI_CONF_ENUM(1,"Utiliser uniquement la mémoire graphique (si disponible)") \ | |||
DRI_CONF_ENUM(2,"Utiliser uniquement la mémoire GART (AGP/PCIE) (si disponible)") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_DESC_BEGIN(sv,"Använda typer av texturminne") \ | |||
DRI_CONF_ENUM(0,"Allt tillgängligt minne") \ | |||
DRI_CONF_ENUM(1,"Endast kortminne (om tillgängligt)") \ | |||
DRI_CONF_ENUM(2,"Endast GART-minne (AGP/PCIE) (om tillgängligt)") \ | |||
DRI_CONF_DESC_END \ | |||
DRI_CONF_OPT_END | |||
/* Options for features that are not done in hardware by the driver (like GL_ARB_vertex_program | |||
@@ -466,7 +524,8 @@ DRI_CONF_SECTION_BEGIN \ | |||
DRI_CONF_DESC(de,"Funktionalität, die nicht hardwarebeschleunigt ist") \ | |||
DRI_CONF_DESC(es,"Características no aceleradas por hardware") \ | |||
DRI_CONF_DESC(nl,"Eigenschappen die niet hardwareversneld zijn") \ | |||
DRI_CONF_DESC(fr,"Fonctionnalités ne bénéficiant pas d'une accélération matérielle") | |||
DRI_CONF_DESC(fr,"Fonctionnalités ne bénéficiant pas d'une accélération matérielle") \ | |||
DRI_CONF_DESC(sv,"Funktioner som inte är hårdvaruaccelererade") | |||
#define DRI_CONF_ARB_VERTEX_PROGRAM(def) \ | |||
DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \ | |||
@@ -475,6 +534,7 @@ DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \ | |||
DRI_CONF_DESC(es,"Activar la extensión GL_ARB_vertex_program") \ | |||
DRI_CONF_DESC(nl,"Zet uitbreiding GL_ARB_vertex_program aan") \ | |||
DRI_CONF_DESC(fr,"Activer l'extension GL_ARB_vertex_program") \ | |||
DRI_CONF_DESC(sv,"Aktivera tillägget GL_ARB_vertex_program") \ | |||
DRI_CONF_OPT_END | |||
#define DRI_CONF_NV_VERTEX_PROGRAM(def) \ | |||
@@ -484,4 +544,5 @@ DRI_CONF_OPT_BEGIN(nv_vertex_program,bool,def) \ | |||
DRI_CONF_DESC(es,"Activar extensión GL_NV_vertex_program") \ | |||
DRI_CONF_DESC(nl,"Zet uitbreiding GL_NV_vertex_program aan") \ | |||
DRI_CONF_DESC(fr,"Activer l'extension GL_NV_vertex_program") \ | |||
DRI_CONF_DESC(sv,"Aktivera tillägget GL_NV_vertex_program") \ | |||
DRI_CONF_OPT_END |
@@ -0,0 +1,226 @@ | |||
# Swedish translation of DRI driver options. | |||
# Copyright (C) Free Software Foundation, Inc. | |||
# This file is distributed under the same license as the Mesa package. | |||
# Daniel Nylander <po@danielnylander.se>, 2006. | |||
# | |||
msgid "" | |||
msgstr "" | |||
"Project-Id-Version: Mesa DRI\n" | |||
"Report-Msgid-Bugs-To: \n" | |||
"POT-Creation-Date: 2005-04-11 23:19+0200\n" | |||
"PO-Revision-Date: 2006-09-18 10:56+0100\n" | |||
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" | |||
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" | |||
"MIME-Version: 1.0\n" | |||
"Content-Type: text/plain; charset=UTF-8\n" | |||
"Content-Transfer-Encoding: 8bit\n" | |||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | |||
#: t_options.h:53 | |||
msgid "Debugging" | |||
msgstr "Felsökning" | |||
#: t_options.h:57 | |||
msgid "Disable 3D acceleration" | |||
msgstr "Inaktivera 3D-accelerering" | |||
#: t_options.h:62 | |||
msgid "Show performance boxes" | |||
msgstr "Visa prestandarutor" | |||
#: t_options.h:69 | |||
msgid "Image Quality" | |||
msgstr "Bildkvalitet" | |||
#: t_options.h:77 | |||
msgid "Texture color depth" | |||
msgstr "Färgdjup för texturer" | |||
#: t_options.h:78 | |||
msgid "Prefer frame buffer color depth" | |||
msgstr "Föredra färgdjupet för framebuffer" | |||
#: t_options.h:79 | |||
msgid "Prefer 32 bits per texel" | |||
msgstr "Föredra 32 bitar per texel" | |||
#: t_options.h:80 | |||
msgid "Prefer 16 bits per texel" | |||
msgstr "Föredra 16 bitar per texel" | |||
#: t_options.h:81 | |||
msgid "Force 16 bits per texel" | |||
msgstr "Tvinga 16 bitar per texel" | |||
#: t_options.h:87 | |||
msgid "Initial maximum value for anisotropic texture filtering" | |||
msgstr "Initialt maximalt värde för anisotropisk texturfiltrering" | |||
#: t_options.h:92 | |||
msgid "Forbid negative texture LOD bias" | |||
msgstr "Förbjud negativ LOD-kompensation för texturer" | |||
#: t_options.h:97 | |||
msgid "Enable S3TC texture compression even if software support is not available" | |||
msgstr "Aktivera S3TC-texturkomprimering även om programvarustöd saknas" | |||
#: t_options.h:104 | |||
msgid "Initial color reduction method" | |||
msgstr "Initial färgminskningsmetod" | |||
#: t_options.h:105 | |||
msgid "Round colors" | |||
msgstr "Avrunda färger" | |||
#: t_options.h:106 | |||
msgid "Dither colors" | |||
msgstr "Utjämna färger" | |||
#: t_options.h:114 | |||
msgid "Color rounding method" | |||
msgstr "Färgavrundningsmetod" | |||
#: t_options.h:115 | |||
msgid "Round color components downward" | |||
msgstr "Avrunda färdkomponenter nedåt" | |||
#: t_options.h:116 | |||
msgid "Round to nearest color" | |||
msgstr "Avrunda till närmsta färg" | |||
#: t_options.h:125 | |||
msgid "Color dithering method" | |||
msgstr "Färgutjämningsmetod" | |||
#: t_options.h:126 | |||
msgid "Horizontal error diffusion" | |||
msgstr "Horisontell felspridning" | |||
#: t_options.h:127 | |||
msgid "Horizontal error diffusion, reset error at line start" | |||
msgstr "Horisontell felspridning, återställ fel vid radbörjan" | |||
#: t_options.h:128 | |||
msgid "Ordered 2D color dithering" | |||
msgstr "Ordnad 2D-färgutjämning" | |||
#: t_options.h:134 | |||
msgid "Floating point depth buffer" | |||
msgstr "Buffert för flytande punktdjup" | |||
#: t_options.h:140 | |||
msgid "Performance" | |||
msgstr "Prestanda" | |||
#: t_options.h:148 | |||
msgid "TCL mode (Transformation, Clipping, Lighting)" | |||
msgstr "TCL-läge (Transformation, Clipping, Lighting)" | |||
#: t_options.h:149 | |||
msgid "Use software TCL pipeline" | |||
msgstr "Använd programvaru-TCL-rörledning" | |||
#: t_options.h:150 | |||
msgid "Use hardware TCL as first TCL pipeline stage" | |||
msgstr "Använd maskinvaru-TCL som första TCL-rörledningssteg" | |||
#: t_options.h:151 | |||
msgid "Bypass the TCL pipeline" | |||
msgstr "Kringgå TCL-rörledningen" | |||
#: t_options.h:152 | |||
msgid "Bypass the TCL pipeline with state-based machine code generated on-the-fly" | |||
msgstr "Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras" | |||
#: t_options.h:161 | |||
msgid "Method to limit rendering latency" | |||
msgstr "Metod för att begränsa renderingslatens" | |||
#: t_options.h:162 | |||
msgid "Busy waiting for the graphics hardware" | |||
msgstr "Upptagen med att vänta på grafikhårdvaran" | |||
#: t_options.h:163 | |||
msgid "Sleep for brief intervals while waiting for the graphics hardware" | |||
msgstr "Sov i korta intervall under väntan på grafikhårdvaran" | |||
#: t_options.h:164 | |||
msgid "Let the graphics hardware emit a software interrupt and sleep" | |||
msgstr "Låt grafikhårdvaran sända ut ett programvaruavbrott och sov" | |||
#: t_options.h:174 | |||
msgid "Synchronization with vertical refresh (swap intervals)" | |||
msgstr "Synkronisering med vertikal uppdatering (växlingsintervall)" | |||
#: t_options.h:175 | |||
msgid "Never synchronize with vertical refresh, ignore application's choice" | |||
msgstr "Synkronisera aldrig med vertikal uppdatering, ignorera programmets val" | |||
#: t_options.h:176 | |||
msgid "Initial swap interval 0, obey application's choice" | |||
msgstr "Initialt växlingsintervall 0, följ programmets val" | |||
#: t_options.h:177 | |||
msgid "Initial swap interval 1, obey application's choice" | |||
msgstr "Initialt växlingsintervall 1, följ programmets val" | |||
#: t_options.h:178 | |||
msgid "Always synchronize with vertical refresh, application chooses the minimum swap interval" | |||
msgstr "Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta växlingsintervallen" | |||
#: t_options.h:186 | |||
msgid "Use HyperZ to boost performance" | |||
msgstr "Använd HyperZ för att maximera prestandan" | |||
#: t_options.h:191 | |||
msgid "Number of texture units used" | |||
msgstr "Antal använda texturenheter" | |||
#: t_options.h:196 | |||
msgid "Support larger textures not guaranteed to fit into graphics memory" | |||
msgstr "Stöd för större texturer är inte garanterat att passa i grafikminnet" | |||
#: t_options.h:197 | |||
msgid "No" | |||
msgstr "Nej" | |||
#: t_options.h:198 | |||
msgid "At least 1 texture must fit under worst-case assumptions" | |||
msgstr "Åtminstone en textur måste passa för antaget sämsta förhållande" | |||
#: t_options.h:199 | |||
msgid "Announce hardware limits" | |||
msgstr "Annonsera hårdvarubegränsningar" | |||
#: t_options.h:205 | |||
msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" | |||
msgstr "Texturfiltreringskvalitet mot hastighet, även kallad \"brilinear\"-texturfiltrering" | |||
#: t_options.h:213 | |||
msgid "Used types of texture memory" | |||
msgstr "Använda typer av texturminne" | |||
#: t_options.h:214 | |||
msgid "All available memory" | |||
msgstr "Allt tillgängligt minne" | |||
#: t_options.h:215 | |||
msgid "Only card memory (if available)" | |||
msgstr "Endast kortminne (om tillgängligt)" | |||
#: t_options.h:216 | |||
msgid "Only GART (AGP/PCIE) memory (if available)" | |||
msgstr "Endast GART-minne (AGP/PCIE) (om tillgängligt)" | |||
#: t_options.h:224 | |||
msgid "Features that are not hardware-accelerated" | |||
msgstr "Funktioner som inte är hårdvaruaccelererade" | |||
#: t_options.h:228 | |||
msgid "Enable extension GL_ARB_vertex_program" | |||
msgstr "Aktivera tillägget GL_ARB_vertex_program" | |||
#: t_options.h:233 | |||
msgid "Enable extension GL_NV_vertex_program" | |||
msgstr "Aktivera tillägget GL_NV_vertex_program" | |||
@@ -50,7 +50,6 @@ | |||
#define SET_STATE( i830, STATE ) \ | |||
do { \ | |||
assert(!i830->intel.prim.flush); \ | |||
i830->current->emitted = 0; \ | |||
i830->current = &i830->STATE; \ | |||
i830->current->emitted = 0; \ | |||
@@ -907,7 +906,6 @@ i830RotateWindow(intelContextPtr intel, __DRIdrawablePrivate *dPriv, | |||
} /* cliprect loop */ | |||
assert(!intel->prim.flush); | |||
intelFlushBatchLocked( intel, GL_FALSE, GL_FALSE, GL_FALSE ); | |||
done: |
@@ -225,7 +225,7 @@ static void i830EvalLogicOpBlendState(GLcontext *ctx) | |||
I830_STATECHANGE(i830, I830_UPLOAD_CTX); | |||
if (ctx->Color._LogicOpEnabled) { | |||
if (RGBA_LOGICOP_ENABLED(ctx)) { | |||
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | | |||
ENABLE_LOGIC_OP_MASK); | |||
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | |
@@ -39,6 +39,7 @@ | |||
#include "program_instruction.h" | |||
#include "program.h" | |||
#include "programopt.h" | |||
@@ -123,6 +124,7 @@ static GLuint src_vector( struct i915_fragment_program *p, | |||
p, p->ctx->FragmentProgram.Parameters[source->Index]); | |||
break; | |||
case PROGRAM_CONSTANT: | |||
case PROGRAM_STATE_VAR: | |||
case PROGRAM_NAMED_PARAM: | |||
src = i915_emit_param4fv( | |||
@@ -937,6 +939,12 @@ static void i915ProgramStringNotify( GLcontext *ctx, | |||
*/ | |||
ctx->Driver.Enable( ctx, GL_FRAGMENT_PROGRAM_ARB, | |||
ctx->FragmentProgram.Enabled ); | |||
if (p->FragProg.FogOption) { | |||
/* add extra instructions to do fog, then turn off FogOption field */ | |||
_mesa_append_fog_code(ctx, &p->FragProg); | |||
p->FragProg.FogOption = GL_NONE; | |||
} | |||
} | |||
_tnl_program_string(ctx, target, prog); | |||
@@ -1010,7 +1018,10 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 ) | |||
EMIT_PAD( 1 ); | |||
} | |||
#if 0 | |||
/* XXX this was disabled, but enabling this code helped fix the Glean | |||
* tfragprog1 fog tests. | |||
*/ | |||
#if 1 | |||
if ((inputsRead & FRAG_BIT_FOGC) || i915->vertex_fog != I915_FOG_NONE) { | |||
EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4 ); | |||
} |
@@ -369,10 +369,7 @@ GLuint i915_emit_param4fv( struct i915_fragment_program *p, | |||
void i915_program_error( struct i915_fragment_program *p, const char *msg ) | |||
{ | |||
/* XXX we shouldn't print anything to stdout, record GL error or | |||
* call _mesa_problem() | |||
*/ | |||
fprintf(stderr, "%s\n", msg); | |||
_mesa_problem(NULL, "i915_program_error: %s", msg); | |||
p->error = 1; | |||
} | |||
@@ -141,7 +141,7 @@ static void i915EvalLogicOpBlendState(GLcontext *ctx) | |||
I915_STATECHANGE(i915, I915_UPLOAD_CTX); | |||
if (ctx->Color._LogicOpEnabled) { | |||
if (RGBA_LOGICOP_ENABLED(ctx)) { | |||
i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE; | |||
i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE; | |||
} else { |
@@ -242,7 +242,6 @@ void intelInitDriverFunctions( struct dd_function_table *functions ) | |||
functions->Clear = intelClear; | |||
functions->Flush = intelglFlush; | |||
functions->Finish = intelFinish; | |||
functions->GetBufferSize = NULL; /* OBSOLETE */ | |||
functions->GetString = intelGetString; | |||
functions->UpdateState = intelInvalidateState; | |||
@@ -20,6 +20,7 @@ DRIVER_SOURCES = \ | |||
intel_batchbuffer.c \ | |||
intel_mipmap_tree.c \ | |||
i915_tex_layout.c \ | |||
intel_tex_layout.c \ | |||
intel_tex_image.c \ | |||
intel_tex_subimage.c \ | |||
intel_tex_copy.c \ | |||
@@ -59,8 +60,10 @@ C_SOURCES = \ | |||
ASM_SOURCES = | |||
DRIVER_DEFINES = -I../intel | |||
include ../Makefile.template | |||
intel_tex_layout.o: ../intel/intel_tex_layout.c | |||
symlinks: |
@@ -156,6 +156,11 @@ do { \ | |||
*/ | |||
extern void i830InitVtbl(struct i830_context *i830); | |||
extern void | |||
i830_state_draw_region(struct intel_context *intel, | |||
struct i830_hw_state *state, | |||
struct intel_region *color_region, | |||
struct intel_region *depth_region); | |||
/* i830_context.c | |||
*/ | |||
extern GLboolean |
@@ -400,40 +400,12 @@ meta_import_pixel_state(struct intel_context *intel) | |||
*/ | |||
static void | |||
meta_draw_region(struct intel_context *intel, | |||
struct intel_region *draw_region, | |||
struct intel_region *color_region, | |||
struct intel_region *depth_region) | |||
{ | |||
struct i830_context *i830 = i830_context(&intel->ctx); | |||
GLuint format; | |||
GLuint depth_format = DEPTH_FRMT_16_FIXED; | |||
intel_region_release(&i830->meta.draw_region); | |||
intel_region_reference(&i830->meta.draw_region, draw_region); | |||
intel_region_release(&i830->meta.depth_region); | |||
intel_region_reference(&i830->meta.depth_region, depth_region); | |||
/* XXX FBO: grab code from i915 meta_draw_region */ | |||
/* XXX: 555 support? | |||
*/ | |||
if (draw_region->cpp == 2) | |||
format = DV_PF_565; | |||
else | |||
format = DV_PF_8888; | |||
if (depth_region) { | |||
if (depth_region->cpp == 2) | |||
depth_format = DEPTH_FRMT_16_FIXED; | |||
else | |||
depth_format = DEPTH_FRMT_24_FIXED_8_OTHER; | |||
} | |||
i830->meta.Buffer[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ | |||
DSTORG_VERT_BIAS(0x8) | /* .5 */ | |||
format | DEPTH_IS_Z | depth_format); | |||
i830->meta.emitted &= ~I830_UPLOAD_BUFFERS; | |||
i830_state_draw_region(intel, &i830->meta, color_region, depth_region); | |||
} | |||