#include <OpenGLRendererAPI.h>
Definition at line 9 of file OpenGLRendererAPI.h.
◆ Clear()
| void Elevate::OpenGLRendererAPI::Clear |
( |
| ) |
const |
|
overridevirtual |
◆ ClearTextureBindings()
| void Elevate::OpenGLRendererAPI::ClearTextureBindings |
( |
| ) |
const |
|
overridevirtual |
◆ DrawArray()
Implements Elevate::RendererAPI.
Definition at line 54 of file OpenGLRendererAPI.cpp.
55 {
56 if (!glfwGetCurrentContext()) {
57 EE_CORE_ERROR("No OpenGL context active!");
58 return;
59 }
60
61 if (!vao)
62 {
63 EE_CORE_ERROR("VAO or IndexBuffer is null!");
64 return;
65 }
66
67 vao->Bind();
68
69 if (vao->GetIndexBuffer())
70 {
71 if (vao->GetIndexBuffer()->GetCount() == 0)
72 {
73 EE_CORE_ERROR("IndexBuffer has 0 indices!");
74 return;
75 }
76
78 }
79 else
80 {
81 for (const auto& vbo : vao->GetVertexBuffers())
82 {
83 uint32_t vertexCount = vbo->GetSize() / vbo->GetLayout().GetStride();
85 }
86 }
87 }
GLenum DrawPrimitiveTypeToOpenGL(DrawPrimitiveType type) const
◆ DrawPrimitiveTypeToOpenGL()
Definition at line 12 of file OpenGLRendererAPI.cpp.
13 {
14 switch (type)
15 {
23 default: return GL_TRIANGLES;
24 }
25 return GL_TRIANGLES;
26 }
◆ FlushBuffers()
| void Elevate::OpenGLRendererAPI::FlushBuffers |
( |
| ) |
const |
|
overridevirtual |
◆ SetClearColor()
| void Elevate::OpenGLRendererAPI::SetClearColor |
( |
const glm::vec4 & |
color | ) |
const |
|
overridevirtual |
◆ SetCullingState()
| void Elevate::OpenGLRendererAPI::SetCullingState |
( |
bool |
enabled | ) |
const |
|
overridevirtual |
◆ SetDepthTestingState()
| void Elevate::OpenGLRendererAPI::SetDepthTestingState |
( |
bool |
enabled | ) |
const |
|
overridevirtual |
◆ SetDepthWrittingState()
| void Elevate::OpenGLRendererAPI::SetDepthWrittingState |
( |
bool |
enabled | ) |
const |
|
overridevirtual |
◆ SetViewport()
| void Elevate::OpenGLRendererAPI::SetViewport |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| const |
|
overridevirtual |
The documentation for this class was generated from the following files: