@@ -61,6 +61,7 @@ static const Vertex vertexes[] = {
6161 * @brief
6262 */
6363static void drawScene (Scene * scene ) {
64+
6465 static float2 angles ;
6566 static Uint64 lastTicks ;
6667
@@ -86,6 +87,7 @@ static void drawScene(Scene *scene) {
8687 float4x4 modelView = float4x4_rotation (angles .x , float3_new (1.f , 0.f , 0.f ));
8788 modelView = float4x4_mul (float4x4_rotation (angles .y , float3_new (0.f , 1.f , 0.f )), modelView );
8889 modelView = float4x4_mul (float4x4_translation (float3_new (0.f , 0.f , -2.5f )), modelView );
90+
8991 const float4x4 projection = float4x4_perspective (45.f , (float ) swapchain .size .w / (float ) swapchain .size .h , 0.01f , 100.f );
9092 const float4x4 modelViewProjection = float4x4_mul (projection , modelView );
9193
@@ -121,7 +123,7 @@ int main(int argc, char **argv) {
121123
122124 GPU_Assert (SDL_Init (SDL_INIT_VIDEO ), "SDL_Init" );
123125
124- SDL_Window * window = SDL_CreateWindow ("ObjectivelyGPU Hello" , 800 , 600 , SDL_WINDOW_HIGH_PIXEL_DENSITY );
126+ SDL_Window * window = SDL_CreateWindow ("Hello ObjectivelyGPU " , 1024 , 720 , SDL_WINDOW_HIGH_PIXEL_DENSITY );
125127 GPU_Assert (window , "SDL_CreateWindow" );
126128
127129 RenderDevice * renderDevice = $ (alloc (RenderDevice ), initWithWindow , window );
0 commit comments