*model | Pointer to chunk model structure |
Light setting is performed by dedicated functions.
njCnkSetEasyLight() | Sets light |
njCnkSetEasyLightIntensity() | Sets light intensity |
njCnkSetEasyLightColor() | Sets light color |
The following chunk formats are supported.
Apex chunk | NJD_CV_SH, NJD_CV_VN_SH, NJD_CV, NJD_CV_D8, NJD_CV_IN, NJD_CV_IN, NJD_CV_VN, NJD_CV_VNX, NJD_CV_VN_D8 |
Strip chunk | NJD_CS, NJD_CS_UVH, NJD_CS_UVN |
sbInitSystem( NJD_RESOLUTION_640x240_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1 ); njInitVertexBuffer( 500000, 0, 10000, 0, 0 ); njInitMatrix( matrix, 128, 0); njInit3D( vbuf, 4096 ); njInitView( &view ); njSetView( &view ); njCnkSetEasyLight( 0.f, 0.f, 1.0f ); njCnkSetEasyLightIntensity( 1.0f, 0.0f ); njCnkSetEasyLightColor( 1.0f, 1.0f, 1.0f ); while(1) { njClearMatrix(); njTranslate( NULL, 0.f, 0.f, -10.f ); njRotateXYZ( NULL, xx,yy,zz ); njCnkEasyDrawModel( model ); xx += 257; yy += 179; zz += 193; njWaitVSync(); }