Răsfoiți Sursa

Windows compile fixes for static libs. Polycode player not building yet.

Cameron Hart 14 ani în urmă
părinte
comite
09981b43ec

+ 3 - 3
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h

@@ -1292,10 +1292,10 @@ static int Polycore_Renderer_setClippingPlanes(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number near = lua_tonumber(L, 2);
+	Number near_ = lua_tonumber(L, 2);
 	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number far = lua_tonumber(L, 3);
-	inst->setClippingPlanes(near, far);
+	Number far_ = lua_tonumber(L, 3);
+	inst->setClippingPlanes(near_, far_);
 	return 0;
 }
 

+ 3 - 3
Core/Contents/Source/PolyGLRenderer.cpp

@@ -72,9 +72,9 @@ OpenGLRenderer::OpenGLRenderer() : Renderer() {
 	verticesToDraw = 0;
 }
 
-void OpenGLRenderer::setClippingPlanes(Number near, Number far) {
-	nearPlane = near;
-	farPlane = far;
+void OpenGLRenderer::setClippingPlanes(Number nearPlane_, Number farPlane_) {
+	nearPlane = nearPlane_;
+	farPlane = farPlane_;
 	Resize(xRes,yRes);
 }
 

+ 2 - 0
Core/Contents/Source/PolyGLSLShaderModule.cpp

@@ -28,6 +28,8 @@ using namespace Polycode;
 #ifdef _WINDOWS
 PFNGLUSEPROGRAMPROC glUseProgram;
 PFNGLUNIFORM1IPROC glUniform1i;
+PFNGLUNIFORM1FPROC glUniform1f;
+PFNGLUNIFORM3FPROC glUniform3f;
 PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
 extern PFNGLACTIVETEXTUREPROC glActiveTexture;
 PFNGLCREATESHADERPROC glCreateShader;

+ 10 - 12
Modules/Contents/2DPhysics/CMakeLists.txt

@@ -20,19 +20,17 @@ SET(CMAKE_DEBUG_POSTFIX "_d")
 
 #IF(POLYCODE_BUILD_SHARED)
 ADD_LIBRARY(Polycode2DPhysics SHARED ${polycode2DPhysics_SRCS} ${polycode2DPhysics_HDRS})
-TARGET_LINK_LIBRARIES(Polycode2DPhysics ${BOX2D_LIBRARIES})
+TARGET_LINK_LIBRARIES(Polycode2DPhysics 
+    Polycore 
+    ${BOX2D_LIBRARIES}
+    ${OPENGL_LIBRARIES}
+    ${OPENAL_LIBRARY}
+    ${PNG_LIBRARIES}
+    ${FREETYPE_LIBRARIES}
+    ${PHYSFS_LIBRARY}
+    ${VORBISFILE_LIBRARY})
 IF(APPLE)
-    TARGET_LINK_LIBRARIES(
-        Polycode2DPhysics
-        Polycore
-        "-framework Cocoa"
-        ${OPENGL_LIBRARIES}
-        ${OPENAL_LIBRARY}
-        ${PNG_LIBRARIES}
-        ${FREETYPE_LIBRARIES}
-        ${PHYSFS_LIBRARY}
-        ${VORBISFILE_LIBRARY}
-    )
+    TARGET_LINK_LIBRARIES(Polycode2DPhysics "-framework Cocoa")
 ENDIF(APPLE)
 #ENDIF(POLYCODE_BUILD_SHARED)
 

+ 10 - 12
Modules/Contents/3DPhysics/CMakeLists.txt

@@ -24,19 +24,17 @@ SET(CMAKE_DEBUG_POSTFIX "_d")
 
 #IF(POLYCODE_BUILD_SHARED)
 ADD_LIBRARY(Polycode3DPhysics SHARED ${polycode3DPhysics_SRCS} ${polycode3DPhysics_HDRS})
-TARGET_LINK_LIBRARIES(Polycode3DPhysics ${BULLET_LIBRARIES})
+TARGET_LINK_LIBRARIES(Polycode3DPhysics 
+    Polycore
+    ${BULLET_LIBRARIES}
+    ${OPENGL_LIBRARIES}
+    ${OPENAL_LIBRARY}
+    ${PNG_LIBRARIES}
+    ${FREETYPE_LIBRARIES}
+    ${PHYSFS_LIBRARY}
+    ${VORBISFILE_LIBRARY})
 IF(APPLE)
-    TARGET_LINK_LIBRARIES(
-        Polycode3DPhysics
-        Polycore
-        "-framework Cocoa"
-        ${OPENGL_LIBRARIES}
-        ${OPENAL_LIBRARY}
-        ${PNG_LIBRARIES}
-        ${FREETYPE_LIBRARIES}
-        ${PHYSFS_LIBRARY}
-        ${VORBISFILE_LIBRARY}
-    )
+    TARGET_LINK_LIBRARIES(Polycode3DPhysics "-framework Cocoa")
 ENDIF(APPLE)
 #ENDIF(POLYCODE_BUILD_SHARED)
 

+ 14 - 1
Player/Contents/CMakeLists.txt

@@ -31,7 +31,20 @@ IF(MSVC)
 
  #   IF(POLYCODE_BUILD_STATIC)
     ADD_EXECUTABLE(PolycodePlayer WIN32 ${polycodeplayer_SRCS} ${polycodeplayer_HDRS})
-    TARGET_LINK_LIBRARIES(PolycodePlayer Polycore PolycodeLua ${LUA_LIBRARY})
+    TARGET_LINK_LIBRARIES(PolycodePlayer 
+        Polycore 
+        PolycodeLua 
+        ${LUA_LIBRARY}
+        ${OPENGL_LIBRARIES}
+        ${OPENAL_LIBRARY}
+        ${PNG_LIBRARIES}
+        ${FREETYPE_LIBRARIES}
+        ${PHYSFS_LIBRARY}
+        ${OGG_LIBRARY}
+        ${VORBIS_LIBRARY}
+        ${VORBISFILE_LIBRARY}
+     )
+
  #   ENDIF(POLYCODE_BUILD_STATIC)
     
 ELSEIF(APPLE)

+ 1 - 1
Tools/Contents/polyimport/CMakeLists.txt

@@ -14,7 +14,7 @@ SET(CMAKE_DEBUG_POSTFIX "_d")
 
 #IF(POLYCODE_BUILD_STATIC)
 ADD_EXECUTABLE(polyimport Source/polyimport.cpp Include/polyimport.h)
-TARGET_LINK_LIBRARIES(polyimport Polycore ${PHYSFS_LIBRARY} ${ASSIMP_LIBRARIES}})
+TARGET_LINK_LIBRARIES(polyimport Polycore ${PHYSFS_LIBRARY}  ${ZLIB_LIBRARIES} ${ASSIMP_LIBRARIES}})
 #ENDIF(POLYCODE_BUILD_STATIC)
 
 IF(POLYCODE_INSTALL_FRAMEWORK)