Results 1 to 10 of 10

Thread: Only a black window...

  1. #1

    Default Only a black window...

    Hi!
    Sorry, but I am a noob and I have a lot of questions:
    Code:
    		virtual int main(int, char **)
    		{
    			init_modules();
    			initializing();
    			while (running && !CL_Keyboard::get_keycode(CL_KEY_ESCAPE))
    			{
    				paint();
    				window->flip();
    				CL_System::sleep(10);
    				CL_System::keep_alive();
    			}
    			delete_all();
    			deinit_modules();
    			return 0;
    		}
    Initialization etc. are working fine. The image 'bg' is loaded correctly, in init_modules I call the ClanLib init-functions.
    But paint doesn't do anything:
    Code:
    			GR_CO->clear(CL_Color(255, 0, 0, 255));
    
    			GR_CO->draw_rect(CL_Rectf(0, 0, 40, 40), CL_Color(0, 255, 0, 255));
    			bg->draw(10, 10, GR_CO);
    (only experiments, GR_CO is window->get_gc(). )

    I hope you can help me...
    The User
    Last edited by The User; 08-25-2008 at 07:11 PM.

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    window->flip();

    Try CL_Display::flip()

  3. #3

    Default

    Same problem...
    I thaught, CL_Display::flip() calls flip for the active window?

  4. #4
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Does the ClanLib exampels work for you, for instance Basic2D?

  5. #5

    Unhappy

    It does not work.
    I use ClanLib 0.8, Mesa-drivers and OpenSuSE Factory, libjpeg and libpng are installed.

  6. #6

    Default

    Maybe other important dependencies?
    No ideas?

  7. #7
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Does other OpenGL applications/games run ?

  8. #8

    Default

    Yes.
    GLEW and GLEW-devel are installed.

  9. #9

    Default

    Hey, arent't there other important dependencies?
    With strace I get messages like this:
    read(3, 0x80637d4, 4096) = -1 EAGAIN (Resource temporarily unavailable)

  10. #10

    Default

    Sorry, but I have to push this thread.

Similar Threads

  1. Black screen in game
    By Boofo in forum Dungeon Scroll for PC and iPhone
    Replies: 3
    Last Post: 02-02-2013, 10:35 AM
  2. Two apps, one window?
    By stodge in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-28-2007, 06:26 AM
  3. Trying to set the window icon
    By JonR in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 08-09-2007, 08:14 AM
  4. void OnCreate()Black Cat event
    By jjohn in forum Funeral Quest
    Replies: 9
    Last Post: 06-22-2003, 03:17 AM
  5. Game loads but display is all black.
    By diggisaur in forum Other RTsoft Games
    Replies: 6
    Last Post: 03-28-2003, 05:53 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •