d3dx8_main.c 2.6 KB
Newer Older
Raphael Junqueira's avatar
Raphael Junqueira committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Direct3D X 8 main file
 *
 * Copyright (C) 2002 Raphael Junqueira
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Raphael Junqueira's avatar
Raphael Junqueira committed
19 20 21 22 23 24
 *
 */

#include "config.h"
#include "wine/port.h"

25 26
#include <stdarg.h>

Raphael Junqueira's avatar
Raphael Junqueira committed
27 28 29 30 31 32 33 34 35 36 37 38
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"

#include "d3dx8core.h"
#include "d3dx8core_private.h"


WINE_DEFAULT_DEBUG_CHANNEL(d3d);

39
HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) {
Raphael Junqueira's avatar
Raphael Junqueira committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
  ID3DXBufferImpl *object;

  object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXBufferImpl));
  if (NULL == object) {
    *ppBuffer = (LPD3DXBUFFER)NULL;
    return E_OUTOFMEMORY;
  }
  object->lpVtbl = &D3DXBuffer_Vtbl;
  object->ref = 1;
  object->bufferSize = NumBytes;
  object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes);
  if (NULL == object->buffer) {
    HeapFree(GetProcessHeap(), 0, object);
    *ppBuffer = (LPD3DXBUFFER)NULL;
    return E_OUTOFMEMORY;
  }
  *ppBuffer = (LPD3DXBUFFER)object;
  return D3D_OK;
}

60
HRESULT WINAPI D3DXCreateFont(LPDIRECT3DDEVICE8 pDevice, HFONT hFont, LPD3DXFONT* ppFont) {
Raphael Junqueira's avatar
Raphael Junqueira committed
61 62 63 64
  FIXME("(void): stub\n");
  return D3D_OK;
}

65
UINT WINAPI D3DXGetFVFVertexSize(DWORD FVF) {
Raphael Junqueira's avatar
Raphael Junqueira committed
66 67 68 69
  FIXME("(void): stub\n");
  return 0;
}

70
HRESULT WINAPI D3DXAssembleShader(LPCVOID pSrcData, UINT SrcDataLen, DWORD Flags, 
Raphael Junqueira's avatar
Raphael Junqueira committed
71 72 73 74 75 76 77
			   LPD3DXBUFFER* ppConstants, 
			   LPD3DXBUFFER* ppCompiledShader,
			   LPD3DXBUFFER* ppCompilationErrors) {
  FIXME("(void): stub\n");
  return D3D_OK;
}

78
HRESULT WINAPI D3DXAssembleShaderFromFileA(LPSTR pSrcFile, DWORD Flags,
Raphael Junqueira's avatar
Raphael Junqueira committed
79 80 81 82 83 84 85
				    LPD3DXBUFFER* ppConstants,
				    LPD3DXBUFFER* ppCompiledShader,
				    LPD3DXBUFFER* ppCompilationErrors) {
  FIXME("(void): stub\n");
  return D3D_OK;
}

86
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPSTR pSrcFile, DWORD Flags,
Raphael Junqueira's avatar
Raphael Junqueira committed
87 88 89 90 91 92
				    LPD3DXBUFFER* ppConstants,
				    LPD3DXBUFFER* ppCompiledShader,
				    LPD3DXBUFFER* ppCompilationErrors) {
  FIXME("(void): stub\n");
  return D3D_OK;
}