Git Product home page Git Product logo

dxlibforhtml5's Introduction

DxLibForHTML5

Build Status

概要

DXライブラリをWebGLで動かしてみたい...

  • iOS, Android版の描画バックエンドが OpenGLES
  • iOS のサウンド再生バックエンドが OpenAL
  • emscripten には OpenGLES, OpenAL, libpng, libjpeg, zlib, ogg, vorbis, bullet といった DXライブラリで使われている外部ライブラリがすべてそろっている

はい、emscripten を使ってビルドしてみます

ビルド環境構築

コンパイル済みバイナリのダウンロード

必要条件

参考資料

開発環境 リンク
Visual Studio https://dxlib.kamenokosoft.com/visual-studio.html
VSCode https://dxlib.kamenokosoft.com/vscode.html

ライブラリ本体の手動ビルド

必要条件

  • emscripten 1.39.6^
  • cmake
  • git
  • make (nmake, ninjaでも可)

ビルド

  • macOS, Linux
git clone --recursive https://github.com/nokotan/DxLibForHTML5.git
cd DxLibForHTML5
mkdir Build
cd Build
emcmake cmake ..
emmake make
  • Windows

nmake を使う場合

git clone --recursive https://github.com/nokotan/DxLibForHTML5.git
cd DxLibForHTML5
mkdir Build
cd Build
emcmake cmake -G "MinGW Makefiles" ..
nmake

ninja を使う場合

git clone --recursive https://github.com/nokotan/DxLibForHTML5.git
cd DxLibForHTML5
mkdir Build
cd Build
emcmake cmake -G "ninja" ..
ninja

dxlibforhtml5's People

Contributors

nokotan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dxlibforhtml5's Issues

CreateGraphFromMem関数がjpegファイルを正常に読み込まない

jpegファイルにおいてCreateGraphFromMem関数が正常に読み込まない動作をするようです。(-1を返します)
最初、JavaScript側の処理かと思いバイナリを検証した結果C++側のソースから読み込んだものと変わらなかったため判明しました。Windows版では問題なかったため、HTML5版のバグかAndroid版ですでに存在したバグだと思います。Android版で検証はまだしていません。


int handle, i, j, w, h, r, g, b, a, fhandle;
	void* image;
	int image_size;


	// 画像ファイルを丸ごとメモリに読み込む
	fhandle = FileRead_open("hoge.jpg");
	image_size = FileRead_size("hoge.jpg");
	image = malloc(image_size);
	FileRead_read(image, image_size, fhandle);
	FileRead_close(fhandle);
	char* str2 = (char*)image;

	// LoadSoftImageToMem で読み込む
	handle = CreateGraphFromMem(image, image_size);
	// BMP画像の表示
	DrawGraph( 0 , 0 , handle, TRUE ) ;

LoadSoundMemByMemImage関数がmp3ファイルを正常に読み込まない

mp3ファイルのメモリファイルからの読み込みにおいてLoadSoundMemByMemImage関数が正常に読み込まない動作をするようです。(-1を返します)
wavファイルとoggファイルは正常に再生出来ることを確認出来ました。

以下のログが出力されました。


5664:音声ファイルのPCMへの変換に失敗しました

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.