mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r200/r200_tex.c src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_context.h src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texmem.c src/mesa/drivers/dri/r300/r300_texstate.c src/mesa/drivers/dri/radeon/radeon_tex.c
This commit is contained in:
commit
d1a9b1f513
509 changed files with 15287 additions and 7869 deletions
|
|
@ -48,7 +48,7 @@ opts.Add(ListOption('statetrackers', 'state trackers to build', default_statetra
|
|||
opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
|
||||
['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300']))
|
||||
opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
|
||||
['xlib', 'intel', 'gdi', 'amd']))
|
||||
['xlib', 'intel', 'gdi', 'radeon']))
|
||||
|
||||
opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
|
||||
|
||||
|
|
|
|||
28
bin/mklib
28
bin/mklib
|
|
@ -394,6 +394,30 @@ case $ARCH in
|
|||
fi
|
||||
fi
|
||||
|
||||
# If using Sun C++ compiler, need to tell it not to add runpaths
|
||||
# that are specific to the build machine
|
||||
if [ ${LINK} = "CC" ] ; then
|
||||
OPTS="${OPTS} -norunpath"
|
||||
fi
|
||||
|
||||
# Solaris linker requires explicitly listing the Standard C & C++
|
||||
# libraries in the link path when building shared objects
|
||||
if [ ${LINK} = "CC" ] ; then
|
||||
DEPS="${DEPS} -lCrun"
|
||||
fi
|
||||
DEPS="${DEPS} -lc"
|
||||
|
||||
if [ $EXPORTS ] ; then
|
||||
# Make the 'mapfile.scope' linker mapfile
|
||||
echo "{" > mapfile.scope
|
||||
echo "global:" >> mapfile.scope
|
||||
sed 's/$/;/' ${EXPORTS} >> mapfile.scope
|
||||
echo "local:" >> mapfile.scope
|
||||
echo " *;" >> mapfile.scope
|
||||
echo "};" >> mapfile.scope
|
||||
OPTS="${OPTS} -Wl,-Mmapfile.scope"
|
||||
fi
|
||||
|
||||
# Check if objects are SPARC v9
|
||||
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
||||
set ${OBJECTS}
|
||||
|
|
@ -406,17 +430,19 @@ case $ARCH in
|
|||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# for debug:
|
||||
#echo "mklib: linker is" ${LINK} ${OPTS}
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
rm -f ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
else
|
||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
fi
|
||||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def AddOptions(opts):
|
|||
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince')))
|
||||
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
|
||||
allowed_values=('default', 'crossmingw', 'winddk')))
|
||||
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
|
||||
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
|
||||
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
|
||||
|
||||
|
|
|
|||
35
configure.ac
35
configure.ac
|
|
@ -375,17 +375,6 @@ if test "x$enable_selinux" = "xyes"; then
|
|||
DEFINES="$DEFINES -DMESA_SELINUX"
|
||||
fi
|
||||
|
||||
dnl OS-specific libraries
|
||||
OS_LIBS=""
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
OS_LIBS="-lc"
|
||||
if test "x$GXX" != xyes; then
|
||||
OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl Driver configuration. Options are xlib, dri and osmesa right now.
|
||||
dnl More later: directfb, fbdev, ...
|
||||
|
|
@ -563,8 +552,8 @@ xlib)
|
|||
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
|
||||
GL_PC_CFLAGS="$X11_INCLUDES"
|
||||
fi
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
||||
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
|
||||
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
|
||||
|
||||
# if static, move the external libraries to the programs
|
||||
# and empty the libraries for libGL
|
||||
|
|
@ -621,12 +610,12 @@ dri)
|
|||
fi
|
||||
|
||||
# need DRM libs, -lpthread, etc.
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
||||
GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
||||
GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
|
||||
;;
|
||||
osmesa)
|
||||
# No libGL for osmesa
|
||||
GL_LIB_DEPS="$OS_LIBS"
|
||||
GL_LIB_DEPS=""
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([GL_LIB_DEPS])
|
||||
|
|
@ -869,9 +858,9 @@ osmesa)
|
|||
;;
|
||||
esac
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
|
||||
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
|
||||
fi
|
||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS"
|
||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
|
||||
AC_SUBST([OSMESA_LIB_DEPS])
|
||||
AC_SUBST([OSMESA_MESA_DEPS])
|
||||
AC_SUBST([OSMESA_PC_REQ])
|
||||
|
|
@ -887,7 +876,7 @@ else
|
|||
# should check these...
|
||||
EGL_LIB_DEPS="$X_LIBS -lX11"
|
||||
fi
|
||||
EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS $OS_LIBS"
|
||||
EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS"
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
|
||||
dnl
|
||||
|
|
@ -997,10 +986,10 @@ if test "x$enable_glw" = xyes; then
|
|||
fi
|
||||
|
||||
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
||||
GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS"
|
||||
GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
|
||||
if test "$enable_static" = no; then
|
||||
GLW_MESA_DEPS='-l$(GL_LIB)'
|
||||
GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
|
||||
GLW_LIB_DEPS="$GLW_LIB_DEPS"
|
||||
else
|
||||
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
|
||||
GLW_LIB_DEPS=""
|
||||
|
|
@ -1056,8 +1045,8 @@ if test "x$enable_glut" = xyes; then
|
|||
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
|
||||
GLUT_PC_CFLAGS="$X11_INCLUDES"
|
||||
fi
|
||||
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
|
||||
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS"
|
||||
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
|
||||
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
|
||||
|
||||
# If glut is available, we can build most programs
|
||||
if test "$with_demos" = yes; then
|
||||
|
|
|
|||
214
docs/MESA_texture_signed_rgba.spec
Normal file
214
docs/MESA_texture_signed_rgba.spec
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
Name
|
||||
|
||||
MESA_texture_signed_rgba
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_MESA_texture_signed_rgba
|
||||
|
||||
Contact
|
||||
|
||||
|
||||
|
||||
Notice
|
||||
|
||||
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP issues
|
||||
|
||||
Status
|
||||
|
||||
|
||||
|
||||
Version
|
||||
|
||||
0.3, 2009-03-24
|
||||
|
||||
Number
|
||||
|
||||
Not assigned ?
|
||||
|
||||
Dependencies
|
||||
|
||||
Written based on the wording of the OpenGL 2.0 specification.
|
||||
|
||||
This extension trivially interacts with ARB_texture_float.
|
||||
This extension shares some language with ARB_texture_compression_rgtc
|
||||
but does not depend on it.
|
||||
|
||||
Overview
|
||||
|
||||
OpenGL prior to 3.1 does not support any signed texture formats.
|
||||
ARB_texture_compression_rgtc introduces some compressed red and
|
||||
red_green signed formats but no uncompressed ones, which might
|
||||
still be useful. NV_texture_shader adds signed texture formats,
|
||||
but also a lot of functionality which has been superceded by fragment
|
||||
shaders.
|
||||
It is usually possible to get the same functionality
|
||||
using a unsigned format by doing scale and bias in a shader, but this
|
||||
is undesirable since modern hardware has direct support for this.
|
||||
This extension adds a signed 4-channel texture format by backporting
|
||||
the relevant features from OpenGL 3.1, as a means to support this in
|
||||
OpenGL implementations only supporting older versions.
|
||||
|
||||
Issues
|
||||
|
||||
1) What should this extension be called?
|
||||
|
||||
RESOLVED: MESA_texture_signed_rgba seems reasonable.
|
||||
The rgba part is there because only 4 channel format is supported.
|
||||
|
||||
|
||||
2) Should the full set of signed formats (alpha, luminance, rgb, etc.)
|
||||
be supported?
|
||||
|
||||
RESOLVED: NO. To keep this extension simple, only add the most
|
||||
universal format, rgba. alpha/luminance can't be trivially supported
|
||||
since OpenGL 3.1 does not support them any longer, and there is some
|
||||
implied dependency on ARB_texture_rg for red/red_green formats so
|
||||
avoid all this. Likewise, only 8 bits per channel is supported.
|
||||
|
||||
|
||||
3) Should this extension use new enums for the texture formats?
|
||||
|
||||
RESOLVED: NO. Same enums as those used in OpenGL 3.1.
|
||||
|
||||
|
||||
4) How are signed integer values mapped to floating-point values?
|
||||
|
||||
RESOLVED: Same as described in issue 5) of
|
||||
ARB_texture_compression_rgtc (quote):
|
||||
A signed 8-bit two's complement value X is computed to
|
||||
a floating-point value Xf with the formula:
|
||||
|
||||
{ X / 127.0, X > -128
|
||||
Xf = {
|
||||
{ -1.0, X == -128
|
||||
|
||||
This conversion means -1, 0, and +1 are all exactly representable,
|
||||
however -128 and -127 both map to -1.0. Mapping -128 to -1.0
|
||||
avoids the numerical awkwardness of have a representable value
|
||||
slightly more negative than -1.0.
|
||||
|
||||
This conversion is intentionally NOT the "byte" conversion listed
|
||||
in Table 2.9 for component conversions. That conversion says:
|
||||
|
||||
Xf = (2*X + 1) / 255.0
|
||||
|
||||
The Table 2.9 conversion is incapable of exactly representing
|
||||
zero.
|
||||
|
||||
(Difference to ARB_texture_compression_rgtc):
|
||||
This is the same mapping as OpenGL 3.1 uses.
|
||||
This is also different to what NV_texture_shader used.
|
||||
The above mapping should be considered the reference, but there
|
||||
is some leeway so other mappings are allowed for implementations which
|
||||
cannot do this. Particulary the mapping given in NV_texture_shader or
|
||||
the standard OpenGL byte/float mapping is considered acceptable too, as
|
||||
might be a mapping which represents -1.0 by -128, 0.0 by 0 and 1.0 by
|
||||
127 (that is, uses different scale factors for negative and positive
|
||||
numbers).
|
||||
Also, it is ok to store incoming GL_BYTE user data as-is, without
|
||||
converting to GL_FLOAT (using the standard OpenGL float/byte mapping)
|
||||
and converting back (using the mapping described here).
|
||||
Other than those subtle issues there are no other non-standard
|
||||
conversions used, so when using for instance CopyTexImage2D with
|
||||
a framebuffer clamped to [0,1] all converted numbers will be in the range
|
||||
[0, 127] (and not scaled and biased).
|
||||
|
||||
|
||||
5) How will signed components resulting from RGBA8_SNORM texture
|
||||
fetches interact with fragment coloring?
|
||||
|
||||
RESOLVED: Same as described in issue 6) of
|
||||
ARB_texture_compression_rgtc (quote):
|
||||
The specification language for this extension is silent
|
||||
about clamping behavior leaving this to the core specification
|
||||
and other extensions. The clamping or lack of clamping is left
|
||||
to the core specification and other extensions.
|
||||
|
||||
For assembly program extensions supporting texture fetches
|
||||
(ARB_fragment_program, NV_fragment_program, NV_vertex_program3,
|
||||
etc.) or the OpenGL Shading Language, these signed formats will
|
||||
appear as expected with unclamped signed components as a result
|
||||
of a texture fetch instruction.
|
||||
|
||||
If ARB_color_buffer_float is supported, its clamping controls
|
||||
will apply.
|
||||
|
||||
NV_texture_shader extension, if supported, adds support for
|
||||
fixed-point textures with signed components and relaxed the
|
||||
fixed-function texture environment clamping appropriately. If the
|
||||
NV_texture_shader extension is supported, its specified behavior
|
||||
for the texture environment applies where intermediate values
|
||||
are clamped to [-1,1] unless stated otherwise as in the case
|
||||
of explicitly clamped to [0,1] for GL_COMBINE. or clamping the
|
||||
linear interpolation weight to [0,1] for GL_DECAL and GL_BLEND.
|
||||
|
||||
Otherwise, the conventional core texture environment clamps
|
||||
incoming, intermediate, and output color components to [0,1].
|
||||
|
||||
This implies that the conventional texture environment
|
||||
functionality of unextended OpenGL 1.5 or OpenGL 2.0 without
|
||||
using GLSL (and with none of the extensions referred to above)
|
||||
is unable to make proper use of the signed texture formats added
|
||||
by this extension because the conventional texture environment
|
||||
requires texture source colors to be clamped to [0,1]. Texture
|
||||
filtering of these signed formats would be still signed, but
|
||||
negative values generated post-filtering would be clamped to
|
||||
zero by the core texture environment functionality. The
|
||||
expectation is clearly that this extension would be co-implemented
|
||||
with one of the previously referred to extensions or used with
|
||||
GLSL for the new signed formats to be useful.
|
||||
|
||||
|
||||
6) Should the RGBA_SNORM tokens also be accepted by CopyTexImage
|
||||
functions?
|
||||
|
||||
RESOLVED: YES.
|
||||
|
||||
|
||||
7) What to do with GetTexParameter if ARB_texture_float is supported,
|
||||
in particular what datatype should this return for TEXTURE_RED_TYPE_ARB,
|
||||
TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB, TEXTURE_ALPHA_TYPE_ARB?
|
||||
|
||||
RESOLVED: ARB_texture_float states type is either NONE,
|
||||
UNSIGNED_NORMALIZED_ARB, or FLOAT. This extension adds a new enum,
|
||||
SIGNED_NORMALIZED, which will be returned accordingly. This is the
|
||||
same behaviour as in OpenGL 3.1.
|
||||
|
||||
|
||||
New Tokens
|
||||
|
||||
|
||||
Accepted by the <internalformat> parameter of
|
||||
TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D:
|
||||
|
||||
RGBA_SNORM 0x8F93
|
||||
RGBA8_SNORM 0x8F97
|
||||
|
||||
Returned by the <params> parameter of GetTexLevelParameter:
|
||||
|
||||
SIGNED_NORMALIZED 0x8F9C
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization):
|
||||
|
||||
-- Section 3.8.1, Texture Image Specification
|
||||
|
||||
Add to Table 3.16 (page 154): Sized internal formats
|
||||
|
||||
Sized Base R G B A L I D
|
||||
Internal Format Internal Format bits bits bits bits bits bits bits
|
||||
--------------- --------------- ---- ---- ---- ---- ---- ---- ----
|
||||
RGBA8_SNORM RGBA 8 8 8 8 0 0 0
|
||||
|
||||
|
||||
Dependencies on ARB_texture_float extension:
|
||||
|
||||
If ARB_texture_float is supported, GetTexParameter queries with <value>
|
||||
of TEXTURE_RED_TYPE_ARB, TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB or
|
||||
TEXTURE_ALPHA_TYPE_ARB return SIGNED_NORMALIZED if
|
||||
the base internal format is RGBA_SNORM.
|
||||
|
|
@ -14,16 +14,7 @@ The Mesa
|
|||
driver is part of the
|
||||
<a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D" target="_parent">Gallium3D</a>
|
||||
architecture.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://www.tungstengraphics.com/" target="_parent">Tungsten Graphics</a>
|
||||
is leading the project.
|
||||
Two phases are planned.
|
||||
First, to implement the framework for parallel rasterization using the Cell
|
||||
SPEs, including texture mapping.
|
||||
Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
|
||||
The second phase is now underway.
|
||||
Tungsten Graphics did the original implementation of the Cell driver.
|
||||
</p>
|
||||
|
||||
|
||||
|
|
@ -60,7 +51,7 @@ Mesa tree, then set <code>LD_LIBRARY_PATH</code> like this:
|
|||
Verify that the Cell driver is being used by running
|
||||
<code>progs/xdemos/glxinfo</code> and looking for:
|
||||
<pre>
|
||||
OpenGL renderer string: Gallium 0.2, Cell on Xlib
|
||||
OpenGL renderer string: Gallium 0.3, Cell on Xlib
|
||||
</pre>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ The specifications follow.
|
|||
<LI><A HREF="MESA_resize_buffers.spec">MESA_resize_buffers.spec</A>
|
||||
<LI><A HREF="MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</A>
|
||||
<LI><A HREF="MESA_sprite_point.spec">MESA_sprite_point.spec</A> (obsolete)
|
||||
<LI><A HREF="MESA_texture_signed_rgba.spec">MESA_texture_signed_rgba.spec</A>
|
||||
<LI><A HREF="MESA_trace.spec">MESA_trace.spec</A> (obsolete)
|
||||
<LI><A HREF="MESA_window_pos.spec">MESA_window_pos.spec</A>
|
||||
<LI><A HREF="MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</A>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,13 @@
|
|||
|
||||
<p>
|
||||
Mesa 7.5 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with the 7.4.x branch or wait for Mesa 7.6.
|
||||
</p>
|
||||
<p>
|
||||
The main new feature of Mesa 7.5 is the
|
||||
<a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D"
|
||||
target="_parent">Gallium3D</a> infrastructure.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.5 implements the OpenGL 2.1 API, but the version reported by
|
||||
|
|
@ -32,6 +39,17 @@ tbd
|
|||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>Gallium - this is the new architecture for OS-independent and
|
||||
API-independent 3D drivers.
|
||||
Gallium3D is intended for GPUs that fully support vertex/fragment shaders.
|
||||
The Gallium3D drivers currently included are:
|
||||
<ul>
|
||||
<li>softpipe - a software/reference driver
|
||||
<li>i915 - Intel 915/945 driver
|
||||
<li><a href="cell.html">Cell</a> - IBM/Sony/Toshiba Cell processor driver
|
||||
<li>nouveau - preliminary driver for NVIDIA GPUs (still under development)
|
||||
<li>r300 - preliminary driver for R300 (still under development)
|
||||
</ul>
|
||||
<li>GL_ARB_framebuffer_object extension (software drivers, i965 driver)
|
||||
<li>Reworked two-sided stencil support.
|
||||
This allows a driver to support all three variations of two-sided stencil
|
||||
|
|
@ -45,8 +63,10 @@ including GL_ATI_separate_stencil, GL_EXT_stencil_two_side and OpenGL 2.0
|
|||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Lots of i965 driver bug fixes
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Remove support for GL_SGIX_shadow, GL_SGIX_shadow_ambient and
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ Last updated on 15 December 2008.
|
|||
Contents
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="#envvars">Environment variables</a>
|
||||
<li><a href="#120">GLSL 1.20 support</a>
|
||||
<li><a href="#unsup">Unsupported Features</a>
|
||||
<li><a href="#notes">Implementation Notes</a>
|
||||
|
|
@ -33,11 +34,32 @@ Contents
|
|||
|
||||
|
||||
|
||||
<a name="envvars">
|
||||
<h2>Environment Variables</h2>
|
||||
|
||||
<p>
|
||||
The <b>MESA_GLSL</b> environment variable can be set to a comma-separated
|
||||
list of keywords to control some aspects of the GLSL compiler:
|
||||
</p>
|
||||
<ul>
|
||||
<li>dump - print GLSL shader code to stdout at link time
|
||||
<li>log - log all GLSL shaders to files.
|
||||
The filenames will be "shader_X.vert" or "shader_X.frag" where X
|
||||
the shader ID.
|
||||
<li>nopt - disable compiler optimizations
|
||||
<li>opt - force compiler optimizations
|
||||
<li>uniform - print message to stdout when glUniform is called
|
||||
</ul>
|
||||
<p>
|
||||
Example: export MESA_GLSL=dump,nopt
|
||||
</p>
|
||||
|
||||
|
||||
<a name="120">
|
||||
<h2>GLSL 1.20 support</h2>
|
||||
|
||||
<p>
|
||||
GLSL version 1.20 is supported in Mesa 7.3.
|
||||
GLSL version 1.20 is supported in Mesa 7.3 and later.
|
||||
Among the features/differences of GLSL 1.20 are:
|
||||
<ul>
|
||||
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
||||
|
|
@ -59,12 +81,14 @@ Among the features/differences of GLSL 1.20 are:
|
|||
<h2>Unsupported Features</h2>
|
||||
|
||||
<p>
|
||||
The following features of the shading language are not yet supported
|
||||
The following features of the shading language are not yet fully supported
|
||||
in Mesa:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Linking of multiple shaders is not supported
|
||||
<li>Linking of multiple shaders does not always work. Currently, linking
|
||||
is implemented through shader concatenation and re-compiling. This
|
||||
doesn't always work because of some #pragma and preprocessor issues.
|
||||
<li>gl_ClipVertex
|
||||
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
|
||||
without perspective correction
|
||||
|
|
@ -177,6 +201,8 @@ This tool is useful for:
|
|||
After building Mesa, the glslcompiler can be built by manually running:
|
||||
</p>
|
||||
<pre>
|
||||
make realclean
|
||||
make linux
|
||||
cd src/mesa/drivers/glslcompiler
|
||||
make
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
|||
#define EGL_INTERLACED_MESA 0x4008
|
||||
#define EGL_SCREEN_BIT_MESA 0x08
|
||||
|
||||
typedef u_int32_t EGLScreenMESA;
|
||||
typedef u_int32_t EGLModeMESA;
|
||||
typedef uint32_t EGLScreenMESA;
|
||||
typedef uint32_t EGLModeMESA;
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
|
|
@ -57,7 +58,7 @@
|
|||
#endif
|
||||
|
||||
typedef long int32_t;
|
||||
typedef unsigned long u_int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned char uint8_t;
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp _stricmp
|
||||
|
|
@ -68,7 +69,7 @@ typedef HWND NativeWindowType;
|
|||
typedef HBITMAP NativePixmapType;
|
||||
/** END Added for Windows **/
|
||||
|
||||
#elif defined(__gnu_linux__) || defined(__FreeBSD__)
|
||||
#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun)
|
||||
|
||||
/** BEGIN Added for X (Mesa) **/
|
||||
#ifndef EGLAPI
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ extern "C" {
|
|||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2009/03/04 */
|
||||
/* glext.h last updated 2009/03/19 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 46
|
||||
#define GL_GLEXT_VERSION 48
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
|
|
@ -716,6 +716,24 @@ extern "C" {
|
|||
/* reuse GL_VERTEX_ARRAY_BINDING */
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_3_1
|
||||
#define GL_RED_SNORM 0x8F90
|
||||
#define GL_RG_SNORM 0x8F91
|
||||
#define GL_RGB_SNORM 0x8F92
|
||||
#define GL_RGBA_SNORM 0x8F93
|
||||
#define GL_R8_SNORM 0x8F94
|
||||
#define GL_RG8_SNORM 0x8F95
|
||||
#define GL_RGB8_SNORM 0x8F96
|
||||
#define GL_RGBA8_SNORM 0x8F97
|
||||
#define GL_R16_SNORM 0x8F98
|
||||
#define GL_RG16_SNORM 0x8F99
|
||||
#define GL_RGB16_SNORM 0x8F9A
|
||||
#define GL_RGBA16_SNORM 0x8F9B
|
||||
#define GL_SIGNED_NORMALIZED 0x8F9C
|
||||
#define GL_PRIMITIVE_RESTART 0x8F9D
|
||||
#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_multitexture
|
||||
#define GL_TEXTURE0_ARB 0x84C0
|
||||
#define GL_TEXTURE1_ARB 0x84C1
|
||||
|
|
@ -1327,6 +1345,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef GL_ARB_instanced_arrays
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_map_buffer_range
|
||||
|
|
@ -1382,6 +1401,51 @@ extern "C" {
|
|||
#define GL_VERTEX_ARRAY_BINDING 0x85B5
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_uniform_buffer_object
|
||||
#define GL_UNIFORM_BUFFER 0x8A11
|
||||
#define GL_UNIFORM_BUFFER_BINDING 0x8A28
|
||||
#define GL_UNIFORM_BUFFER_START 0x8A29
|
||||
#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
|
||||
#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
|
||||
#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
|
||||
#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
|
||||
#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
|
||||
#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
|
||||
#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
|
||||
#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
|
||||
#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
|
||||
#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
|
||||
#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
|
||||
#define GL_UNIFORM_TYPE 0x8A37
|
||||
#define GL_UNIFORM_SIZE 0x8A38
|
||||
#define GL_UNIFORM_NAME_LENGTH 0x8A39
|
||||
#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
|
||||
#define GL_UNIFORM_OFFSET 0x8A3B
|
||||
#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
|
||||
#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
|
||||
#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
|
||||
#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
|
||||
#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
|
||||
#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
|
||||
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
|
||||
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
|
||||
#define GL_INVALID_INDEX_ARB 0xFFFFFFFFu
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_compatibility
|
||||
/* ARB_compatibility just defines tokens from core 3.0 */
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_copy_buffer
|
||||
#define GL_COPY_READ_BUFFER 0x8F36
|
||||
#define GL_COPY_WRITE_BUFFER 0x8F37
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_abgr
|
||||
#define GL_ABGR_EXT 0x8000
|
||||
#endif
|
||||
|
|
@ -3878,6 +3942,26 @@ extern "C" {
|
|||
#define GL_PERFMON_RESULT_AMD 0x8BC6
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_texture_texture4
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_vertex_shader_tesselator
|
||||
#define GL_SAMPLER_BUFFER_AMD 0x9001
|
||||
#define GL_INT_SAMPLER_BUFFER_AMD 0x9002
|
||||
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
|
||||
#define GL_TESSELLATION_MODE_AMD 0x9004
|
||||
#define GL_TESSELLATION_FACTOR_AMD 0x9005
|
||||
#define GL_DISCRETE_AMD 0x9006
|
||||
#define GL_CONTINUOUS_AMD 0x9007
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_provoking_vertex
|
||||
#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
|
||||
#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
|
||||
#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
|
||||
#define GL_PROVOKING_VERTEX_EXT 0x8E4F
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
|
|
@ -4503,8 +4587,8 @@ GLAPI void APIENTRY glBeginTransformFeedback (GLenum);
|
|||
GLAPI void APIENTRY glEndTransformFeedback (void);
|
||||
GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
||||
GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLchar* *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
|
||||
GLAPI void APIENTRY glClampColor (GLenum, GLenum);
|
||||
GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum);
|
||||
GLAPI void APIENTRY glEndConditionalRender (void);
|
||||
|
|
@ -4562,8 +4646,8 @@ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
|
|||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
|
||||
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
|
||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
|
||||
|
|
@ -5321,6 +5405,38 @@ typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
|
|||
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_uniform_buffer_object
|
||||
#define GL_ARB_uniform_buffer_object 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetUniformIndices (GLuint, GLsizei, const GLchar* *, GLuint *);
|
||||
GLAPI void APIENTRY glGetActiveUniformsiv (GLuint, GLsizei, const GLuint *, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetActiveUniformName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint, const GLchar *);
|
||||
GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint, GLuint, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI void APIENTRY glUniformBlockBinding (GLuint, GLuint, GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices);
|
||||
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
|
||||
typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_compatibility
|
||||
#define GL_ARB_compatibility 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_copy_buffer
|
||||
#define GL_ARB_copy_buffer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glCopyBufferSubData (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_abgr
|
||||
#define GL_EXT_abgr 1
|
||||
#endif
|
||||
|
|
@ -8053,16 +8169,16 @@ GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
|
|||
GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
||||
GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr);
|
||||
GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLchar* *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_direct_state_access
|
||||
|
|
@ -8515,6 +8631,28 @@ typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
|
|||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_texture_texture4
|
||||
#define GL_AMD_texture_texture4 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_vertex_shader_tesselator
|
||||
#define GL_AMD_vertex_shader_tesselator 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glTessellationFactorAMD (GLfloat);
|
||||
GLAPI void APIENTRY glTessellationModeAMD (GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
|
||||
typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_provoking_vertex
|
||||
#define GL_EXT_provoking_vertex 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProvokingVertexEXT (GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,11 +210,17 @@ static void Display(void)
|
|||
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0);
|
||||
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0);
|
||||
glBegin(GL_TRIANGLES);
|
||||
|
||||
glColor3f(0,0,1);
|
||||
glTexCoord3f(1,1,0);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
|
||||
glColor3f(1,0,0);
|
||||
glTexCoord3f(1,-1,0);
|
||||
glVertex3f( 0.9, 0.9, -30.0);
|
||||
|
||||
glColor3f(0,1,0);
|
||||
glTexCoord3f(-1,0,0);
|
||||
glVertex3f(-0.9, 0.0, -30.0);
|
||||
glEnd();
|
||||
|
||||
|
|
|
|||
8
progs/fp/kil-texcoord-sgt.txt
Normal file
8
progs/fp/kil-texcoord-sgt.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
!!ARBfp1.0
|
||||
TEMP R0;
|
||||
MUL R0.xy, fragment.texcoord[0], fragment.texcoord[0];
|
||||
ADD R0.x, R0.x, R0.y;
|
||||
SGE R0.y, R0.x, fragment.texcoord[0].w;
|
||||
KIL -R0.y;
|
||||
MOV result.color, fragment.color;
|
||||
END
|
||||
1
progs/glsl/.gitignore
vendored
1
progs/glsl/.gitignore
vendored
|
|
@ -6,6 +6,7 @@ deriv
|
|||
extfuncs.h
|
||||
fragcoord
|
||||
identity
|
||||
linktest
|
||||
mandelbrot
|
||||
multinoise
|
||||
multitex
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ PROGS = \
|
|||
deriv \
|
||||
identity \
|
||||
fragcoord \
|
||||
linktest \
|
||||
mandelbrot \
|
||||
multinoise \
|
||||
multitex \
|
||||
|
|
@ -128,6 +129,12 @@ fragcoord: fragcoord.o shaderutil.o
|
|||
$(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
|
||||
|
||||
|
||||
linktest.o: linktest.c extfuncs.h shaderutil.h
|
||||
$(APP_CC) -c -I$(INCDIR) $(CFLAGS) linktest.c
|
||||
|
||||
linktest: linktest.o shaderutil.o
|
||||
$(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) linktest.o shaderutil.o $(LIBS) -o $@
|
||||
|
||||
mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
|
||||
$(APP_CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
|
||||
|
||||
|
|
|
|||
258
progs/glsl/linktest.c
Normal file
258
progs/glsl/linktest.c
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
/**
|
||||
* Test linking of multiple compilation units.
|
||||
* Brian Paul
|
||||
* 28 March 2009
|
||||
*/
|
||||
|
||||
#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>
|
||||
#include "extfuncs.h"
|
||||
#include "shaderutil.h"
|
||||
|
||||
|
||||
static GLfloat diffuse[4] = { 0.5f, 1.0f, 0.5f, 1.0f };
|
||||
static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f };
|
||||
static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 0.0f };
|
||||
static GLfloat delta = 1.0f;
|
||||
|
||||
static GLuint VertShader1;
|
||||
static GLuint VertShader2;
|
||||
static GLuint FragShader1;
|
||||
static GLuint FragShader2;
|
||||
static GLuint Program;
|
||||
|
||||
static GLint uDiffuse;
|
||||
static GLint uSpecular;
|
||||
static GLint uTexture;
|
||||
|
||||
static GLint Win = 0;
|
||||
static GLboolean anim = GL_TRUE;
|
||||
|
||||
|
||||
|
||||
static const char *FragShaderSource1 =
|
||||
"float compute_dotprod(const vec3 normal) \n"
|
||||
"{ \n"
|
||||
" float dotProd = max(dot(gl_LightSource[0].position.xyz, \n"
|
||||
" normalize(normal)), 0.0); \n"
|
||||
" return dotProd; \n"
|
||||
"} \n";
|
||||
|
||||
static const char *FragShaderSource2 =
|
||||
"uniform vec4 diffuse;\n"
|
||||
"uniform vec4 specular;\n"
|
||||
"varying vec3 normal;\n"
|
||||
"\n"
|
||||
"// external function \n"
|
||||
"float compute_dotprod(const vec3 normal); \n"
|
||||
"\n"
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" float dotProd = compute_dotprod(normal); \n"
|
||||
" gl_FragColor = diffuse * dotProd + specular * pow(dotProd, 20.0); \n"
|
||||
"} \n";
|
||||
|
||||
|
||||
static const char *VertShaderSource1 =
|
||||
"vec3 compute_normal() \n"
|
||||
"{ \n"
|
||||
" return gl_NormalMatrix * gl_Normal; \n"
|
||||
"} \n";
|
||||
|
||||
static const char *VertShaderSource2 =
|
||||
"varying vec3 normal;\n"
|
||||
"\n"
|
||||
"// external function \n"
|
||||
"vec3 compute_normal(); \n"
|
||||
"\n"
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
|
||||
" normal = compute_normal(); \n"
|
||||
"} \n";
|
||||
|
||||
|
||||
static void
|
||||
normalize(GLfloat *dst, const GLfloat *src)
|
||||
{
|
||||
GLfloat len = sqrt(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;
|
||||
dst[3] = src[3];
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Redisplay(void)
|
||||
{
|
||||
GLfloat vec[4];
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
/* update light position */
|
||||
normalize(vec, lightPos);
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, vec);
|
||||
|
||||
glutSolidSphere(2.0, 10, 5);
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
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(VertShader1);
|
||||
glDeleteShader_func(VertShader2);
|
||||
glDeleteShader_func(FragShader1);
|
||||
glDeleteShader_func(FragShader2);
|
||||
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 27:
|
||||
CleanUp();
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
CheckLink(GLuint prog)
|
||||
{
|
||||
GLint stat;
|
||||
glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
|
||||
if (!stat) {
|
||||
GLchar log[1000];
|
||||
GLsizei len;
|
||||
glGetProgramInfoLog_func(prog, 1000, &len, log);
|
||||
fprintf(stderr, "Linker error:\n%s\n", log);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Init(void)
|
||||
{
|
||||
if (!ShadersSupported())
|
||||
exit(1);
|
||||
|
||||
GetExtensionFuncs();
|
||||
|
||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
||||
|
||||
VertShader1 = CompileShaderText(GL_VERTEX_SHADER, VertShaderSource1);
|
||||
VertShader2 = CompileShaderText(GL_VERTEX_SHADER, VertShaderSource2);
|
||||
FragShader1 = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderSource1);
|
||||
FragShader2 = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderSource2);
|
||||
|
||||
Program = glCreateProgram_func();
|
||||
glAttachShader_func(Program, VertShader1);
|
||||
glAttachShader_func(Program, VertShader2);
|
||||
glAttachShader_func(Program, FragShader1);
|
||||
glAttachShader_func(Program, FragShader2);
|
||||
|
||||
glLinkProgram_func(Program);
|
||||
|
||||
CheckLink(Program);
|
||||
|
||||
glUseProgram_func(Program);
|
||||
|
||||
uDiffuse = glGetUniformLocation_func(Program, "diffuse");
|
||||
uSpecular = glGetUniformLocation_func(Program, "specular");
|
||||
uTexture = glGetUniformLocation_func(Program, "texture");
|
||||
printf("DiffusePos %d SpecularPos %d TexturePos %d\n",
|
||||
uDiffuse, uSpecular, uTexture);
|
||||
|
||||
glUniform4fv_func(uDiffuse, 1, diffuse);
|
||||
glUniform4fv_func(uSpecular, 1, specular);
|
||||
|
||||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
|
||||
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 10.0f);
|
||||
|
||||
assert(glIsProgram_func(Program));
|
||||
assert(glIsShader_func(VertShader1));
|
||||
assert(glIsShader_func(VertShader2));
|
||||
assert(glIsShader_func(FragShader1));
|
||||
assert(glIsShader_func(FragShader2));
|
||||
|
||||
glColor3f(1, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition( 0, 0);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Redisplay);
|
||||
if (anim)
|
||||
glutIdleFunc(Idle);
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
5
progs/tests/.gitignore
vendored
5
progs/tests/.gitignore
vendored
|
|
@ -45,7 +45,10 @@ invert
|
|||
jkrahntest
|
||||
lineclip
|
||||
manytex
|
||||
mapbufrange
|
||||
mapvbo
|
||||
minmag
|
||||
mipgen
|
||||
mipmap_limits
|
||||
mipmap_view
|
||||
multipal
|
||||
|
|
@ -54,10 +57,12 @@ packedpixels
|
|||
pbo
|
||||
prog_parameter
|
||||
projtex
|
||||
quads
|
||||
random
|
||||
readrate
|
||||
readtex.c
|
||||
readtex.h
|
||||
rubberband
|
||||
seccolor
|
||||
sharedtex
|
||||
shader_api
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ progs = [
|
|||
'subtexrate',
|
||||
'tex1d',
|
||||
'texcmp',
|
||||
'texcompress2',
|
||||
'texfilt',
|
||||
'texgenmix',
|
||||
'texline',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <stdio.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glx.h>
|
||||
#include "readtex.c"
|
||||
|
||||
#define IMAGE_FILE "../images/arch.rgb"
|
||||
|
|
|
|||
1
progs/trivial/.gitignore
vendored
1
progs/trivial/.gitignore
vendored
|
|
@ -96,6 +96,7 @@ tri-lit
|
|||
tri-logicop-none
|
||||
tri-logicop-xor
|
||||
tri-mask-tri
|
||||
tri-multitex-vbo
|
||||
tri-orig
|
||||
tri-query
|
||||
tri-repeat
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ SOURCES = \
|
|||
tri-scissor-tri.c \
|
||||
tri-stencil.c \
|
||||
tri-stipple.c \
|
||||
tri-multitex-vbo.c \
|
||||
tri-tex.c \
|
||||
tri-tex-3d.c \
|
||||
tri-tri.c \
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ progs = [
|
|||
'tri-scissor-tri',
|
||||
'tri-stencil',
|
||||
'tri-stipple',
|
||||
'tri-multitex-vbo',
|
||||
'tri-tex',
|
||||
'tri-tex-3d',
|
||||
'tri-tri',
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
|
||||
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
|
||||
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.3, 0.1, 0.3, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fprintf(stderr, "Top right corner should be red\n");
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,12 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
glGetFloatv(GL_LINE_WIDTH_RANGE, aarange);
|
||||
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, range);
|
||||
printf("Non-AA line width range: %f .. %f\n", range[0], range[1]);
|
||||
printf("AA line width range: %f .. %f\n", aarange[0], aarange[1]);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
glClipPlane(GL_CLIP_PLANE0, plane);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
glClipPlane(GL_CLIP_PLANE0, plane);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
glClipPlane(GL_CLIP_PLANE0, plane);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
glClipPlane(GL_CLIP_PLANE0, plane);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.3, 0.1, 0.3, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
|
||||
#define SIZE 16
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
fprintf(stderr, "Press z/Z to translate quad\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(1.0, 1.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(1.0, 1.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(1.0, 1.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
glClearColor(0.3, 0.1, 0.3, 0.0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
glCullFace(GL_FRONT_AND_BACK);
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
cull();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
|
||||
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.5, 0.5, 0.5, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.5, 0.5, 0.5, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static void Init(void)
|
|||
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
fflush(stderr);
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue