Posted by
Sven Gothel on
Sep 10, 2012; 12:11am
URL: https://forum.jogamp.org/vbo-DrawArrays-threading-question-tp4026028p4026061.html
On 09/09/2012 03:12 AM, rtayek [via jogamp] wrote:
>>Neither JOGL nor the JVM impose fundamental performance costs on the
>>few GL function calls, as Julien suggested, performance hits are
>>usually due to costly operations for every frame. ~Sven
>
> can you give me some idea of what those "costly" operations might be?
- CPU/GPU memory transfers
- Textures, VBO, ..
- object destruction/creation (OpenGL (textures, VBO, ..), maybe even Java)
- FBO, VBO, ..
- Textures
- Shader Programs
- ..
For example, if you use the GLEventListener model,
one would like to initialize things once in the init method
and release it in destroy.
Display and reshape shall be as cheap as possible,
i.e. (GL) object [re]creation only when necessary.
For example .. if some initialization is really expensive
and has to be done on the fly, it is recommended to use
another thread (e.g. to stream in data) and maybe even a shared context
(to fill a texture object or VBO).
The fact you are using Java or JOGL is irrelevant here.
~Sven