Commit Graph

43 Commits

Author SHA1 Message Date
Robert Osfield
b24353b12c From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute:
$ mkdir build_android_gles1
$ cd build_android_gles1
$ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/
-DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF
$ make
 If all is correct you will have and static OSG inside:
build_android_gles1/bin/ndk/local/armeabi.

- GLES2 is not tested/proved, but I think it could be possible build
it with the correct cmake flags.
- The flag -DJ=2 is used to pass to the ndk-build the number of
processors to speed up the building.
- make install is not yet supported."
2011-03-08 16:35:37 +00:00
Robert Osfield
4b4754c3cf Implementated experimental reuse of PBO's after download 2011-02-07 14:19:58 +00:00
Robert Osfield
abea92ee91 From Mathias Froehlich, build fixes 2011-01-24 21:12:25 +00:00
Robert Osfield
65f95fe3fe Added methods for checking sizes of various buffer object/texture object pool sizes. 2010-12-14 19:29:01 +00:00
Robert Osfield
543b2ee56e Added resizeGLObjectBuffers(uint) and relaseGLObjects(State*) to BufferData. 2010-12-13 17:09:31 +00:00
Robert Osfield
60457486b0 From Wang Rui, Compile fixes 2010-11-30 08:12:06 +00:00
Robert Osfield
e5a9eaa711 From Tim Moore, "Here is initial support for uniform buffer objects. The binding between a buffer object and an indexed target is implemented as a new StateAttribute, UniformBufferBinding. I've included an example program based on the code in the ARB_uniform_buffer_object specification.
A few things remain to do:
* The binding between a uniform block in a shader program and a buffer indexed target number is fixed, like a vertex attribute binding. This is too restrictive because that binding can be changed without relinking the program. This mapping should be done by name in the same way that uniform values are handled i.e., like a pseudo state attribute;

* There's no direct way yet to query for the offset of uniforms in uniform block, so only the std140 layout is really usable. A helper class that implemented the std140 rules would be quite helpful for setting up uniform blocks without having to link a program first;

* There's no direct support for querying parameters such as the maximum block length, minimum offset alignment, etc. Having that information available outside of the draw thread would make certain instancing techniques easier to implement."
2010-11-29 17:43:27 +00:00
Robert Osfield
7ef776ec5f Fixed warnings 2010-04-30 19:41:24 +00:00
Robert Osfield
a6c7fee246 From Alok Priyadarshi, "1. Replaced APIENTRY to GL_APIENTRY which is used by OpenGL ES
headers. For desktop GL GL_APIENTRY has been defined as APIENTRY."
2010-04-28 21:22:44 +00:00
Robert Osfield
c69ddd6bd5 Added BufferData::ModifiedCallback to provide a mechanism for tracking when a osg::Image::dirty() has been called to signify that an image has been modified. 2010-04-13 18:42:58 +00:00
Robert Osfield
8541761fe7 For backwards compatiblity add a staic void BufferObject::deleteBufferObject(unsigned int contextID,GLuint globj) method. 2010-01-13 18:46:52 +00:00
Robert Osfield
6ebeff658a Implement deleteAllTextureObject/BufferObjects functionality.
Cleaned up warnings.
2009-11-27 11:43:18 +00:00
Robert Osfield
ab8d93a181 Introduced preliminary osg::deleteAllGLObjects() and osg::discardAllGLObjects() functions and associated support into Texture and BufferObjects 2009-11-26 12:33:07 +00:00
Robert Osfield
ae7dfc5796 Fixed warnigns 2009-10-07 09:39:45 +00:00
Robert Osfield
69557c060b Fixed the TextureObject's + GLBufferObject reassignment to a new set.
Disabled the unref after apply for a Texture classes when the texture pool is enabled
2009-10-06 13:42:12 +00:00
Robert Osfield
5d3b8fe2b0 Added missing export 2009-10-04 08:52:01 +00:00
Robert Osfield
32b21dbb89 Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject. 2009-10-03 09:25:23 +00:00
Robert Osfield
f75013d534 Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects 2009-10-01 20:19:42 +00:00
Robert Osfield
f2c1a3ea8a From Art Tevs, "here is a submission of an additional class of PixelBufferObejct, which implements more general way of handling with PBOs. Current osg implementation of PBO does use an attached osg::Image to copy data from. This is somehow only one way of using it and doesn't provide full functionality of PBOs.
--------------------------------------------
Descripton:

The patch does provide a new class PixelDataBufferObject which is capable of allocating memory on the GPU side (PBO memory) of arbitrary size. The memory can then further be used to be enabled into read mode (GL_PIXEL_UNPACK_BUFFER_ARB) or in write mode (GL_PIXEL_PACK_BUFFER_ARB). Enabling the buffer into write mode will force the driver to write data from bounded textures into that buffer (i.e. glGetTexImage). Using buffer in read mode give you the possibility to read data from the buffer into a texture with e.g. glTexSubImage or other instuctions. Hence no data is copied over the CPU (host memory), all the operations are done in the GPU memory.


--------------------------------------------
Compatibility:

The new class require the unbindBuffer method from the base class BufferObject to be virtual, which shouldn't break any functionality of already existing classes. Except of this the new class is fully orthogonal to existing one, hence can be safely added into already existing osg system.

--------------------------------------------
Testing:

The new class was tested in the current svn version of osgPPU. I am using the new class to copy data from textures into the PBO and hence provide them to CUDA kernels. Also reading the results back from CUDA is implemented using the provided patch. The given patch gives a possibility of easy interoperability between CUDA and osg (osgPPU ;) )


--------------------------------------------
I think in general it is a better way to derive the PixelBufferObject class from PixelDataBufferObject, since the second one is a generalization of the first one. However this could break the current functionality, hence I haven't implemented it in such a way. However I would push that on a stack of wished osg 3.x features, since this will reflect the OpenGL PBO functionality through the classes better.
"
2008-12-01 13:28:13 +00:00
Robert Osfield
a88567a852 Added #define's for PixelBufferObject extensions.
Added docs for Camera::DrawCallback
2008-05-24 11:05:10 +00:00
Robert Osfield
ff565128af Introduced new osg::discardDeletedOpenGLObjects() methods, and usage of it in
GrpahicsContext::close() to handle cases where deletingOpenGLObjects is no possible,
such as when GraphicsWindowEmbedded is used.
2008-01-08 13:24:29 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
691a49d0fa From Paul Melis, fixes to spelling mistakes/typos. 2007-07-11 15:51:17 +00:00
Robert Osfield
aee902720e Added s/getUsage() method 2007-06-30 14:30:44 +00:00
Robert Osfield
eac3dc1963 From Paul Melis, "Here is a list of fixes to misspelled APIs. Unfortunately, more than one
of these are public APIs and therefore will break linkage to existing
shared libraries."

Note from Robert Osfield, updated wrappers.
2007-06-27 20:36:16 +00:00
Robert Osfield
c7fc2e018e From Andre Garneau, warnings fixes fo VC++ 2007-05-17 10:59:05 +00:00
Robert Osfield
859bcf3c4b Further perfomrmance optimizations and clean up on new VBO/EBO/PBO API. 2007-05-01 18:03:32 +00:00
Robert Osfield
40db1a8934 Moved VBO switching code into inline methods into osg::State to speed performance 2007-05-01 06:28:20 +00:00
Robert Osfield
d625a5e114 Implementated new dirty buffer mechansim for BufferObjects to make it more efficient 2007-04-30 12:18:27 +00:00
Robert Osfield
921eb0fdd0 Further work on new VertexBufferObject/ElementsBufferObject support 2007-04-29 08:12:29 +00:00
Robert Osfield
a3e6d8283d Further work VertexBufferObject and ElementsBufferObject classes 2007-04-26 16:50:06 +00:00
Robert Osfield
4b71e3948b Added VertexBufferObject and ElementBufferObject class interfaces, and wired
up osg::Array and osg::DrawElements* to these respectively.

Updated wrappers
2007-04-25 18:50:11 +00:00
Robert Osfield
538a83dad4 Added support for flushing buffer objects 2007-04-04 09:07:46 +00:00
Robert Osfield
0900857333 From Farshid Lashkari,
"I was experiencing hard crashes of my application when using PBO's on
machines that don't support PBO's. I think osg incorrectly checks if
PBO's are supported.

I added a new method to the BufferObject::Extensions class which
returns if the "GL_ARB_pixel_buffer_object" string is supported. This
fixes the problem on my end. Machines without PBO support will
continue to work and machines with PBO support will still be able to
use it."
2006-08-25 08:48:16 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
a1bda0dab8 Added support for per context extension string.
Note, this required adding a unsigned int context ID to the osg::isGLUExtensionSupported(,)
and osg::isGLExtensionSupported(,) functions.  This may require reimplementation
of end user code to accomodate the new calling convention.
2005-04-26 13:15:27 +00:00
Robert Osfield
af70cd8801 Removed unusaged methods 2005-04-22 14:40:22 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +00:00
Robert Osfield
4fec031e6c Moved #include <osg/State> from header into .cpp to clean up build. 2005-04-11 15:17:24 +00:00
Robert Osfield
d006ce627f From Olaf Flebbe, removed supporios BufferObject:: 2005-04-07 20:28:36 +00:00
Robert Osfield
355ee7a785 Put pixel buffer define's into their own block. 2005-02-10 20:14:22 +00:00
Robert Osfield
117c791a3b Added osg::BufferObject and a made a number associated to accomodate this
new class. osg::BufferObject wraps up OpenGL pixel and array buffer objects.
Currently implementation is work in progress.
2005-02-09 10:39:45 +00:00