This commit is contained in:
Branimir Karadžić 2017-07-23 21:22:21 -07:00
parent e4147a49be
commit f09c886476

View File

@ -294,7 +294,6 @@ void getPoint(float* _result, Axis::Enum _axis, float _x, float _y)
}
}
#include "vs_debugdraw_lines.bin.h"
#include "fs_debugdraw_lines.bin.h"
#include "vs_debugdraw_lines_stipple.bin.h"
@ -391,36 +390,31 @@ struct DebugDraw
bgfx::RendererType::Enum type = bgfx::getRendererType();
m_program[Program::Lines] =
bgfx::createProgram(
m_program[Program::Lines] = bgfx::createProgram(
bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines")
, bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines")
, true
);
m_program[Program::LinesStipple] =
bgfx::createProgram(
m_program[Program::LinesStipple] = bgfx::createProgram(
bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines_stipple")
, bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines_stipple")
, true
);
m_program[Program::Fill] =
bgfx::createProgram(
m_program[Program::Fill] = bgfx::createProgram(
bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill")
, bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill")
, true
);
m_program[Program::FillLit] =
bgfx::createProgram(
m_program[Program::FillLit] = bgfx::createProgram(
bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_lit")
, bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_lit")
, true
);
m_program[Program::FillTexture] =
bgfx::createProgram(
m_program[Program::FillTexture] = bgfx::createProgram(
bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_texture")
, bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_texture")
, true
@ -455,7 +449,8 @@ struct DebugDraw
trilist[ii] = uint16_t(ii);
}
uint32_t numLineListIndices = bgfx::topologyConvert(bgfx::TopologyConvert::TriListToLineList
uint32_t numLineListIndices = bgfx::topologyConvert(
bgfx::TopologyConvert::TriListToLineList
, NULL
, 0
, trilist
@ -466,7 +461,8 @@ struct DebugDraw
uint16_t* indicesOut = indices[id];
bx::memCopy(indicesOut, trilist, numIndices*sizeof(uint16_t) );
bgfx::topologyConvert(bgfx::TopologyConvert::TriListToLineList
bgfx::topologyConvert(
bgfx::TopologyConvert::TriListToLineList
, &indicesOut[numIndices]
, numLineListIndices*sizeof(uint16_t)
, trilist