mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-10 05:49:00 +08:00
Retinal display fix for glview.
This commit is contained in:
parent
e04b1b56d8
commit
b37b7de27c
@ -142,7 +142,9 @@ bool LinkShader(GLuint &prog, GLuint &vertShader, GLuint &fragShader) {
|
||||
|
||||
void reshapeFunc(GLFWwindow *window, int w, int h) {
|
||||
(void)window;
|
||||
glViewport(0, 0, w, h);
|
||||
int fb_w, fb_h;
|
||||
glfwGetFramebufferSize(window, &fb_w, &fb_h);
|
||||
glViewport(0, 0, fb_w, fb_h);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(45.0, (float)w / (float)h, 0.1f, 1000.0f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user