Skip to content

Instantly share code, notes, and snippets.

@attilaz
attilaz / gist:04beb4319061b371fd32
Created March 2, 2015 14:35
combo horizontal layout bug
if (ImGui::CollapsingHeader("Horizontal Layout"))
{
// Text
ImGui::Text("Hello");
ImGui::SameLine();
ImGui::Text("World");
// Button
if (ImGui::Button("Banana")) printf("Pressed!\n");
ImGui::SameLine();
@attilaz
attilaz / gist:78bfe8fa093dd128ad9d
Created February 11, 2015 15:14
renderergl_hack.cpp
void ProgramGL::bindAttributes(const VertexDecl& _vertexDecl, uint32_t _baseVertex) const
{
for (uint32_t ii = 0; ii < 15; ++ii)
GL_CHECK(glDisableVertexAttribArray(ii) );
for (uint32_t ii = 0; Attrib::Count != m_used[ii]; ++ii)
{
Attrib::Enum attr = Attrib::Enum(m_used[ii]);
GLint loc = m_attributes[attr];
@attilaz
attilaz / gist:f079dd520b6eb1681f9e
Created February 6, 2015 08:06
Bgfx render problem
/*
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include "common.h"
#include "bgfx_utils.h"
struct PosColorVertex
{
@attilaz
attilaz / gist:25e71ebda916dd2732ae
Created February 5, 2015 13:03
Bgfx Rendering problem
/*
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include "common.h"
#include "bgfx_utils.h"
struct PosColorVertex
{
@attilaz
attilaz / gist:caf77e1b0e1b0a1fbcd0
Last active August 29, 2015 14:14
Bgfx dynamic index/vertex buffer problem (modified cubes.cpp)
/*
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include "common.h"
#include "bgfx_utils.h"
struct PosColorVertex
{