MCPcopy Create free account
hub / github.com/android/ndk-samples / resize

Method resize

gles3jni/app/src/main/cpp/gles3jni.cpp:132–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130Renderer::~Renderer() {}
131
132void Renderer::resize(int w, int h) {
133 auto offsets = mapOffsetBuf();
134 calcSceneParams(w, h, offsets);
135 unmapOffsetBuf();
136
137 // Auto gives a signed int :-(
138 for (auto i = (unsigned)0; i < mNumInstances; i++) {
139 mAngles[i] = drand48() * TWO_PI;
140 mAngularVelocity[i] = MAX_ROT_SPEED * (2.0 * drand48() - 1.0);
141 }
142
143 mLastFrameNs = 0;
144
145 glViewport(0, 0, w, h);
146}
147
148void Renderer::calcSceneParams(unsigned int w, unsigned int h, float* offsets) {
149 // number of cells along the larger screen dimension

Callers 15

NDKCameraMethod · 0.45
~NDKCameraMethod · 0.45
NDKCameraMethod · 0.45
~NDKCameraMethod · 0.45
ResizeFunction · 0.45
LoadBinaryFileToVectorFunction · 0.45
createUniformBuffersMethod · 0.45
createDescriptorSetsMethod · 0.45
querySwapChainSupportMethod · 0.45
createSwapChainMethod · 0.45
createImageViewsMethod · 0.45
createFramebuffersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected