Commit Graph

131 Commits

Author SHA1 Message Date
Brian Paul
7b8830d81d mesa: consolidate code in _mesa_update_array_max_element() 2011-04-06 16:52:48 -06:00
Brian Paul
9459cc593c mesa: 80-column wrapping 2011-03-19 14:17:41 -06:00
Ian Romanick
09e15ac76a mesa: Initial size for secondary color array is 3
See table 6.7 on page 347 of the OpenGL 3.0 specification.
2011-01-31 15:32:55 -08:00
Vinson Lee
db61b9ce39 mesa: Directly include mfeatures.h in files that perform feature tests. 2011-01-07 00:13:00 -08:00
Vinson Lee
0117da40cd mesa: Include mtypes.h in files that use gl_context struct.
Directly include mtypes.h if a file uses a gl_context struct. This
allows future removal of headers that are not strictly necessary but
indirectly include mtypes.h for a file.
2011-01-05 23:11:54 -08:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Chia-I Wu
2cf44390d1 mesa: Move src/mesa/glapi/dispatch.h to mesa.
glapi/dispatch.h is a core Mesa header file.  Move the header file to
main/ to make this clear.  It also becomes clear after this change that
IN_DRI_DRIVER is only used in core Mesa to enable the remap table.
2010-02-25 21:32:58 +08:00
Kristian Høgsberg
298be2b028 Replace the _mesa_*printf() wrappers with the plain libc versions 2010-02-19 12:32:24 -05:00
Kristian Høgsberg
32f2fd1c5d Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions 2010-02-19 12:03:01 -05:00
Michal Krol
01d7e3d5a2 mesa: Enable true refcounting for NullBufferObj.
This object can be shared with another context, so we cannot just
delete it when the owning context is being destroyed.

Ensuring that buffer objects are properly refcounted guarantees
NullBufferObj is destroyed when all references to it are removed.
2010-02-09 14:52:52 +01:00
Brian Paul
9342e6f5a9 mesa: implement _mesa_GenVertexArrays() for GL_ARB_vertex_array_object
This also involves adding a gl_array_object::VBOonly field.  For the
ARB extension, all arrays in the object must reside in a VBO.  This flag
keeps track of that requirement.
2009-06-19 18:17:25 -06:00
Brian Paul
b8000c874e mesa: implement _mesa_BindVertexArray() 2009-06-19 18:12:11 -06:00
Brian Paul
12cf98f5fc mesa: move vertex array objects from shared state to per-context
The ARB version requires VAOs to be per-context while the Apple extension
was ambiguous.
2009-06-19 18:11:52 -06:00
Brian Paul
42ae2a8648 mesa: use Elements() macro to limit loops instead of constants 2009-05-22 07:51:13 -06:00
Brian Paul
8fa0cb2b42 mesa: added gl_array_object::Weight array field
We don't really implement vertex weights but in the VBO code this
fixes and odd case for the legacy_array[] setup.  Before, the
vbo->draw_prims() call was always indicating that the vertex weight
array was present/enabled when it really wasn't.
2009-05-21 16:10:45 -06:00
Brian Paul
1889890c88 mesa: check FEATURE_point_size_array for PointSize array 2009-05-21 16:10:45 -06:00
Brian Paul
de1cfc5e8a mesa: new _mesa_update_array_object_max_element() function
This will replace the code in state.c
2009-05-21 16:10:45 -06:00
Brian Paul
fa95ecb467 mesa: make the array object save/remove functions static 2009-05-07 14:34:09 -06:00
Brian Paul
32b851c807 mesa: clean-up vertex array object VBO unbinding and delete/refcounting
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
2009-05-07 14:34:09 -06:00
Brian Paul
1030bf0ded mesa: reference counting for gl_array_object
Every kind of object that can be shared by multiple contexts should be
refcounted.
2009-05-07 14:34:09 -06:00
Brian Paul
4f6b704f97 mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
2009-05-07 14:34:09 -06:00
Brian Paul
9cf594d698 mesa: improve array initialization code, and set the new array->Format field. 2009-01-23 11:25:13 -07:00
Brian Paul
e9b34885b8 mesa: increase max texture image units and GLSL samplers to 16
The max texture coord units is still 8.  All the fixed-function paths are
still limited to 8 too.  But GLSL shaders can use more samplers now.

Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8.  This just simplifies the code in a few
places; the extra elements aren't accessible to the user.

These changes haven't been extensively tested yet, but sanity checking has
been done.

It should be possible to increase the max image units/samplers to 32 without
doing anything special.  Beyond that we'll need longer bitfields in a few
places.
2008-12-31 12:00:17 -07:00
Brian Paul
1cf2c8a043 mesa: point size arrays 2008-09-21 22:13:56 -07:00
Brian Paul
9246c2fad4 mesa: replace MALLOC w/ CALLOC to fix valgrind warning 2008-09-05 08:06:24 -06:00
Brian Paul
37c74af01c mesa: improved gl_buffer_object reference counting
Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.
2008-09-04 14:59:40 -06:00
Brian
c223c6b663 Be more consistant with paths in #includes. Eventually, eliminate a bunch of -I flags. 2007-07-04 13:15:20 -06:00
Keith Whitwell
99efde461d better handling of current attributes. Trivial dlist and varray tests work 2006-10-30 16:44:13 +00:00
Brian Paul
2d77b25c27 minor clean-ups 2006-06-15 15:36:06 +00:00
Brian Paul
48c03d7c9f s/buffer/arrays/ 2006-06-12 20:02:11 +00:00
Ian Romanick
ee34e6ef71 Add support for GL_APPLE_vertex_array_object. Several test programs
and demos are also added.

Adding basic support to drivers should be as easy as just enabling the
extension, though thorough test would also be required.
2006-06-12 16:26:29 +00:00