Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Supporting both DirectX and Opengl

  1. #11

    Supporting both DirectX and Opengl

    OK, managed to fix problem 1, which is the perspective matrix.

    I had to basically throw away the helper libraries for both API's and write my own

    The second problem (the triangle verticies being ina differnt order) is fixed as well. Turns out I forgot that the glColor call needs to be before the glVertex call in Opengl.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #12

    Supporting both DirectX and Opengl

    Made some good progress with the engine over the last few days. I have implemented transforms and rotations and I now have a spinning cube and triangle. OK, it's not a great engine at the moment, but it works in DirectX and Opengl without any code changes to my test app.

    So it can be done people. I'm going to try and get some texture and shader stuff done over the next week or so.

    Customary screen shots for those that are interested.

    Opengl




    DirectX




    BTW - I'm using SDL as the window manager and input manager at the moment, DirectX 9 works very nicely with SDL (as does opengl). I also found TinySDGL as well, which I might use for a software renderer . TinyGL might be a good thing for people working on mobile games with FPC as it implements a basic opengl layer (including vertex arrays) and does all the rendering in software. it's quite quick too. It's in C so you either need a dll or convert it to pascal. :cry:
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #13

    Supporting both DirectX and Opengl

    NICE! From Oz.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 2 of 2 FirstFirst 12

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
  •