| 111 | } |
| 112 | |
| 113 | bool init(int w, int h) |
| 114 | { |
| 115 | if(w) |
| 116 | display_width = w; |
| 117 | if(h) |
| 118 | display_height = h; |
| 119 | |
| 120 | bool createdSurface = createSurface(); |
| 121 | |
| 122 | if(!createdSurface) |
| 123 | return false; |
| 124 | |
| 125 | glViewport(0, 0, display_width, display_height); |
| 126 | |
| 127 | glMatrixMode(GL_PROJECTION); |
| 128 | glOrtho(0, display_width, display_height, 0, -1.0, 1.0); |
| 129 | glMatrixMode(GL_MODELVIEW); |
| 130 | glClearColor(1.0f, 1.0f, 1.0f, 1.0f); |
| 131 | |
| 132 | onInit(); |
| 133 | |
| 134 | return true; |
| 135 | } |
| 136 | |
| 137 | void deinit() |
| 138 | { |
nothing calls this directly
no test coverage detected