Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/Inventor/C/glue/gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ extern "C" {
/* Pre-declare this. Actual definition of struct is hidden in
implementation. Client code must treat structure as opaque. */
typedef struct cc_glglue cc_glglue;
typedef struct cc_glglue_sync_handle * cc_glglue_sync;

/* ********************************************************************** */

Expand Down Expand Up @@ -400,6 +401,15 @@ COIN_DLL_API void cc_glglue_glMultiDrawArraysIndirect(
COIN_DLL_API void cc_glglue_glMultiDrawElementsIndirect(
const cc_glglue * glue, GLenum mode, GLenum type, const GLvoid * indirect,
GLsizei drawcount, GLsizei stride);
COIN_DLL_API cc_glglue_sync cc_glglue_glFenceSync(const cc_glglue * glue,
GLenum condition,
GLbitfield flags);
COIN_DLL_API void cc_glglue_glDeleteSync(const cc_glglue * glue,
cc_glglue_sync sync);
COIN_DLL_API GLenum cc_glglue_glClientWaitSync(const cc_glglue * glue,
cc_glglue_sync sync,
GLbitfield flags,
uint64_t timeout);
COIN_DLL_API void cc_glglue_glDrawRangeElements(const cc_glglue * glue,
GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
COIN_DLL_API void cc_glglue_glArrayElement(const cc_glglue * glue, GLint i);
Expand Down
14 changes: 14 additions & 0 deletions include/Inventor/SoRenderManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ class COIN_DLL_API SoRenderManager {
existing pick buffer.
*/
struct RenderPhaseStatistics {
//! Logical retained commands and physical GL submissions for the frame.
uint64_t semanticDrawCommands = 0;
uint64_t submittedDrawCalls = 0;
uint64_t instancedTriangleBatches = 0;
uint64_t instancedTriangleCommands = 0;
uint64_t instancedLineBatches = 0;
uint64_t instancedLineCommands = 0;
uint64_t selectionTargets = 0;
uint64_t selectionDrawCalls = 0;
uint64_t selectionInstancedBatches = 0;
uint64_t selectionInstancedCommands = 0;
uint64_t pickDrawCalls = 0;
uint64_t pickInstancedBatches = 0;
uint64_t pickInstancedCommands = 0;
uint64_t drawListConstructionNanoseconds = 0;
uint64_t drawListPrimitiveGenerationNanoseconds = 0;
uint64_t drawListGeometryPackingNanoseconds = 0;
Expand Down
29 changes: 29 additions & 0 deletions src/glue/gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,12 @@ glglue_resolve_symbols(cc_glglue * w)
w->glMultiDrawElementsIndirect =
(COIN_PFNGLMULTIDRAWELEMENTSINDIRECTPROC)
cc_glglue_getprocaddress(w, "glMultiDrawElementsIndirect");
w->glFenceSync = (COIN_PFNGLFENCESYNCPROC)
cc_glglue_getprocaddress(w, "glFenceSync");
w->glDeleteSync = (COIN_PFNGLDELETESYNCPROC)
cc_glglue_getprocaddress(w, "glDeleteSync");
w->glClientWaitSync = (COIN_PFNGLCLIENTWAITSYNCPROC)
cc_glglue_getprocaddress(w, "glClientWaitSync");

/* These core framebuffer entry points are not exported by the Windows
OpenGL 1.1 import library. Resolve them through the active context just
Expand Down Expand Up @@ -3810,6 +3816,29 @@ cc_glglue_glDrawElementsInstanced(const cc_glglue * glue,
glue->glDrawElementsInstanced(mode, count, type, indices, instancecount);
}

cc_glglue_sync
cc_glglue_glFenceSync(const cc_glglue * glue,
GLenum condition, GLbitfield flags)
{
assert(glue->glFenceSync);
return glue->glFenceSync(condition, flags);
}

void
cc_glglue_glDeleteSync(const cc_glglue * glue, cc_glglue_sync sync)
{
assert(glue->glDeleteSync);
glue->glDeleteSync(sync);
}

GLenum
cc_glglue_glClientWaitSync(const cc_glglue * glue, cc_glglue_sync sync,
GLbitfield flags, uint64_t timeout)
{
assert(glue->glClientWaitSync);
return glue->glClientWaitSync(sync, flags, timeout);
}

void
cc_glglue_glDrawRangeElements(const cc_glglue * glue,
GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type,
Expand Down
11 changes: 10 additions & 1 deletion src/glue/glp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@

/* ********************************************************************** */

#include <Inventor/system/gl.h>
#include "base/dict.h"
#include <Inventor/C/base/string.h>
#include <Inventor/C/glue/dl.h>
#include <Inventor/C/glue/gl.h>

/* ********************************************************************** */

Expand Down Expand Up @@ -274,6 +274,12 @@ typedef void (APIENTRY * COIN_PFNGLMULTIDRAWARRAYSINDIRECTPROC)(
typedef void (APIENTRY * COIN_PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(
GLenum mode, GLenum type, const GLvoid * indirect, GLsizei drawcount,
GLsizei stride);
typedef cc_glglue_sync (APIENTRY * COIN_PFNGLFENCESYNCPROC)(GLenum condition,
GLbitfield flags);
typedef void (APIENTRY * COIN_PFNGLDELETESYNCPROC)(cc_glglue_sync sync);
typedef GLenum (APIENTRY * COIN_PFNGLCLIENTWAITSYNCPROC)(cc_glglue_sync sync,
GLbitfield flags,
uint64_t timeout);

/* Core framebuffer entry points which are not exported by the Windows
OpenGL 1.1 import library and may be absent from older platform headers. */
Expand Down Expand Up @@ -763,6 +769,9 @@ struct cc_glglue {
COIN_PFNGLBINDBUFFERBASEPROC glBindBufferBase;
COIN_PFNGLMULTIDRAWARRAYSINDIRECTPROC glMultiDrawArraysIndirect;
COIN_PFNGLMULTIDRAWELEMENTSINDIRECTPROC glMultiDrawElementsIndirect;
COIN_PFNGLFENCESYNCPROC glFenceSync;
COIN_PFNGLDELETESYNCPROC glDeleteSync;
COIN_PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
COIN_PFNGLCLEARBUFFERUIVPROC glClearBufferuiv;
COIN_PFNGLCLEARBUFFERFVPROC glClearBufferfv;
COIN_PFNGLUNIFORM1UIPROC glUniform1ui;
Expand Down
Loading