Results 1 to 10 of 45

Thread: ZenGL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by dazappa
    Aha! Yes I guess I should have expected the image to be critical.
    Yeah, fillrate is very critical

    Quote Originally Posted by dazappa
    The particles demo has a warning not to use it in the source, but it seems to have run just fine for me!
    Particles subsystem is not ready for simple use... all parameters are set by code, and there is no emitter manager in ZenGL for now.
    Last edited by Andru; 12-11-2010 at 07:12 AM.

  2. #2
    Currently playing around with point in poly (which seems to work), but I am very confused with mouse_x()/y() and mouse_dx()/dy().

    Here's a scenario:
    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_x())+','+u_inttostr(mouse_y()));
    The mouse coords initialize to where the mouse was when the game was launched, but never update after.

    Code:
    if(col2d_PointInTriangle(mouse_DX(),mouse_DY(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
    Coords output are changing as I move the mouse, but still no collision response.

    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    No collision response

    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
    For some reason this works the way I want it to.

    Anyway, I can't really find docs anywhere so I'm a bit confused about their behaviors, but at least I got it working the way I wanted after some very random guessing.

  3. #3
    The mouse coords initialize to where the mouse was when the game was launched, but never update after.
    Did you watch this demo - "02 - Input"? There are few lines of code in function Timer(at end of it) that very important:
    Code:
      // EN: Necessarily clear all the states.
      key_ClearState();
      mouse_ClearState();
      joy_ClearState();
    Last edited by Andru; 12-11-2010 at 07:14 PM.

  4. #4
    I guess I had misunderstood its function based on the source. I thought it only cleared button states, at any rate it works nicely with mouse_clearState.

  5. #5
    Quote Originally Posted by dazappa
    I thought it only cleared button states
    Under Windows it also clearing yet another state, because WinAPI GetCursorPos is slow function, and ZenGL call it only one time per iteration.

  6. #6
    New font generator have just released Here the source code of it. Just create directory "tools" in ZenGL directory and unpack archive there. After you can compile it with Lazarus 0.9.29. Little bit later I will provide GNU/Linux and Windows binary archives, because now I want to sleep
    Last edited by Andru; 14-11-2010 at 10:31 AM.

  7. #7
    Fantastic Project. What about shader?

    Thanks
    Sesilla

  8. #8
    this framework looks elegant , thanks for sharing
    but i was hoping that the bin directory is full of exe

  9. #9
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Thank you so much for the font creator. I'm just curious: but could I use some of your audio and font code in Prometheus? (along with the editor?).

    Just a thought, since I can see this speeding up development and making it easier to use. Perhaps even a chance for easy porting from Prometheus to ZenGl if projects get serious even...

    cheers,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

Tags for this Thread

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
  •