Skip to content

Commit

Permalink
Some attempts at getting the OSX port to work, but no deal.
Browse files Browse the repository at this point in the history
  • Loading branch information
BSVino committed Feb 6, 2016
1 parent e86f4e5 commit ce9c201
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions content/shaders/model.fs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void main()

// Use that as our output color
vecOutputColor = vecFoggedDiffuse;
vecOutputColor.r = 1.0;

if (vecDiffuse.a < 0.01)
discard;
Expand Down
5 changes: 5 additions & 0 deletions renderer/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ CRenderer::CRenderer(size_t iWidth, size_t iHeight)
GLCall(glBindFramebuffer(GL_FRAMEBUFFER, 0));
GLCall(glGetIntegerv(GL_SAMPLES, &m_iScreenSamples));

GLCall(glGenVertexArrays(1, &m_default_vao));
GLCall(glBindVertexArray(m_default_vao));

GLCall(glGenBuffers(1, &m_dynamic_mesh_vbo));

SetSize(iWidth, iHeight);

m_bDrawBackground = true;
Expand Down
3 changes: 3 additions & 0 deletions renderer/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ class CRenderer
Vector2D m_vecFullscreenTexCoords[6];
Vector m_vecFullscreenVertices[6];

uint32_t m_default_vao;
uint32_t m_dynamic_mesh_vbo;

bool m_bDrawBackground;

bool m_bUseMultisampleTextures;
Expand Down
5 changes: 5 additions & 0 deletions renderer/renderingcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,11 @@ void CRenderingContext::EndRender()

oContext.m_bProjectionUpdated = oContext.m_bViewUpdated = oContext.m_bTransformUpdated = true;

GLCall(glBindVertexArray(m_pRenderer->m_default_vao));

GLCall(glBindBuffer(GL_ARRAY_BUFFER, m_pRenderer->m_dynamic_mesh_vbo));
GLCall(glBufferData(GL_ARRAY_BUFFER, GLsizeiptr((size_t)s_avecVertices.size() * sizeof(float)), s_avecVertices.data(), GL_STATIC_DRAW));

if (m_bTexCoord)
{
for (size_t i = 0; i < MAX_TEXTURE_CHANNELS; i++)
Expand Down

0 comments on commit ce9c201

Please sign in to comment.