Lines Matching refs:bgfx

27 			.add(bgfx::Attrib::Position,  3, bgfx::AttribType::Float)  in init()
28 .add(bgfx::Attrib::Normal, 4, bgfx::AttribType::Uint8, true, true) in init()
29 .add(bgfx::Attrib::Tangent, 4, bgfx::AttribType::Uint8, true, true) in init()
30 .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Int16, true, true) in init()
34 static bgfx::VertexLayout ms_layout;
37 bgfx::VertexLayout PosNormalTangentTexcoordVertex::ms_layout;
102 bgfx::Init init; in init()
108 bgfx::init(init); in init()
111 bgfx::setDebug(m_debug); in init()
114 bgfx::setViewClear(0 in init()
122 const bgfx::Caps* caps = bgfx::getCaps(); in init()
136 m_vbh = bgfx::createVertexBuffer( in init()
137 bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) ) in init()
142 m_ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) ); in init()
145 s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Sampler); in init()
146 s_texNormal = bgfx::createUniform("s_texNormal", bgfx::UniformType::Sampler); in init()
149 u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Vec4, m_numLights); in init()
150 u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Vec4, m_numLights); in init()
171 bgfx::destroy(m_ibh); in shutdown()
172 bgfx::destroy(m_vbh); in shutdown()
173 bgfx::destroy(m_program); in shutdown()
174 bgfx::destroy(m_textureColor); in shutdown()
175 bgfx::destroy(m_textureNormal); in shutdown()
176 bgfx::destroy(s_texColor); in shutdown()
177 bgfx::destroy(s_texNormal); in shutdown()
178 bgfx::destroy(u_lightPosRadius); in shutdown()
179 bgfx::destroy(u_lightRgbInnerR); in shutdown()
182 bgfx::shutdown(); in shutdown()
206 bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); in update()
210 bgfx::touch(0); in update()
223 …bx::mtxProj(proj, 60.0f, float(m_width) / float(m_height), 0.1f, 100.0f, bgfx::getCaps()->homogene… in update()
224 bgfx::setViewTransform(0, view, proj); in update()
227 bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); in update()
239 bgfx::setUniform(u_lightPosRadius, lightPosRadius, m_numLights); in update()
249 bgfx::setUniform(u_lightRgbInnerR, lightRgbInnerR, m_numLights); in update()
259 if (numInstances == bgfx::getAvailInstanceDataBuffer(numInstances, instanceStride) ) in update()
261 bgfx::InstanceDataBuffer idb; in update()
262 bgfx::allocInstanceDataBuffer(&idb, numInstances, instanceStride); in update()
278 bgfx::setInstanceDataBuffer(&idb, 0, numInstances); in update()
281 bgfx::setVertexBuffer(0, m_vbh); in update()
282 bgfx::setIndexBuffer(m_ibh); in update()
285 bgfx::setTexture(0, s_texColor, m_textureColor); in update()
286 bgfx::setTexture(1, s_texNormal, m_textureNormal); in update()
289 bgfx::setState(0 in update()
298 bgfx::submit(0, m_program); in update()
315 bgfx::setTransform(mtx); in update()
318 bgfx::setVertexBuffer(0, m_vbh); in update()
319 bgfx::setIndexBuffer(m_ibh); in update()
322 bgfx::setTexture(0, s_texColor, m_textureColor); in update()
323 bgfx::setTexture(1, s_texNormal, m_textureNormal); in update()
326 bgfx::setState(0 in update()
335 bgfx::submit(0, m_program); in update()
342 bgfx::frame(); in update()
352 bgfx::VertexBufferHandle m_vbh;
353 bgfx::IndexBufferHandle m_ibh;
354 bgfx::UniformHandle s_texColor;
355 bgfx::UniformHandle s_texNormal;
356 bgfx::UniformHandle u_lightPosRadius;
357 bgfx::UniformHandle u_lightRgbInnerR;
358 bgfx::ProgramHandle m_program;
359 bgfx::TextureHandle m_textureColor;
360 bgfx::TextureHandle m_textureNormal;