diff options
author | Chien Yang <[email protected]> | 2006-10-06 18:54:34 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2006-10-06 18:54:34 +0000 |
commit | 08d704b54c0dd01508b64338dea63b8f8f0fc78d (patch) | |
tree | 2eb48ed2e3092dbce9881def8190dca69c11c9c1 /src/native | |
parent | 2162c6f30fe20c4aae00e717b087c5383accf09e (diff) |
1) Fixed a logic bug in earlier putback
2) Fixed Issue 352 : VC compiler generates warning on Windows AMD64 build
3) Clean up build script and code to eliminate warning from VC compiler.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@714 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native')
-rw-r--r-- | src/native/ogl/Attributes.c | 4 | ||||
-rw-r--r-- | src/native/ogl/Canvas3D.c | 7 | ||||
-rw-r--r-- | src/native/ogl/CgShaderProgram.c | 8 | ||||
-rw-r--r-- | src/native/ogl/GeometryArrayRetained.c | 8 | ||||
-rw-r--r-- | src/native/ogl/NativeConfigTemplate3D.c | 6 | ||||
-rw-r--r-- | src/native/ogl/NativeScreenInfo.c | 2 | ||||
-rw-r--r-- | src/native/ogl/build-windows-i586-vc.xml | 4 |
7 files changed, 14 insertions, 25 deletions
diff --git a/src/native/ogl/Attributes.c b/src/native/ogl/Attributes.c index db87e70..4439524 100644 --- a/src/native/ogl/Attributes.c +++ b/src/native/ogl/Attributes.c @@ -480,12 +480,12 @@ void JNICALL Java_javax_media_j3d_NativePipeline_setLightEnables( #ifdef VERBOSE fprintf(stderr, "Canvas3D.updateLightEnables: mask = 0x%x, 0x%x\n", - (int) ((enable_mask >> 32) & 0xffffffff), + (int) ((enable_mask >> 32L) & 0xffffffff), (int) (enable_mask & 0xffffffff)); #endif for (i=0; i<nlights; i++) { - if (enable_mask & (1<<i)) { + if (enable_mask & (1L<<i)) { glEnable(GL_LIGHT0 + i); } else { diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c index 026d17d..c8a8db1 100644 --- a/src/native/ogl/Canvas3D.c +++ b/src/native/ogl/Canvas3D.c @@ -1000,7 +1000,7 @@ LONG WINAPI WndProc( HWND hWnd, UINT msg, /* This function handles any messages that we didn't. */ /* (Which is most messages) It belongs to the OS. */ - return DefWindowProc( hWnd, msg, wParam, lParam ); + return (LONG) DefWindowProc( hWnd, msg, wParam, lParam ); } #endif /*end of WIN32 */ @@ -1108,10 +1108,7 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createNewContext( LPTSTR errString; jboolean result; PixelFormatInfo *PixelFormatInfoPtr = (PixelFormatInfo *)fbConfigListPtr; - int i; /* Fix for issue 76 */ - - /* fprintf(stderr, "Canvas3D_createNewContext: \n"); fprintf(stderr, "window 0x%x\n", window); @@ -1147,7 +1144,7 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createNewContext( } } - if (SetPixelFormat(hdc, PixelFormatID, NULL)) { + if (!SetPixelFormat(hdc, PixelFormatID, NULL)) { printErrorMessage("Canvas3D_createNewContext: Failed in SetPixelFormat"); return 0; } diff --git a/src/native/ogl/CgShaderProgram.c b/src/native/ogl/CgShaderProgram.c index a4bfce0..0f8d380 100644 --- a/src/native/ogl/CgShaderProgram.c +++ b/src/native/ogl/CgShaderProgram.c @@ -66,15 +66,9 @@ Java_javax_media_j3d_NativePipeline_loadNativeCgLibrary( jobject thiz, jobjectArray libpath) { - CgWrapperInfo *cgWrapperInfo; - int i, pathLen; + CgWrapperInfo *cgWrapperInfo; char *errName = NULL; -#ifdef WIN32 - DWORD err; - LPTSTR errString; - UINT origErrorMode; -#endif /* WIN32 */ /* * This method is called exactly once to load and initialize the diff --git a/src/native/ogl/GeometryArrayRetained.c b/src/native/ogl/GeometryArrayRetained.c index c75ba72..c5313f2 100644 --- a/src/native/ogl/GeometryArrayRetained.c +++ b/src/native/ogl/GeometryArrayRetained.c @@ -163,7 +163,7 @@ executeGeometryArray( jfloat *verts, *startVertex, *clrs, *startClrs; jint i; - size_t bstride, cbstride; + jint bstride, cbstride; jsize strip_len; GLsizei *strips; GLenum iaFormat; @@ -598,7 +598,7 @@ JNIEXPORT jfloat *verts; jint i, j; - size_t bstride; + jint bstride; jint texStride, *texCoordSetMapOffset; int vAttrStride = 0; int vAttrOff; @@ -1912,7 +1912,7 @@ executeIndexedGeometryArray( jfloat *verts,*clrs; jint *indices; jint i; - size_t bstride, cbstride; + jint bstride, cbstride; jsize strip_len; GLsizei *countArray; int offset; @@ -2982,7 +2982,7 @@ Java_javax_media_j3d_NativePipeline_buildIndexedGeometry( jfloat *verts; jint *indices; jint i; - size_t bstride; + jint bstride; jint texStride, *texCoordSetMapOffset, texSize; GLsizei *countArray; GLenum iaFormat; diff --git a/src/native/ogl/NativeConfigTemplate3D.c b/src/native/ogl/NativeConfigTemplate3D.c index 692ebfb..a05359e 100644 --- a/src/native/ogl/NativeConfigTemplate3D.c +++ b/src/native/ogl/NativeConfigTemplate3D.c @@ -1435,9 +1435,7 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( PixelFormatInfo *pFormatInfo = NULL; jlong * offScreenPFListPtr; PIXELFORMATDESCRIPTOR dummy_pfd = getDummyPFD(); - - int i; - + /* * Select any pixel format and bound current context to * it so that we can get the wglChoosePixelFormatARB entry point. @@ -1460,7 +1458,7 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( return -1; } - if (SetPixelFormat(hdc, pixelFormat, NULL)) { + if (!SetPixelFormat(hdc, pixelFormat, NULL)) { printErrorMessage("In NativeConfigTemplate : Failed in SetPixelFormat"); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); diff --git a/src/native/ogl/NativeScreenInfo.c b/src/native/ogl/NativeScreenInfo.c index b9775e7..013e5ce 100644 --- a/src/native/ogl/NativeScreenInfo.c +++ b/src/native/ogl/NativeScreenInfo.c @@ -187,7 +187,7 @@ Java_javax_media_j3d_NativeScreenInfo_queryWglARB( return JNI_FALSE; } - if (SetPixelFormat(hdc, pixelFormat, NULL)) { + if (!SetPixelFormat(hdc, pixelFormat, NULL)) { printErrorMessage("Failed in SetPixelFormat"); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); diff --git a/src/native/ogl/build-windows-i586-vc.xml b/src/native/ogl/build-windows-i586-vc.xml index 8e62417..66f889e 100644 --- a/src/native/ogl/build-windows-i586-vc.xml +++ b/src/native/ogl/build-windows-i586-vc.xml @@ -60,7 +60,7 @@ <!-- Create the library file--> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="link"> - <arg line="-nologo -dll -subsystem:windows -pdb:none -machine:I386 -out:j3dcore-ogl.dll DrawingSurfaceObjectAWT.obj Canvas3D.obj GraphicsContext3D.obj NativeScreenInfo.obj NativeConfigTemplate3D.obj MasterControl.obj GeometryArrayRetained.obj Attributes.obj CgShaderProgram.obj GLSLShaderProgram.obj Lights.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -DELAYLOAD:jawt.dll -LIBPATH:"${java.home}\..\lib" jawt.lib"/> + <arg line="-nologo -dll -subsystem:windows -machine:I386 -out:j3dcore-ogl.dll DrawingSurfaceObjectAWT.obj Canvas3D.obj GraphicsContext3D.obj NativeScreenInfo.obj NativeConfigTemplate3D.obj MasterControl.obj GeometryArrayRetained.obj Attributes.obj CgShaderProgram.obj GLSLShaderProgram.obj Lights.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -DELAYLOAD:jawt.dll -LIBPATH:"${java.home}\..\lib" jawt.lib"/> </exec> </target> @@ -74,7 +74,7 @@ <!-- Create the library file--> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="link"> - <arg line="-nologo -dll -subsystem:windows -pdb:none -machine:I386 -out:j3dcore-ogl-cg.dll CgWrapper.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -LIBPATH:"${cg.home}\lib" cg.lib cgGL.lib"/> + <arg line="-nologo -dll -subsystem:windows -machine:I386 -out:j3dcore-ogl-cg.dll CgWrapper.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -LIBPATH:"${cg.home}\lib" cg.lib cgGL.lib"/> </exec> </target> |