Commit Graph

7 Commits

Author SHA1 Message Date
Elias Naur 7c6511cf66 Added support for non-direct buffers for all functions that doesn't cache the buffer address at the native side (e.g. glVertexPointer). Reasons:
1. We can now support calls like "glLight(..., ..., FloatBuffer.wrap(new float[] {...}));" without worrying about running out of direct memory heap, 
since both the FloatBuffer and the array are allocated on the java heap. Future JVMs with stack allocation support could improve this even further.
2. We avoid getting in the way of users that doesn't (yet) know why direct buffers are important.

Obviously, we'd like direct support for arrays, but non-direct buffers are a nice compromise that avoids the API bloat that results when almost all 
functions gain an overloaded versions that take arrays instead of buffers.

Notes:

1. Non-direct buffer support should not affect the performance in the direct buffer case, since the non-direct buffer code path is only activated 
when the isDirect() check fails, and we were already checking isDirect() for sanity checking.
2. When using non-direct buffers, the buffer contents (remaining() bytes) are copied to a resizable ThreadLocal cached direct buffer (which is 
resized as needed) and used instead of the non-direct buffer. Thus, performance of non-direct buffers is lower than direct buffers.
2007-04-11 17:30:13 +00:00
Brian Matzon 8a3bee6b1c applied patch to move ID tag 2006-03-23 19:32:21 +00:00
Elias Naur 4636c4b251 Added the opengl-template-pattern ant property to control the set of included opengl extensions 2005-09-29 18:12:20 +00:00
Elias Naur df2bc7d7e0 Moved generated files to seperate directories 2005-09-29 17:13:38 +00:00
Elias Naur fecbafc097 Don't emit initNativeStub() when generating context-specific OpenGL java classes 2005-04-04 11:19:18 +00:00
Elias Naur 87bf14c698 Implemented strong references in glVertexPointer and friends 2005-03-21 08:27:45 +00:00
Caspian Rychlik-Prince 39694b9780 Moved generator to util packages 2005-02-20 19:28:34 +00:00
Renamed from src/java/org/lwjgl/generator/GeneratorVisitor.java (Browse further)