mosra on next
SceneTools: use the fancier mem… GL: expose Buffer::data()/subDa… DebugTools: make bufferData()/b… and 7 more (compare)
mosra on next
SceneTools: use the fancier mem… GL: expose Buffer::data()/subDa… DebugTools: make bufferData()/b… and 7 more (compare)
mosra on next
SceneTools: no need to preserve… SceneTools: use the fancier mem… GL: expose Buffer::data()/subDa… and 8 more (compare)
mosra on next
Fix a non-deprecated build on M… SceneTools: mark everything her… Math: fixed incorrectly copypas… and 13 more (compare)
mosra on master
Prefer CORRADE_TARGET_* instead… player: use GltfImporter instea… player: don't use deprecated fu… (compare)
mosra on master
Fix tiny english issue in featu… doc: updated credits and change… (compare)
AspectRatioPolicy
in SceneGraph::Camera
is hardcoded with default ::NotPreserved
value, is this by design? Would be nice to get it as parameter or maybe configurable global default
SceneGraph::Camera::_rawProjectionMatrix
declared here is redunant? Since this is the only usage of it as rhs, it can be replaced with original SceneGraph::Camera::_projectionMatrix
, making SceneGraph::Camera::fixAspectRatio
modify the value directly. Correct me if I'm wrong
Would be nice to get it as parameter
you mean setAspectRatioPolicy(AspectRatioPolicy)? :) if you want to have a global configurable default, easiest is to create your own subclass (you wouldn't believe how painful mutable globals sometimes are, which is why i tend to avoid them)
_rawProjectionMatrix
is there because if you call the setAspectRatioPolicy()
or setViewport()
, it "bakes" _projectionMatrix
from the raw one and the aspect ratio correction, and on a subsequent call it would have no way to know what the original ("raw") projection was to correct it again
ah well, i don't know ... so it's any call to mapForDraw() that breaks it and if it's not there it works?
even the implicit
.mapForDraw({{Shaders::Phong::ColorOutput, GL::Framebuffer::ColorAttachment{0}});
with no other attachment breaks it?
Yes. I'm experimenting a bit, and yes. Even with only Color output in both Framebuffer and Phong shader output all black!
_color.setStorage(GL::RenderbufferFormat::RGBA8, GL::defaultFramebuffer.viewport().size());
then all rendering becomes black. Even if I delete all the mapForDraw
, blit
and other framebuffer setup code. I keep only the GL::defaultFramebuffer
, untouched, as it comes from the main
.
GL::defaultFramebuffer
, it binds framebuffer with ID 0 instead of the actual custom framebuffer object iOS uses by default
GL::defaultFramebuffer
GLint iosDefaultFramebufferId; // do this as the first thing ever
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &iosDefaultFramebufferId);
GL::Framebuffer iosDefaultFramebuffer = GL::Framebuffer::wrap(iosDefaultFramebufferId, GL::defaultFramebuffer.viewport());
could get you the iOS default framebuffer (which you then use in place of GL::defaultFramebuffer
everywhere), but then (according to the messages from back then) you also need to query the original renderbuffer and then rebind it right before a buffer swap:GLint iosDefaultRenderbufferId; // also as the first thing ever
glGetIntegerv(GL_RENDERBUFFER_BINDING, &iosDefaultRenderbufferId);
// right before a buffer swap
glBindRenderbuffer(GL_RENDERBUFFER, iosDefaultRenderbuffer);
// so the state tracker doesn't think some other renderbuffer is still bound
GL::Context::current().resetState(GL::Context::State::Framebuffer);
swapBuffers();
SDL_CreateWindow
@FoNz80555345_twitter which of the two snippets were needed, after all? both or just the renderbuffer part?
I replaced the GL::defaultFramebuffer
with myOwnDefaultFramebuffer
(which I obtained through GL::Framebuffer::wrap
function, giving the ID of the framebuffer obtained through glGetIntegerv
) everywhere for iOS and Simulator. Also, I needed to also do:
glBindRenderbuffer(GL_RENDERBUFFER, myOwnDefaultRenderbuffer);
GL::Context::current().resetState(GL::Context::State::Framebuffer);
Right after switching to the "default" framebuffer. Without this, it doesn't work, even if I bind the "default" framebuffer.