Commit Graph

1431 Commits

Author SHA1 Message Date
Pauli Nieminen
fb7cf731f9 xdemo/glxswapcontrol: Move get_framge_usage after the swap.
This fixes the problem that first frame would report bogus usage values.
Problem was caused because get_frame_usage returned data from previous buffer
swap.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 13:42:05 -06:00
Pauli Nieminen
b59eb3b8b1 xdemos/glxcontexts: Don't leak visual info when choosing visual again.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 11:55:29 -06:00
Vinson Lee
bc60b88411 progs/trivial: add missing files to Makefile, .gitignore 2009-07-28 08:54:48 -06:00
Brian Paul
cd10996d4f progs/util: remove extfuncs.h (we use GLEW instead) 2009-07-17 14:43:29 -06:00
Brian Paul
ee0b1bc7d3 progs/glsl: finish conversion to GLEW
This is a follow-on to b799af91d5.
Remove _func function suffix and unneeded #includes.
2009-07-17 13:23:11 -06:00
Jakob Bornecrantz
26e58a42b0 progs/tests: Use compressed texture in mipmap_comp_tests 2009-07-14 17:11:07 +01:00
Jakob Bornecrantz
b0a17581e2 progs/tests: Tests more views in mipmap_comp_tests 2009-07-14 17:11:05 +01:00
Jakob Bornecrantz
a36b9987cd progs/tests: Add yet another mipmap test 2009-07-14 17:11:01 +01:00
Brian Paul
6ff1a5385e demos: set 4th component of texcoord to 1.0
Avoid potential randomness in resulting texcoords.
2009-07-10 13:09:09 -06:00
Ian Romanick
7fb4becf98 demos: Fix vsync checking in glxgears
Of course glXGetVideoSyncSGI doesn't return the swap interval.  The feature
only exists in the Mesa extension... which is the whole reason I created the
Mesa extension!  Note that the Mesa extension allows drivers to default to a
swap interval of 0.  If the Mesa extension exists, use its value.  Only
consider the SGI extension when the Mesa extension is not available.

Fixes bug #22604.
2009-07-06 11:42:12 -07:00
Keith Whitwell
f580494bef progs: revert damage to progs/SConscript from recent compressed texture commit 2009-07-03 16:40:03 +01:00
Keith Whitwell
1668a679c4 Merge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branch
Conflicts:
	progs/trivial/Makefile

Pull in a minimal version of statechange shortcircuiting in display
list compilation.  This affects only glMaterial and glShadeModel state,
and includes quite a few tests to exercise various tricky cases.

If this goes well, will consider extending to all state in the future.
2009-07-02 13:29:46 +01:00
Keith Whitwell
1fa4cde757 mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.

This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.

The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:52:44 +01:00
Keith Whitwell
c48c01c9e7 progs/trivial: add dlist-mat-tri.c 2009-06-30 18:37:34 +01:00
Keith Whitwell
1ca836f0de progs/trivial: add test case for short-circuiting material changes
Similar to dlist-tri-flat-tri, but using glMaterial calls, which
have the extra property of being legal within Begin/End calls.
2009-06-30 18:17:39 +01:00
Keith Whitwell
09a3a28fc8 progs/trivial: add dlist-flat-tri.c
State-change functions which precede the first call to glEnd() in
a compiled list are vulnerable to not being executed when that list
is called.

In particular this can happen if a list is invoked from within a
begin/end pair, as in this example.
2009-06-30 17:06:50 +01:00
Keith Whitwell
2e570be852 progs/trivial: add dlist-recursive-call
When one display list calls another display list, it is possible
that the calling display list makes state-changes or other actions which
invalidate any attempt at caching or state-change elimination in the
calling list.

This test exercises one such case, where the called list consists of just
a single glShadeModel() call.
2009-06-30 17:02:16 +01:00
Keith Whitwell
1730eaa2a2 dlist-tri-flat-tri: make tri render differently if flatshade not enabled
When testing flat-shading, it helps to specify per-vertex colors so
that you can distinguish between flat & smooth shading.
2009-06-30 16:57:21 +01:00
Keith Whitwell
4147bb24d4 Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
Need this to pick up fixes for per-vertex materials.
2009-06-30 16:28:54 +01:00
Keith Whitwell
6af783bea0 progs/trivial: add test case for lighting plus per-vertex materials
Exercise material-within-begin/end case.
2009-06-30 16:19:23 +01:00
Keith Whitwell
a9ae89d104 progs/isosurf: add materials mode for glVertex + TRISTRIP 2009-06-30 16:14:08 +01:00
Keith Whitwell
14a2b5445a progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
2009-06-30 15:41:43 +01:00
Jakob Bornecrantz
ba7f45ac0c progs/tests: Add tests for glCompressedTexSubImage 2009-06-30 14:11:29 +02:00
Jon TURNEY
57955451f8 xdemos: Fix xdemos which default to using display :0.0 to default to $DISPLAY
Fix xdemos which default to using display :0.0 to default to $DISPLAY,
this is kind of irritating when testing on a display other than :0.0

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-30 13:58:21 -06:00
Keith Whitwell
e5cb11adda mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.

This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.

The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:59:38 +01:00
Keith Whitwell
53f8dccd0c progs/trivial: test case for dlist statechange elimination
Creates a display list with redundant call to glShadeModel.

View dlist contents with MESA_VERBOSE=list
2009-06-30 12:20:24 +01:00
Brian Paul
8d24160a40 progs/glsl: link with GLEW library
(cherry picked from commit b1f2f92d9b)
2009-06-30 11:47:51 +01:00
Brian Paul
b1f2f92d9b progs/glsl: link with GLEW library 2009-06-29 10:32:04 -06:00
Keith Whitwell
9014f475ff progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
2009-06-29 16:07:14 +01:00
Keith Whitwell
b799af91d5 progs/glsl: compile with scons and glew
Get most of these working with scons.
2009-06-29 14:15:08 +01:00
Brian Paul
eb1eee03a6 demos: improve argv parsing in fslight.c 2009-06-26 13:16:32 -06:00
Brian Paul
b79e6a59d8 demos: fix issues in glxcontexts.c
The reshape() function was called when there was no GLX context so
the viewport/modelview/projection setup wasn't doing anything.  Move
the call to reshape() into draw().

Also, remove -stereo, -fullscreen options and do some general clean-up.
2009-06-23 09:31:27 -06:00
José Fonseca
1bee650ef3 progs/wgl: Fix shreadtex_mt too. 2009-06-17 15:23:25 +01:00
José Fonseca
6e24fdeae5 progs/wgl: Tweak the initialization wait in wglthreads.
There was still a non-zero probability for wglShareLists of failing.
2009-06-17 15:23:25 +01:00
José Fonseca
557421b6de progs/wgl: Get wglShareLists working in wglthreads.
wglShareLists is a little picky -- it seems to check if it has exclusive
access to a lock, and fails if it doesn't.

This allows the texture to be shared with all windows.
2009-06-17 15:23:25 +01:00
José Fonseca
992000cce7 progs/wgl: Allow resizing wglthreads' windows. 2009-06-17 10:08:24 +01:00
José Fonseca
077c5e62d8 progs/wgl: Quit after displaying usage for -h option. 2009-06-16 12:34:29 +01:00
José Fonseca
06075711af progs/wgl: Use appropriate types to silence msvc warnings. 2009-06-16 12:29:58 +01:00
José Fonseca
566bdbe67d progs/wgl: Fix assertion failure in wglthreads' texture creation. 2009-06-16 12:29:58 +01:00
José Fonseca
0e1abced56 progs/tests: Use opaque colors.
Transparency is not relevant for this example, and leads to distraction
due to different results in alpha visuals, when capturing images to disk.
2009-06-15 15:40:10 +01:00
Brian Paul
fb64365642 demos: update fbotexture.c to use EXT or ARB functions exclusively
When the -arb option is specified we use GL_ARB_framebuffer_object intead
of GL_EXT_framebuffer_object.

For some vendors' OpenGL it's important to call the ARB entrypoints
instead of the EXT entrypoints to get correct behaviour.  Use some
function pointer tricks to do this (instead of GLEW).
2009-06-12 08:15:33 -06:00
Brian Paul
476685c63c util: additional function pointers 2009-06-12 08:15:33 -06:00
José Fonseca
e3f14f2f3b progs: Port fp programs to GLEW. 2009-06-11 13:19:34 +01:00
Jakob Bornecrantz
283e84bfb3 progs/tests: Add some scissor tests 2009-06-08 14:45:40 +02:00
Keith Whitwell
97f5953ced progs/vpglsl: add similar support for point rendering as progs/vp 2009-06-01 18:40:21 -07:00
Keith Whitwell
00e7a60077 trivial/tri-z: add controls for depthrange min/max
Also add key to set up quake-1 style ztrick rendering with clear depth
1.0, deptrange(1.0, 0.0) and depthfunc GL_GREATER.
2009-06-01 18:39:58 -07:00
José Fonseca
3c756ed39f progs/wgl: Small cleanup to wglinfo. 2009-06-01 18:23:20 -07:00
José Fonseca
76ad2b4a5a progs/wgl: Use an invisible window in wglinfo. 2009-06-01 18:23:20 -07:00
Brian Paul
a5d033e89b demos: add missing dependencies for util files 2009-06-01 11:23:39 -06:00
Brian Paul
58fadc6242 demos: fix multitex.c VertCoord attribute mapping
If the multitex.vert shader uses the VertCoord generic vertex attribute
instead of the pre-defined gl_Vertex attribute, we need to make sure that
VertCoord gets bound to generic vertex attribute zero.

That's because we need to call glVertexAttrib2fv(0, xy) after all the other
vertex attributes have been set since setting generic attribute 0 triggers
vertex submission.  Before, we wound up issuing the vertex attributes in
the order 0, 1, 2 which caused the first vertex to be submitted before all
the attributes were set.  Now, the attributes are set in 1, 2, 0 order.
2009-05-22 13:00:49 -06:00