openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

[ios simulator] - setupScreenPerspective failing with a NaN

Open dimitre opened this issue 1 year ago • 1 comments

it seems a variable called float aspect becomes a NaN after a division by zero it seems this piece of code is returning some weird values (probably uninitialized memory) on simulator

ofRectangle ofGLRenderer::getNativeViewport() const {
	GLint viewport[4]; // Where The Viewport Values Will Be Stored
	glGetIntegerv(GL_VIEWPORT, viewport);
Screenshot 2024-09-07 at 11 53 12

it seems glGetIntegerv(GL_VIEWPORT, viewport); and it is not changing values in array returning one arbitrary rectangle

steps to reproduce: just test an empty project on simulator

dimitre avatar Sep 07 '24 15:09 dimitre

Emulator maybe need to wait till first frame

danoli3 avatar Sep 07 '24 18:09 danoli3