Skip to content

Use single buffer for all render class instances#429

Merged
oitel merged 7 commits intomasterfrom
single_render_buffer
Aug 30, 2022
Merged

Use single buffer for all render class instances#429
oitel merged 7 commits intomasterfrom
single_render_buffer

Conversation

@oitel
Copy link
Contributor

@oitel oitel commented Aug 29, 2022

No description provided.

@oitel oitel requested a review from Grantim August 30, 2022 04:58
@oitel oitel force-pushed the single_render_buffer branch from f6389a1 to f3fe17e Compare August 30, 2022 09:35
// This class holds all shaders that are used in the program
// creates shader on access if it is needed
class ShadersHolder
class GLStaticHolder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update comment about this class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also please add

using ShadersHolder [[deprecated]] = GLStaticHolder;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Comment on lines +1246 to +1247
static RenderObjectBuffer glBuffer;
return glBuffer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let it be member of GLStaticHolder and

    return instance_().glBuffer_;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

// provides shared buffer for loading different types of data to GL memory
class RenderObjectBuffer
{
friend class GLStaticHolder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why friend class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make the constructor private.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@oitel oitel merged commit e73145a into master Aug 30, 2022
@oitel oitel deleted the single_render_buffer branch August 30, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants