Results 1 to 8 of 8

Thread: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

  1. #1

    OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Updated:
    - dxRotatef
    - dxTranslatef
    - dxuLookAt
    - dxMatrixMode
    - dxLoadIdentity
    - dxuPerspective
    - dxClearColor
    - dxClear
    - dxDisable
    - dxEnable
    - dxBegin
    - dxTexCoord2f
    - dxVertex3f
    - dxEnd
    - dxPushMatrix
    - dxPopMatrix
    - dxBindTexture

    new version http://igrodel.ru/opengl_to_directx_01.zip




    Hello!
    I fixed my old D3D example to be more OGL-like:

    Code:
     
    glRotatef(gettickcount/10,0,1,0);
    glTranslatef(-10,0,0);
    becomes
    Code:
    dxRotatef(gettickcount/10,0,1,0);
    dxTranslatef(-10,0,0);
    and this too
    Code:
    dxuLookAt(0, 0, 30,
         0, 0, 0,
         0, 1, 0);
    based on MESA3D source code

    Very basic at the moment. DX and OGL render must be 99..100% identically (http://www.igrodel.ru/tdg3d/OGL-D3D.zip).

    Georgy.

  2. #2

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    thanx for shearing

    while ago i tried to implement gl(Pop/Push)Matrix in Dx but i couldn't

  3. #3

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Quote Originally Posted by virtual
    thanx for shearing

    while ago i tried to implement gl(Pop/Push)Matrix in Dx but i couldn't
    check new version: dxPushMatrix, dxPopMatrix
    http://igrodel.ru/opengl_to_directx_01.zip

  4. #4

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Nice work.

    Allthough I'm not sure how usefull this is. Are there many OpenGL people who want to use DirectX but don't want to learn the API?

    Also, wrapping DirectX up like this is going to affect performance. I'd rather use the API directly to make sure that my game runs as fast as possible.

    Still, I like to see where this is going.

    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    you are certainly right. Code can help quickly understand how to make d3d program. full wrapper will be too difficult to implement. So i have an idea making Direct3D opengl friendly. Also it does not depend on too much code, and can be easily copy'n'pasted by someone to get quick results

    Quote Originally Posted by chronozphere
    Nice work.

    Allthough I'm not sure how usefull this is. Are there many OpenGL people who want to use DirectX but don't want to learn the API?

    Also, wrapping DirectX up like this is going to affect performance. I'd rather use the API directly to make sure that my game runs as fast as possible.

    Still, I like to see where this is going.


  6. #6

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Excellent , the transformation gose easier with dx now



  7. #7

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Anybody interested in this project let me know.

    I have a question about what technology for vertex fetching used more in GL and D3D. Then i can decide using "A" D3D technology to emulate "B" OGL technology. At the moment it is old-known glBegin/glEnd and it's D3D analogue =)


  8. #8

    Re: OpenGL -> Direct3D (directx using GL syntaxis dxRotatef dxTranslatef)

    Have a look at google's attempt: http://code.google.com/p/angleproject/
    They write a lib that works like opengles 2.0 but that calls directx in the background.
    http://3das.noeska.com - create adventure games without programming

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
  •