<commit_before>
#include "CIndexBuffer.h"

#include <glad/glad.h>


namespace ion
{
	namespace Graphics
	{
		namespace GL
		{

			void CIndexBuffer::UploadData(void const * Data, size_t const Elements, EValueType const ValueType)
			{
				CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, Handle));
				CheckedGLCall(glBufferData(GL_ELEMENT_ARRAY_BUFFER, Elements * GetValueTypeSize(ValueType), Data, GL_STATIC_DRAW));
				CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
			}

		}
	}
}<commit_msg>Fix bug where uninitialized index buffers still wouldn't work after initialization<commit_after>
#include "CIndexBuffer.h"

#include <glad/glad.h>


namespace ion
{
	namespace Graphics
	{
		namespace GL
		{

			void CIndexBuffer::UploadData(void const * Data, size_t const Elements, EValueType const ValueType)
			{
				CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, Handle));
				CheckedGLCall(glBufferData(GL_ELEMENT_ARRAY_BUFFER, Elements * GetValueTypeSize(ValueType), Data, GL_STATIC_DRAW));
				CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
				Size = Elements;
			}

		}
	}
}
{'fraction_non_alphanumeric': 0.09312839059674503, 'fraction_numerical': 0.0018083182640144665, 'mean_word_length': 5.436046511627907, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6176442', 'n_tokens_mistral': 422, 'n_tokens_neox': 364, 'n_words': 72}