[Bf-committers] BlenderCE - First results

Salvatore Russo salvatore.russo at laposte.net
Sun Jul 24 17:41:32 CEST 2005


Hello Guy,

Here a short status about my work on Blender for PocketPC, let say BlenderCE :=)
I finally managed to compile Blender with EVC++4 after some adventures...Here a short summary about the results.
I took the source of Blender 2.27a. I deactivated everything related to Yafray and Sound (commenting the corresponding parts) and didn’t add game engine and international support.

Let's begin with the good news :) What I have today:
1) A BlenderCE project that compile fine for
	a) Blender!
	b) All Intern libraries needed
	c) All Extern libraries needed
	d) It also compile for a debug version :=)
2) PythonCE, SDL_CE
3) An OpenGL implementation, based on OpenGL ES. Thanks to Daniel, the author of the Klimt Implementation, I have all Opengl ES functions, plus others functions from Klimt (e.g begin/end and others...). I added some additional functions to compile Blender (e.g Glu functions (of Mesa), functions for all types and dummies functions). I will focus on implementing these dummies functions as soon as I have a first “running a little” BlenderCE. See the end of this email for the list of these dummies functions.

Here is the size of my files:
BlenderCE.exe: 4,52 MB
LibGLES_CM.dll: 527 KB
Lpngce.dll: 130 KB
PythonCE.dll: 1.18 MB
SDL.dll: 199 KB (I deactivated from built everything not needed e.g sound, joystick
)
zlibCE.dll:52KB

Now the bad new: if I run BlenderCE, the console say me that it can not import blabla.. (normal) then the window for Blender appears with the title “ghost window class” 
 and then it crashes
 it would have been too good if it was working at the first try :=)
I run the debug version
 it crashes because of a “First chance Exception in Blender.exe: 0XC0000005: Access violation”
 Good to know :=) And it stop in BKE_library.c in the function: “Freelibbloc”.

This is probably because of the big size of BlenderCE for a pocketpc !?

Here are the two only thinks potentially very dangerous for BlenderCE.

SYS_SingletonSystem *SYS_SingletonSystem::Instance()
{
	if (!_instance) {
		//_instance = new SYS_SingletonSystem();    //Problem for linking with WinCE!?
	}
	return _instance;
}
I was obliged to add these comments because of the following link error that I couldn’t solve!!!!:
error:
Linking...
SYS_SingletonSystem.obj : error LNK2019: unresolved external symbol "public: __cdecl SYS_SingletonSystem::SYS_SingletonSystem(void)" (??0SYS_SingletonSystem@@QAA at XZ) referenced in function "public: static class SYS_SingletonSystem * __cdecl SYS_Sing
letonSystem::Instance(void)" (?Instance at SYS_SingletonSystem@@SAPAV1 at XZ)

And I added functions for WinCE (and dummies):
int rewind(FILE* stream)
{	
	return fseek(stream,0,SEEK_SET);
}
int remove(const char* pathname)
{
	return unlink(pathname);
}
int rename (const char *oldname, const char *newname)
{
	// ask OS to move file
	if (!MoveFile(oldname, newname))
		return -1;
	
	return 0;
}
//No current directory in WinCE
int chdir (const char *path){return 1;}

//For WinCE, not implemented for the moment!
int system(char *S){return 0;}

Does anyone have suggestions about the best way to proceed at this point, maybe how to reduce the size of BlenderCE (deactivating useless functions). Maybe other suggestions??

The biggest difference with Pocketpc is that it ONLY works in Unicode, do you think that I have to focus on a special part of Blender to take care about this difference?

Thank you for your feedback and your suggestions :=)

Salvatore








//Begin of Dummies Functions
//*************Dummies in Klimt*****************************
KLIMTES_API void glDrawBuffer(GLenum mode){}
KLIMTES_API void glReadBuffer(GLenum mode){}
KLIMTES_API void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ){}
KLIMTES_API void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ){}
KLIMTES_API void glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params ){}
KLIMTES_API void glIndexMask( GLuint mask ){}
KLIMTES_API void glIndexd( GLdouble c ){}
KLIMTES_API void glIndexf( GLfloat c ){}
KLIMTES_API void glIndexs( GLshort c ){}
KLIMTES_API void glIndexdv( const GLdouble *c ){}
KLIMTES_API void glIndexfv( const GLfloat *c ){}
KLIMTES_API void glIndexiv( const GLint *c ){}
KLIMTES_API void glIndexsv( const GLshort *c ){}
KLIMTES_API void glRasterPos2f( GLfloat x, GLfloat y ){}
KLIMTES_API void glRasterPos2d( GLdouble x, GLdouble y ){}
KLIMTES_API void glRasterPos2i( GLint x, GLint y ){}
KLIMTES_API void glRasterPos2s( GLshort x, GLshort y ){}
KLIMTES_API void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ){}
KLIMTES_API void glRasterPos3i( GLint x, GLint y, GLint z ){}
KLIMTES_API void glRasterPos3s( GLshort x, GLshort y, GLshort z ){}
KLIMTES_API void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ){}
KLIMTES_API void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ){}
KLIMTES_API void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ){}
KLIMTES_API void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ){}
KLIMTES_API void glRasterPos2dv( const GLdouble *v ){}
KLIMTES_API void glRasterPos2fv( const GLfloat *v ){}
KLIMTES_API void glRasterPos2iv( const GLint *v ){}
KLIMTES_API void glRasterPos2sv( const GLshort *v ){}
KLIMTES_API void glRasterPos3dv( const GLdouble *v ){}
KLIMTES_API void glRasterPos3fv( const GLfloat *v ){}
KLIMTES_API void glRasterPos3iv( const GLint *v ){}
KLIMTES_API void glRasterPos3sv( const GLshort *v ){}
KLIMTES_API void glRasterPos4dv( const GLdouble *v ){}
KLIMTES_API void glRasterPos4fv( const GLfloat *v ){}
KLIMTES_API void glRasterPos4iv( const GLint *v ){}
KLIMTES_API void glRasterPos4sv( const GLshort *v ){}
KLIMTES_API void glMap1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points ){}
KLIMTES_API void glMap1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points ){}
KLIMTES_API void glMap2d( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points ){}
KLIMTES_API void glMap2f( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points ){}
KLIMTES_API void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ){}
KLIMTES_API void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ){}
KLIMTES_API void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ){}
KLIMTES_API void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ){}
KLIMTES_API void glPixelMapusv( GLenum map, GLint mapsize, const GLushort *values ){}
//Some list function are dummies in KlimtES so dummies here
KLIMTES_API void glCallLists( GLsizei n, GLenum type, const GLvoid *lists ){}
KLIMTES_API void glListBase( GLuint base ){}
KLIMTES_API GLboolean glIsList( GLuint list ){return false;}

//*******************glTex********************************
void glTexImage1D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels ){}

//***************glEval(all)*******************************
KLIMTES_API void glEvalCoord1d( GLdouble u ){}
KLIMTES_API void glEvalCoord1f( GLfloat u ){}
KLIMTES_API void glEvalCoord1dv( const GLdouble *u ){}
KLIMTES_API void glEvalCoord1fv( const GLfloat *u ){}
KLIMTES_API void glEvalCoord2d( GLdouble u, GLdouble v ){}
KLIMTES_API void glEvalCoord2f( GLfloat u, GLfloat v ){}
KLIMTES_API void glEvalCoord2dv( const GLdouble *u ){}
KLIMTES_API void glEvalCoord2fv( const GLfloat *u ){}
KLIMTES_API void glEvalPoint1( GLint i ){}
KLIMTES_API void glEvalPoint2( GLint i, GLint j ){}

//********************glGet*************************************
KLIMTES_API void glGetPolygonStipple( GLubyte *mask ){}
KLIMTES_API void glGetPixelMapfv( GLenum map, GLfloat *values ){}
KLIMTES_API void glGetPixelMapuiv( GLenum map, GLuint *values ){}
KLIMTES_API void glGetPixelMapusv( GLenum map, GLushort *values ){}
KLIMTES_API void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ){}
KLIMTES_API void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ){}
KLIMTES_API void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ){}
KLIMTES_API void glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ){}
KLIMTES_API void glGetMapdv( GLenum target, GLenum query, GLdouble *v ){}
KLIMTES_API void glGetMapfv( GLenum target, GLenum query, GLfloat *v ){}
KLIMTES_API void glGetMapiv( GLenum target, GLenum query, GLint *v ){}

//****************glName (all)**************************
KLIMTES_API void glInitNames( void ){}
KLIMTES_API void glLoadName( GLuint name ){}
KLIMTES_API void glPushName( GLuint name ){}
KLIMTES_API void glPopName( void ){}
//******************Others**********************************
KLIMTES_API void glSelectBuffer( GLsizei size, GLuint *buffer ){}
KLIMTES_API void glCopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ){}
KLIMTES_API void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ){}
KLIMTES_API void glEdgeFlag( GLboolean flag ){}
KLIMTES_API void glEdgeFlagv( const GLboolean *flag ){}
KLIMTES_API void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ){}
KLIMTES_API void glPassThrough( GLfloat token ){}
KLIMTES_API void glPrioritizeTextures( GLsizei n, const GLuint *textures, const GLclampf *priorities ){}

KLIMTES_API GLint glRenderMode( GLenum mode ){return 0;}
KLIMTES_API GLboolean glAreTexturesResident( GLsizei n, const GLuint *textures, GLboolean *residences ){return false;}
//end of Dummies Functions


Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)





More information about the Bf-committers mailing list