Results 1 to 10 of 39

Thread: Hadron Game Engine

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #36

    Cool

    Hi all,
    I thought I'd let you know I have now joined forces with Jarrod so I can help him with the development of HGE!

    I have a video to share of a new addition to HGE that I have added and should be available in the next version:



    I have added to HGE the capability to do OpenGL-like graphics now using these routines:

    Code:
    RenderDevice_BeginPrimitive: procedure(aPrimitiveType: Integer; aRenderState: Integer; aTexture: Integer); stdcall;
    RenderDevice_Color4f: procedure(r,g,b,a: Single); stdcall;
    RenderDevice_Color4ub: procedure(r,g,b,a: Integer); stdcall;
    RenderDevice_Texcoord2f: procedure(aX,aY: Single); stdcall;
    RenderDevice_Vertex2f: procedure(aX,aY: Single); stdcall;
    RenderDevice_EndPrimitive: procedure; stdcall;
    It opens up the posibilites for neat effects using HGE

    I have tested all but the Texturing part, but in theory that should work too

    An example bit of code is here which draws 10 triangles with 2 random coloured vertices:

    Code:
      if ExampleIndex = 4 then
      begin
        RenderDevice_BeginPrimitive(ptTriangleList,rsImage  ,0);
    
        for i := 1 to 10 do
        begin
          RenderDevice_Color4f(Random,Random,Random,Random);
          RenderDevice_Vertex2f(Random(w),Random(h));
          RenderDevice_Color4f(Random,Random,Random,1);
          RenderDevice_Vertex2f(Random(w),Random(h));
          RenderDevice_Vertex2f(Random(w),Random(h));
        end;
    
        RenderDevice_EndPrimitive;
      end
    cheers,
    Paul
    Last edited by paul_nicholls; 12-10-2010 at 10:33 AM.

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
  •