ご報告ありがとうございます
3D描画関連の関数を実行した後に DrawOval が機能しない原因は単純な記述ミスでした
修正版をアップしましたのでよろしければお試しください m(_ _;m
http://homepage2.nifty.com/natupaji/DxLib/DxLibVCTest.exe // VisualC++ 用
http://homepage2.nifty.com/natupaji/DxLib/DxLibBCCTest.exe // BorlandC++ 用
http://homepage2.nifty.com/natupaji/DxLib/DxLibGCC_DevCppTest.exe // Dev-C++ 用
http://homepage2.nifty.com/natupaji/DxLib/DxLibGCC_MinGWTest.exe // MinGW 用
http://homepage2.nifty.com/natupaji/DxLib/DxLibMakeTest.exe // ソース
(中身を既存のライブラリのファイルに上書きして、BCCをお使いの
場合は『再構築』を、VCをお使いの場合は『リビルド』を、
Dev-C++をお使いの方は「Rebuild All(Ctrl+F11)」をして下さい)
リファレンスの DrawOval の記述ミスも修正しました、ご指摘ありがとうございます
CreateVertexBuffer についてですが、こちらのような単純なテストコードでも同様のエラーが
発生しますでしょうか?
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
VERTEX3D Vertex[ 4 ] ;
WORD Index[ 6 ] ;
int VertexBufHandle ;
int IndexBufHandle ;
// DXライブラリの初期化
ChangeWindowMode( TRUE ) ;
if( DxLib_Init() < 0 )
{
// エラーが発生したら直ちに終了
return -1 ;
}
// 4頂点分の頂点バッファを作成
VertexBufHandle = CreateVertexBuffer( 4, DX_VERTEX_TYPE_NORMAL_3D ) ;
// 6個分のインデックスバッファを作成
IndexBufHandle = CreateIndexBuffer( 6, DX_INDEX_TYPE_16BIT ) ;
// 4頂点分のデータをセット
Vertex[ 0 ].pos = VGet( 100.0f, 100.0f, 0.0f ) ;
Vertex[ 0 ].norm = VGet( 0.0f, 0.0f, -1.0f ) ;
Vertex[ 0 ].dif = GetColorU8( 255,255,255,255 ) ;
Vertex[ 0 ].spc = GetColorU8( 0, 0, 0, 0 ) ;
Vertex[ 0 ].u = 0.0f ;
Vertex[ 0 ].v = 0.0f ;
Vertex[ 0 ].su = 0.0f ;
Vertex[ 0 ].sv = 0.0f ;
Vertex[ 1 ].pos = VGet( 250.0f, 100.0f, 0.0f ) ;
Vertex[ 1 ].norm = VGet( 0.0f, 0.0f, -1.0f ) ;
Vertex[ 1 ].dif = GetColorU8( 255, 0,255,255 ) ;
Vertex[ 1 ].spc = GetColorU8( 0, 0, 0, 0 ) ;
Vertex[ 1 ].u = 0.0f ;
Vertex[ 1 ].v = 0.0f ;
Vertex[ 1 ].su = 0.0f ;
Vertex[ 1 ].sv = 0.0f ;
Vertex[ 2 ].pos = VGet( 100.0f, 300.0f, 0.0f ) ;
Vertex[ 2 ].norm = VGet( 0.0f, 0.0f, -1.0f ) ;
Vertex[ 2 ].dif = GetColorU8( 0,255,255,255 ) ;
Vertex[ 2 ].spc = GetColorU8( 0, 0, 0, 0 ) ;
Vertex[ 2 ].u = 0.0f ;
Vertex[ 2 ].v = 0.0f ;
Vertex[ 2 ].su = 0.0f ;
Vertex[ 2 ].sv = 0.0f ;
Vertex[ 3 ].pos = VGet( 400.0f, 200.0f, 0.0f ) ;
Vertex[ 3 ].norm = VGet( 0.0f, 0.0f, -1.0f ) ;
Vertex[ 3 ].dif = GetColorU8( 0,255,255,255 ) ;
Vertex[ 3 ].spc = GetColorU8( 0, 0, 0, 0 ) ;
Vertex[ 3 ].u = 0.0f ;
Vertex[ 3 ].v = 0.0f ;
Vertex[ 3 ].su = 0.0f ;
Vertex[ 3 ].sv = 0.0f ;
// 2ポリゴン分のインデックスデータをセット
Index[ 0 ] = 0 ;
Index[ 1 ] = 1 ;
Index[ 2 ] = 2 ;
Index[ 3 ] = 3 ;
Index[ 4 ] = 2 ;
Index[ 5 ] = 1 ;
// 頂点データを頂点バッファに転送
SetVertexBufferData( 0, Vertex, 4, VertexBufHandle ) ;
// インデックスデータをインデックスバッファに転送
SetIndexBufferData( 0, Index, 6, IndexBufHandle ) ;
// 頂点バッファとインデックスバッファを使用した2ポリゴンの描画
DrawPolygonIndexed3D_UseVertexBuffer( VertexBufHandle, IndexBufHandle, DX_NONE_GRAPH, FALSE ) ;
// キー入力待ちをする
WaitKey() ;
// DXライブラリの後始末
DxLib_End() ;
// ソフトの終了
return 0 ;
}