Add front camera texture coordinate handling
- Add separate texture coordinates for front and back cameras - Front camera uses mirrored coordinates for natural selfie view - Add setFrontCamera() method to renderer for dynamic switching - Update texture coord buffer on GL thread when camera changes - CameraScreen observes isFrontCamera state to trigger updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a3ce90a2fe
commit
b16dd971f2
2 changed files with 48 additions and 4 deletions
|
|
@ -125,6 +125,12 @@ fun CameraScreen(
|
|||
glSurfaceView?.requestRender()
|
||||
}
|
||||
|
||||
// Update renderer when camera switches (front/back)
|
||||
LaunchedEffect(isFrontCamera) {
|
||||
renderer?.setFrontCamera(isFrontCamera)
|
||||
glSurfaceView?.requestRender()
|
||||
}
|
||||
|
||||
// Start camera when surface texture is available
|
||||
LaunchedEffect(surfaceTexture) {
|
||||
surfaceTexture?.let {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue