@@ -271,7 +271,7 @@ roommatrix_build_lightmap(RoomMatrix *matrix, Camera *camera)
271271
272272 /* Render spaces light value to lightmap texture */
273273 SDL_SetRenderTarget (camera -> renderer , matrix -> lightmap -> texture );
274- SDL_SetRenderDrawColor (camera -> renderer , 0 , 0 , 0 , 0 );
274+ SDL_SetRenderDrawColor (camera -> renderer , 0 , 0 , 0 , SDL_ALPHA_TRANSPARENT );
275275 SDL_RenderClear (camera -> renderer );
276276 for (i = 0 ; i < MAP_ROOM_WIDTH ; ++ i ) {
277277 for (j = 0 ; j < MAP_ROOM_HEIGHT ; ++ j ) {
@@ -280,7 +280,6 @@ roommatrix_build_lightmap(RoomMatrix *matrix, Camera *camera)
280280 SDL_RenderPoint (camera -> renderer , (float ) i , (float ) j );
281281 }
282282 }
283- SDL_RenderPresent (camera -> renderer );
284283 SDL_SetRenderTarget (camera -> renderer , NULL );
285284}
286285
@@ -306,7 +305,6 @@ roommatrix_render_lightmap(RoomMatrix *matrix, Camera *cam)
306305 SDL_Rect dst_rect = { 0 , 0 , GAME_VIEW_WIDTH , GAME_VIEW_HEIGHT };
307306
308307 texture_render_clip (matrix -> lightmap , & dst_rect , & src_rect , cam );
309- texture_render (matrix -> lightmap , & src_rect , cam );
310308}
311309
312310RoomSpace *
0 commit comments