Skip to content
Merged
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
9 changes: 4 additions & 5 deletions include/baregl/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@
#include <baregl/types/ERasterizationMode.h>
#include <baregl/types/ERenderingCapability.h>

#include <string>

namespace baregl
{
/**
* High-level interface for interacting with the OpenGL context.
* Manages BareGL state for the currently active OpenGL context.
*/
class Context final
{
public:
/**
* Initializes the OpenGL context.
* Initializes BareGL for the currently active OpenGL context.
* A valid OpenGL context must already exist and be current on the calling thread.
* @param p_desc Settings to use when creating the context
*/
Context(const baregl::data::ContextDesc& p_desc = {});

/**
* Destructor for the OpenGL context.
* Cleans up BareGL state associated with the current OpenGL context.
*/
~Context();

Expand Down
6 changes: 3 additions & 3 deletions src/baregl/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,18 +290,18 @@ namespace baregl

if (error == 0)
{
BAREGL_LOG_ERROR("GLAD failed to initialize");
BAREGL_LOG_ERROR("GLAD failed to initialize.");
return;
}

BAREGL_LOG_INFO("OpenGL context initialized.");

if (p_desc.debug)
{
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
glDebugMessageCallback(GLDebugMessageCallback, nullptr);
}

BAREGL_LOG_INFO("BareGL context initialized.");
}

Context::~Context()
Expand Down
Loading