MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / setViewport

Method setViewport

examples/OpenGLWindow/SimpleOpenGL3App.cpp:977–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

975}
976
977void SimpleOpenGL3App::setViewport(int width, int height)
978{
979 m_data->m_customViewPortWidth = width;
980 m_data->m_customViewPortHeight = height;
981 if (width >= 0)
982 {
983 glViewport(0, 0, width, height);
984 }
985 else
986 {
987 glViewport(0, 0, m_window->getRetinaScale() * m_instancingRenderer->getScreenWidth(), m_window->getRetinaScale() * m_instancingRenderer->getScreenHeight());
988 }
989}
990
991void SimpleOpenGL3App::getScreenPixels(unsigned char* rgbaBuffer, int bufferSizeInBytes, float* depthBuffer, int depthBufferSizeInBytes)
992{

Callers 1

copyCameraImageDataMethod · 0.45

Calls 3

getRetinaScaleMethod · 0.45
getScreenWidthMethod · 0.45
getScreenHeightMethod · 0.45

Tested by

no test coverage detected