dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

SDL

 
dev.gamez.lv Forum Index -> Iesācējiem
View previous topic :: View next topic  
Author Message
skoda



Joined: 07 Nov 2006
Posts: 7

PostPosted: Wed Jul 30, 2008 10:30 pm    Post subject: SDL

esmu ieladējis bildi ar SDL palīdzību, melns logs atveras viss notiek, tik to bildi nevar redzēt. no programmas mani uzreiz izmet arā. Kā var apturēt to programmu, lai varetu redzēt bildi?
Back to top
View user's profile
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Wed Jul 30, 2008 11:08 pm    Post subject:

Es ceru, ka tu saproti, ka ielādēto bildi arī ir jāuzzīmē uz ekrāna, lai to parādītu. Citādi melns ekrāns ir viss, ko dabūsi.

A bet lai neaizvērtu aplikāciju uzreiz ciet, tad pagaidi, piemēram, klaviatūras pogas nospiedienu. T.i. uztaisi "mūžīgo" ciklu (while (true)), kurā gadi SDL eventu (SDL_WaitEvent), un ja tas ir klaviatūras pogas nospiediens (event.type == SDL_KEYDOWN), tad izej no cikla ārā (break).
Back to top
View user's profile Send e-mail
skoda



Joined: 07 Nov 2006
Posts: 7

PostPosted: Thu Jul 31, 2008 5:59 am    Post subject:

skaidrs, mazliet velāk pamēģināšu. paldies.
Back to top
View user's profile
Display posts from previous:   
dev.gamez.lv Forum Index -> Iesācējiem All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group