DI-Guy SDK Documentation  13.8
diguyOglGraphicsInstanceGroup.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
8 // needed for function prototypes
9 #include <GL/glew.h>
10 #include <GL/gl.h>
11 
13 
21 {
22 public:
23  diguyOglGraphicsInstanceGroup(void* internal_data);
24 
25  virtual void build() override;
26  virtual void unbuild() override;
27 
28  virtual int bind_instance_group_data(int base_start, int link_start, int count) override;
29  virtual int bind_instance_buffer_data(int num_floats, const float* instance_data) override;
30 
31 protected:
32  void create_link_matrices_tbo(int num_floats);
34 
36  static GLuint s_link_matrices_buffer;
37  static GLuint s_link_matrices_tbo;
38 };
39 
40 
47 
virtual int bind_instance_group_data(int base_start, int link_start, int count) override
This function will be called by DI-Guy when variables for using the instance data needs to be sent to...
A class that represents an instance group. An instance group is a collection of meshes, attached to shapes, that can be drawn with a single draw call using supplemental instance data information. An instance group can contain segmented meshes or skinned mesh.
Definition: diguyGraphicsInstanceGroup.h:48
void create_link_matrices_tbo(int num_floats)
static GLuint s_link_matrices_tbo
Definition: diguyOglGraphicsInstanceGroup.h:37
static int s_tbo_size_in_floats
Definition: diguyOglGraphicsInstanceGroup.h:35
virtual void build() override
This function will be called by DI-Guy when it is time for a renderer specific instance group to be c...
diguyGraphicsInstanceGroup * diguyOglGraphicsInstanceGroup_create_func(void *internal_data)
Create function declaration.
virtual int bind_instance_buffer_data(int num_floats, const float *instance_data) override
This function will be called by DI-Guy when data for instance groups needs to be sent to the graphics...
virtual void unbuild() override
This function will be called by DI-Guy when it is time for a instance group to be destroyed...
static GLuint s_link_matrices_buffer
Definition: diguyOglGraphicsInstanceGroup.h:36
diguyOglGraphicsInstanceGroup(void *internal_data)
Definition: diguyOglGraphicsInstanceGroup.h:20