├── .gitignore
├── .gitmodules
├── OpenEXR
├── Half
│ ├── Half.vcxproj
│ ├── Half.vcxproj.filters
│ ├── Half.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── eLut.cpp
│ ├── eLut.h
│ ├── half.cpp
│ ├── half.h
│ ├── halfFunction.h
│ ├── halfLimits.h
│ ├── toFloat.cpp
│ └── toFloat.h
├── Iex
│ ├── Iex.h
│ ├── Iex.vcxproj
│ ├── Iex.vcxproj.filters
│ ├── Iex.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── IexBaseExc.cpp
│ ├── IexBaseExc.h
│ ├── IexErrnoExc.h
│ ├── IexMacros.h
│ ├── IexMathExc.h
│ ├── IexThrowErrnoExc.cpp
│ └── IexThrowErrnoExc.h
├── IlmImf
│ ├── IlmImf.vcxproj
│ ├── IlmImf.vcxproj.filters
│ ├── IlmImf.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── ImfArray.h
│ ├── ImfAttribute.cpp
│ ├── ImfAttribute.h
│ ├── ImfAutoArray.h
│ ├── ImfBoxAttribute.cpp
│ ├── ImfBoxAttribute.h
│ ├── ImfCRgbaFile.cpp
│ ├── ImfCRgbaFile.h
│ ├── ImfChannelList.cpp
│ ├── ImfChannelList.h
│ ├── ImfChannelListAttribute.cpp
│ ├── ImfChannelListAttribute.h
│ ├── ImfChromaticities.cpp
│ ├── ImfChromaticities.h
│ ├── ImfChromaticitiesAttribute.cpp
│ ├── ImfChromaticitiesAttribute.h
│ ├── ImfCompression.h
│ ├── ImfCompressionAttribute.cpp
│ ├── ImfCompressionAttribute.h
│ ├── ImfCompressor.cpp
│ ├── ImfCompressor.h
│ ├── ImfConvert.cpp
│ ├── ImfConvert.h
│ ├── ImfDoubleAttribute.cpp
│ ├── ImfDoubleAttribute.h
│ ├── ImfEnvmap.cpp
│ ├── ImfEnvmap.h
│ ├── ImfEnvmapAttribute.cpp
│ ├── ImfEnvmapAttribute.h
│ ├── ImfFloatAttribute.cpp
│ ├── ImfFloatAttribute.h
│ ├── ImfFrameBuffer.cpp
│ ├── ImfFrameBuffer.h
│ ├── ImfHeader.cpp
│ ├── ImfHeader.h
│ ├── ImfHuf.cpp
│ ├── ImfHuf.h
│ ├── ImfIO.cpp
│ ├── ImfIO.h
│ ├── ImfInputFile.cpp
│ ├── ImfInputFile.h
│ ├── ImfInt64.h
│ ├── ImfIntAttribute.cpp
│ ├── ImfIntAttribute.h
│ ├── ImfKeyCode.cpp
│ ├── ImfKeyCode.h
│ ├── ImfKeyCodeAttribute.cpp
│ ├── ImfKeyCodeAttribute.h
│ ├── ImfLineOrder.h
│ ├── ImfLineOrderAttribute.cpp
│ ├── ImfLineOrderAttribute.h
│ ├── ImfLut.cpp
│ ├── ImfLut.h
│ ├── ImfMatrixAttribute.cpp
│ ├── ImfMatrixAttribute.h
│ ├── ImfMisc.cpp
│ ├── ImfMisc.h
│ ├── ImfName.h
│ ├── ImfOpaqueAttribute.cpp
│ ├── ImfOpaqueAttribute.h
│ ├── ImfOutputFile.cpp
│ ├── ImfOutputFile.h
│ ├── ImfPixelType.h
│ ├── ImfPizCompressor.cpp
│ ├── ImfPizCompressor.h
│ ├── ImfPreviewImage.cpp
│ ├── ImfPreviewImage.h
│ ├── ImfPreviewImageAttribute.cpp
│ ├── ImfPreviewImageAttribute.h
│ ├── ImfPxr24Compressor.cpp
│ ├── ImfPxr24Compressor.h
│ ├── ImfRgba.h
│ ├── ImfRgbaFile.cpp
│ ├── ImfRgbaFile.h
│ ├── ImfRgbaYca.cpp
│ ├── ImfRgbaYca.h
│ ├── ImfRleCompressor.cpp
│ ├── ImfRleCompressor.h
│ ├── ImfScanLineInputFile.cpp
│ ├── ImfScanLineInputFile.h
│ ├── ImfStandardAttributes.cpp
│ ├── ImfStandardAttributes.h
│ ├── ImfStdIO.cpp
│ ├── ImfStdIO.h
│ ├── ImfStringAttribute.cpp
│ ├── ImfStringAttribute.h
│ ├── ImfTestFile.cpp
│ ├── ImfTestFile.h
│ ├── ImfThreading.cpp
│ ├── ImfThreading.h
│ ├── ImfTileDescription.h
│ ├── ImfTileDescriptionAttribute.cpp
│ ├── ImfTileDescriptionAttribute.h
│ ├── ImfTileOffsets.cpp
│ ├── ImfTileOffsets.h
│ ├── ImfTiledInputFile.cpp
│ ├── ImfTiledInputFile.h
│ ├── ImfTiledMisc.cpp
│ ├── ImfTiledMisc.h
│ ├── ImfTiledOutputFile.cpp
│ ├── ImfTiledOutputFile.h
│ ├── ImfTiledRgbaFile.cpp
│ ├── ImfTiledRgbaFile.h
│ ├── ImfTimeCode.cpp
│ ├── ImfTimeCode.h
│ ├── ImfTimeCodeAttribute.cpp
│ ├── ImfTimeCodeAttribute.h
│ ├── ImfVecAttribute.cpp
│ ├── ImfVecAttribute.h
│ ├── ImfVersion.cpp
│ ├── ImfVersion.h
│ ├── ImfWav.cpp
│ ├── ImfWav.h
│ ├── ImfXdr.h
│ ├── ImfZipCompressor.cpp
│ └── ImfZipCompressor.h
├── IlmThread
│ ├── IlmThread.cpp
│ ├── IlmThread.h
│ ├── IlmThread.vcproj
│ ├── IlmThread.vcxproj
│ ├── IlmThread.vcxproj.filters
│ ├── IlmThread.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── IlmThreadMutex.cpp
│ ├── IlmThreadMutex.h
│ ├── IlmThreadMutexPosix.cpp
│ ├── IlmThreadMutexWin32.cpp
│ ├── IlmThreadPool.cpp
│ ├── IlmThreadPool.h
│ ├── IlmThreadPosix.cpp
│ ├── IlmThreadSemaphore.cpp
│ ├── IlmThreadSemaphore.h
│ ├── IlmThreadSemaphorePosix.cpp
│ ├── IlmThreadSemaphorePosixCompat.cpp
│ ├── IlmThreadSemaphoreWin32.cpp
│ └── IlmThreadWin32.cpp
├── Imath
│ ├── Imath.vcxproj
│ ├── Imath.vcxproj.filters
│ ├── Imath.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── ImathBox.cpp
│ ├── ImathBox.h
│ ├── ImathBoxAlgo.h
│ ├── ImathColor.h
│ ├── ImathColorAlgo.cpp
│ ├── ImathColorAlgo.h
│ ├── ImathEuler.h
│ ├── ImathExc.h
│ ├── ImathFrame.h
│ ├── ImathFrustum.h
│ ├── ImathFun.cpp
│ ├── ImathFun.h
│ ├── ImathGL.h
│ ├── ImathGLU.h
│ ├── ImathHalfLimits.h
│ ├── ImathInterval.h
│ ├── ImathLimits.h
│ ├── ImathLine.h
│ ├── ImathLineAlgo.h
│ ├── ImathMath.h
│ ├── ImathMatrix.h
│ ├── ImathMatrixAlgo.cpp
│ ├── ImathMatrixAlgo.h
│ ├── ImathPlane.h
│ ├── ImathPlatform.h
│ ├── ImathQuat.h
│ ├── ImathRandom.cpp
│ ├── ImathRandom.h
│ ├── ImathRoots.h
│ ├── ImathShear.cpp
│ ├── ImathShear.h
│ ├── ImathSphere.h
│ ├── ImathVec.cpp
│ ├── ImathVec.h
│ └── ImathVecAlgo.h
├── config.mac
│ └── OpenEXRConfig.h
├── config.windows
│ └── OpenEXRConfig.h
└── inc
│ ├── Iex.h
│ ├── IexBaseExc.h
│ ├── IexErrnoExc.h
│ ├── IexMacros.h
│ ├── IexMathExc.h
│ ├── IexThrowErrnoExc.h
│ ├── IlmThread.h
│ ├── IlmThreadMutex.h
│ ├── IlmThreadPool.h
│ ├── IlmThreadSemaphore.h
│ ├── ImathBox.h
│ ├── ImathBoxAlgo.h
│ ├── ImathColor.h
│ ├── ImathColorAlgo.h
│ ├── ImathEuler.h
│ ├── ImathExc.h
│ ├── ImathFrame.h
│ ├── ImathFrustum.h
│ ├── ImathFun.h
│ ├── ImathGL.h
│ ├── ImathGLU.h
│ ├── ImathHalfLimits.h
│ ├── ImathInterval.h
│ ├── ImathLimits.h
│ ├── ImathLine.h
│ ├── ImathLineAlgo.h
│ ├── ImathMath.h
│ ├── ImathMatrix.h
│ ├── ImathMatrixAlgo.h
│ ├── ImathPlane.h
│ ├── ImathPlatform.h
│ ├── ImathQuat.h
│ ├── ImathRandom.h
│ ├── ImathRoots.h
│ ├── ImathShear.h
│ ├── ImathSphere.h
│ ├── ImathVec.h
│ ├── ImathVecAlgo.h
│ ├── ImfArray.h
│ ├── ImfAttribute.h
│ ├── ImfBoxAttribute.h
│ ├── ImfCRgbaFile.h
│ ├── ImfChannelList.h
│ ├── ImfChannelListAttribute.h
│ ├── ImfChromaticities.h
│ ├── ImfChromaticitiesAttribute.h
│ ├── ImfCompression.h
│ ├── ImfCompressionAttribute.h
│ ├── ImfConvert.h
│ ├── ImfDoubleAttribute.h
│ ├── ImfEnvmap.h
│ ├── ImfEnvmapAttribute.h
│ ├── ImfFloatAttribute.h
│ ├── ImfFrameBuffer.h
│ ├── ImfHeader.h
│ ├── ImfHuf.h
│ ├── ImfIO.h
│ ├── ImfInputFile.h
│ ├── ImfInt64.h
│ ├── ImfIntAttribute.h
│ ├── ImfKeyCode.h
│ ├── ImfKeyCodeAttribute.h
│ ├── ImfLineOrder.h
│ ├── ImfLineOrderAttribute.h
│ ├── ImfLut.h
│ ├── ImfMatrixAttribute.h
│ ├── ImfName.h
│ ├── ImfOpaqueAttribute.h
│ ├── ImfOutputFile.h
│ ├── ImfPixelType.h
│ ├── ImfPreviewImage.h
│ ├── ImfPreviewImageAttribute.h
│ ├── ImfRgba.h
│ ├── ImfRgbaFile.h
│ ├── ImfRgbaYca.h
│ ├── ImfStandardAttributes.h
│ ├── ImfStdIO.h
│ ├── ImfStringAttribute.h
│ ├── ImfTestFile.h
│ ├── ImfThreading.h
│ ├── ImfTileDescription.h
│ ├── ImfTileDescriptionAttribute.h
│ ├── ImfTiledInputFile.h
│ ├── ImfTiledOutputFile.h
│ ├── ImfTiledRgbaFile.h
│ ├── ImfTimeCode.h
│ ├── ImfTimeCodeAttribute.h
│ ├── ImfVecAttribute.h
│ ├── ImfVersion.h
│ ├── ImfWav.h
│ ├── ImfXdr.h
│ ├── OpenEXR.h
│ ├── OpenEXRConfig.h
│ ├── half.h
│ ├── halfFunction.h
│ └── halfLimits.h
├── OpenImageIO
├── OpenImageIOv13.vcxproj
├── OpenImageIOv13.vcxproj.filters
├── include
│ └── OpenImageIO
│ │ ├── dassert.h
│ │ ├── export.h
│ │ ├── osdep.h
│ │ ├── paramlist.h
│ │ ├── string_ref.h
│ │ ├── strutil.h
│ │ ├── sysutil.h
│ │ ├── thread.h
│ │ ├── tinyformat.h
│ │ ├── typedesc.h
│ │ ├── ustring.h
│ │ └── version.h
└── src
│ ├── paramlist.cpp
│ ├── strutil.cpp
│ ├── sysutil.cpp
│ ├── typedesc.cpp
│ └── ustring.cpp
├── README.md
├── boostbuild
├── boost.vcxproj
├── boost.vcxproj.filters
└── build_boost.cmd
├── build_cubins.bat
├── ccsycles_diag
├── App.config
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── ccsycles_diag.csproj
├── ccycles
├── background.cpp
├── camera.cpp
├── ccycles.cpp
├── ccycles.h
├── ccycles.vcxproj
├── ccycles.vcxproj.filters
├── ccycles_version.rc
├── cycles_api.def
├── device.cpp
├── film.cpp
├── integrator.cpp
├── internal_types.h
├── license.txt
├── light.cpp
├── mesh.cpp
├── object.cpp
├── scene.cpp
├── scene_parameters.cpp
├── session.cpp
├── session_parameters.cpp
├── shader.cpp
└── transform.cpp
├── clew
└── clew.vcxproj
├── csycles
├── Attributes
│ └── ShaderNodeAttribute.cs
├── Background.cs
├── CSycles.Camera.cs
├── CSycles.Device.cs
├── CSycles.Film.cs
├── CSycles.Integrator.cs
├── CSycles.Light.cs
├── CSycles.Mesh.cs
├── CSycles.Object.cs
├── CSycles.Scene.cs
├── CSycles.Session.cs
├── CSycles.Shader.cs
├── CSycles.cs
├── CSyclesXmlReader.cs
├── Camera.cs
├── Client.cs
├── Colors.cs
├── Device.cs
├── Film.cs
├── Inputs.cs
├── Integrator.cs
├── Light.cs
├── Mesh.cs
├── Object.cs
├── Outputs.cs
├── Properties
│ └── AssemblyInfo.cs
├── Scene.cs
├── SceneParameters.cs
├── Session.cs
├── SessionParameters.cs
├── Shader.cs
├── ShaderNodes
│ ├── AbsorptionVolumeNode.cs
│ ├── AddClosureNode.cs
│ ├── AnisotropicBsdfNode.cs
│ ├── BackgroundNode.cs
│ ├── BrickTexture.cs
│ ├── BrightnessContrastNode.cs
│ ├── BumpNode.cs
│ ├── CheckerTexture.cs
│ ├── ColorNode.cs
│ ├── ColorRamp.cs
│ ├── CombineHsvNode.cs
│ ├── CombineRgbNode.cs
│ ├── CombineXyzNode.cs
│ ├── DiffuseBsdfNode.cs
│ ├── EmissionNode.cs
│ ├── EnvironmentTextureNode.cs
│ ├── FresnelNode.cs
│ ├── GammaNode.cs
│ ├── GeometryInfoNode.cs
│ ├── GlassBsdfNode.cs
│ ├── GlossyBsdfNode.cs
│ ├── GradientTextureNode.cs
│ ├── HoldoutNode.cs
│ ├── HueSaturationNode.cs
│ ├── ImageTextureNode.cs
│ ├── LayerWeightNode.cs
│ ├── LightFalloffNode.cs
│ ├── LightPathNode.cs
│ ├── MagicTexture.cs
│ ├── MappingNode.cs
│ ├── MathNode.cs
│ ├── MatrixMathNode.cs
│ ├── MixClosureNode.cs
│ ├── MixNode.cs
│ ├── MusgraveTexture.cs
│ ├── NoiseTexture.cs
│ ├── OutputNode.cs
│ ├── RefractionBsdfNode.cs
│ ├── RgbToBwNode.cs
│ ├── RgbToLuminance.cs
│ ├── ScatterVolumeNode.cs
│ ├── SeparateHsvNode.cs
│ ├── SeparateRgbNode.cs
│ ├── SeparateXyzNode.cs
│ ├── ShaderNode.cs
│ ├── SkyTexture.cs
│ ├── Sockets
│ │ ├── ClosureSocket.cs
│ │ ├── Float4Socket.cs
│ │ ├── FloatSocket.cs
│ │ ├── IntSocket.cs
│ │ ├── SocketBase.cs
│ │ └── StringSocket.cs
│ ├── SubsurfaceScatteringNode.cs
│ ├── TextureCoordinateNode.cs
│ ├── TextureNode.cs
│ ├── TranslucentBsdfNode.cs
│ ├── TransparentBsdfNode.cs
│ ├── ValueNode.cs
│ ├── VectorMathNode.cs
│ ├── VelvetBsdfNode.cs
│ ├── VoronoiTexture.cs
│ └── WaveTexture.cs
├── SocketCollection.cs
├── Transform.cs
├── Utilities.cs
├── XmlReadState.cs
├── csycles.csproj
├── enums.cs
├── float4.cs
└── license.txt
├── csycles_tester
├── App.config
├── CSyclesForm.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── RenderModalCommand.cs
├── csycles_tester.csproj
├── license.txt
└── packages.config
├── csycles_unittests
├── Properties
│ └── AssemblyInfo.cs
├── SetupTests.cs
├── TestFloat4.cs
├── TestTransform.cs
├── csycles_unittests.csproj
└── packages.config
├── cuew
└── cuew.vcxproj
├── cycles.sln
├── cycles_kernel.vcxproj
├── cycles_kernel.vcxproj.filters
├── cycles_kernel_avx.vcxproj
├── cycles_kernel_avx.vcxproj.filters
├── cycles_kernel_avx2.vcxproj
├── cycles_kernel_avx2.vcxproj.filters
├── cycles_kernel_sse2.vcxproj
├── cycles_kernel_sse2.vcxproj.filters
├── cycles_kernel_sse3.vcxproj
├── cycles_kernel_sse3.vcxproj.filters
├── cycles_kernel_sse41.vcxproj
├── cycles_kernel_sse41.vcxproj.filters
├── cycles_proper.vcxproj
├── cycles_proper.vcxproj.filters
├── fsycles
├── App.config
├── Program.fs
├── fsycles.fsproj
└── packages.config
├── glew
├── glew.vcxproj
├── glew.vcxproj.filters
├── include
│ └── GL
│ │ ├── glew.h
│ │ ├── glxew.h
│ │ └── wglew.h
└── src
│ └── glew.c
├── pthreads
├── ANNOUNCE
├── BUGS
├── CONTRIBUTORS
├── COPYING
├── COPYING.LIB
├── MAINTAINERS
├── README
├── attr.c
├── autostatic.c
├── barrier.c
├── cancel.c
├── cleanup.c
├── condvar.c
├── config.h
├── context.h
├── create.c
├── dll.c
├── errno.c
├── exit.c
├── fork.c
├── global.c
├── implement.h
├── misc.c
├── mutex.c
├── need_errno.h
├── nonportable.c
├── private.c
├── pthread.c
├── pthread.h
├── pthread_attr_destroy.c
├── pthread_attr_getdetachstate.c
├── pthread_attr_getinheritsched.c
├── pthread_attr_getschedparam.c
├── pthread_attr_getschedpolicy.c
├── pthread_attr_getscope.c
├── pthread_attr_getstackaddr.c
├── pthread_attr_getstacksize.c
├── pthread_attr_init.c
├── pthread_attr_setdetachstate.c
├── pthread_attr_setinheritsched.c
├── pthread_attr_setschedparam.c
├── pthread_attr_setschedpolicy.c
├── pthread_attr_setscope.c
├── pthread_attr_setstackaddr.c
├── pthread_attr_setstacksize.c
├── pthread_barrier_destroy.c
├── pthread_barrier_init.c
├── pthread_barrier_wait.c
├── pthread_barrierattr_destroy.c
├── pthread_barrierattr_getpshared.c
├── pthread_barrierattr_init.c
├── pthread_barrierattr_setpshared.c
├── pthread_cancel.c
├── pthread_cond_destroy.c
├── pthread_cond_init.c
├── pthread_cond_signal.c
├── pthread_cond_wait.c
├── pthread_condattr_destroy.c
├── pthread_condattr_getpshared.c
├── pthread_condattr_init.c
├── pthread_condattr_setpshared.c
├── pthread_delay_np.c
├── pthread_detach.c
├── pthread_equal.c
├── pthread_exit.c
├── pthread_getconcurrency.c
├── pthread_getschedparam.c
├── pthread_getspecific.c
├── pthread_getunique_np.c
├── pthread_getw32threadhandle_np.c
├── pthread_join.c
├── pthread_key_create.c
├── pthread_key_delete.c
├── pthread_kill.c
├── pthread_mutex_consistent.c
├── pthread_mutex_destroy.c
├── pthread_mutex_init.c
├── pthread_mutex_lock.c
├── pthread_mutex_timedlock.c
├── pthread_mutex_trylock.c
├── pthread_mutex_unlock.c
├── pthread_mutexattr_destroy.c
├── pthread_mutexattr_getkind_np.c
├── pthread_mutexattr_getpshared.c
├── pthread_mutexattr_getrobust.c
├── pthread_mutexattr_gettype.c
├── pthread_mutexattr_init.c
├── pthread_mutexattr_setkind_np.c
├── pthread_mutexattr_setpshared.c
├── pthread_mutexattr_setrobust.c
├── pthread_mutexattr_settype.c
├── pthread_num_processors_np.c
├── pthread_once.c
├── pthread_rwlock_destroy.c
├── pthread_rwlock_init.c
├── pthread_rwlock_rdlock.c
├── pthread_rwlock_timedrdlock.c
├── pthread_rwlock_timedwrlock.c
├── pthread_rwlock_tryrdlock.c
├── pthread_rwlock_trywrlock.c
├── pthread_rwlock_unlock.c
├── pthread_rwlock_wrlock.c
├── pthread_rwlockattr_destroy.c
├── pthread_rwlockattr_getpshared.c
├── pthread_rwlockattr_init.c
├── pthread_rwlockattr_setpshared.c
├── pthread_self.c
├── pthread_setcancelstate.c
├── pthread_setcanceltype.c
├── pthread_setconcurrency.c
├── pthread_setschedparam.c
├── pthread_setspecific.c
├── pthread_spin_destroy.c
├── pthread_spin_init.c
├── pthread_spin_lock.c
├── pthread_spin_trylock.c
├── pthread_spin_unlock.c
├── pthread_testcancel.c
├── pthread_timechange_handler_np.c
├── pthread_win32_attach_detach_np.c
├── pthreads.vcxproj
├── pthreads.vcxproj.filters
├── ptw32_MCS_lock.c
├── ptw32_callUserDestroyRoutines.c
├── ptw32_calloc.c
├── ptw32_cond_check_need_init.c
├── ptw32_getprocessors.c
├── ptw32_is_attr.c
├── ptw32_mutex_check_need_init.c
├── ptw32_new.c
├── ptw32_processInitialize.c
├── ptw32_processTerminate.c
├── ptw32_relmillisecs.c
├── ptw32_reuse.c
├── ptw32_rwlock_cancelwrwait.c
├── ptw32_rwlock_check_need_init.c
├── ptw32_semwait.c
├── ptw32_spinlock_check_need_init.c
├── ptw32_threadDestroy.c
├── ptw32_threadStart.c
├── ptw32_throw.c
├── ptw32_timespec.c
├── ptw32_tkAssocCreate.c
├── ptw32_tkAssocDestroy.c
├── rwlock.c
├── sched.c
├── sched.h
├── sched_get_priority_max.c
├── sched_get_priority_min.c
├── sched_getscheduler.c
├── sched_setscheduler.c
├── sched_yield.c
├── sem_close.c
├── sem_destroy.c
├── sem_getvalue.c
├── sem_init.c
├── sem_open.c
├── sem_post.c
├── sem_post_multiple.c
├── sem_timedwait.c
├── sem_trywait.c
├── sem_unlink.c
├── sem_wait.c
├── semaphore.c
├── semaphore.h
├── signal.c
├── spin.c
├── sync.c
├── tsd.c
├── version.rc
└── w32_CancelableWait.c
├── tests
├── 50_grey.png
├── alpha.png
├── default.xml
├── img.bmp
├── objects
│ ├── cube.xml
│ ├── sphere.xml
│ ├── suzanne.xml
│ └── uv_cube.xml
├── performance_tester.blend
├── scene_cube.xml
├── scene_cube_default_surface.xml
├── scene_cube_surface.xml
├── scene_lookat.xml
├── scene_many_cubes.xml
├── scene_node_tests.xml
├── scene_shadowcatcher.xml
├── shadertests.xml
└── solidcol.png
└── tools
├── csycles_shader_exporter.py
└── exporter_tester.blend
/.gitignore:
--------------------------------------------------------------------------------
1 | x64/
2 |
3 | lib/
4 | lib/*.cubin
5 |
6 | *sdf
7 | *suo
8 | bin/
9 | obj/
10 | *.user
11 | RhinoCycles/
12 | *blend1
13 | *blend2
14 | bindeps/
15 | *.aps
16 | boost/
17 | boostbuild/build.log
18 | *.rej
19 | *.orig
20 | *.opendb
21 | packages/
22 | *.patch
23 | *.diff
24 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "cycles"]
2 | path = cycles
3 | url = https://github.com/mcneel/cycles
4 | branch = ccsycles_rhino
5 |
--------------------------------------------------------------------------------
/OpenEXR/Half/Half.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {0B49537D-7259-11D9-9FE1-000D56B08FA5}
6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {0B49537E-7259-11D9-9FE1-000D56B08FA5}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {0B49537F-7259-11D9-9FE1-000D56B08FA5}
14 | cmd;fl;l;y
15 |
16 |
17 | {0B495380-7259-11D9-9FE1-000D56B08FA5}
18 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
19 |
20 |
21 |
22 |
23 | Source Files
24 |
25 |
26 |
27 |
28 | Header Files
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/OpenEXR/Half/Half.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenEXR/Half/half.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/OpenEXR/Half/half.cpp
--------------------------------------------------------------------------------
/OpenEXR/Iex/Iex.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {f5d05ae2-19c1-4fea-907a-5f3c9c4e9228}
6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
7 |
8 |
9 | {83601726-14b2-4780-8365-4d1ba845e01e}
10 | h;hpp;hxx;hm;inl
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 |
22 |
23 | Header Files
24 |
25 |
26 | Header Files
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Header Files
36 |
37 |
38 | Header Files
39 |
40 |
41 |
--------------------------------------------------------------------------------
/OpenEXR/Iex/Iex.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/IlmImf.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfDoubleAttribute.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 | //-----------------------------------------------------------------------------
38 | //
39 | // class DoubleAttribute
40 | //
41 | //-----------------------------------------------------------------------------
42 |
43 | #include
44 |
45 |
46 | namespace Imf {
47 |
48 |
49 | template <>
50 | const char *
51 | DoubleAttribute::staticTypeName ()
52 | {
53 | return "double";
54 | }
55 |
56 |
57 | } // namespace Imf
58 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfFloatAttribute.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 | //-----------------------------------------------------------------------------
38 | //
39 | // class FloatAttribute
40 | //
41 | //-----------------------------------------------------------------------------
42 |
43 | #include
44 |
45 |
46 | namespace Imf {
47 |
48 |
49 | template <>
50 | const char *
51 | FloatAttribute::staticTypeName ()
52 | {
53 | return "float";
54 | }
55 |
56 |
57 | } // namespace Imf
58 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfIntAttribute.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 | //-----------------------------------------------------------------------------
38 | //
39 | // class IntAttribute
40 | //
41 | //-----------------------------------------------------------------------------
42 |
43 | #include
44 |
45 |
46 | namespace Imf {
47 |
48 |
49 | template <>
50 | const char *
51 | IntAttribute::staticTypeName ()
52 | {
53 | return "int";
54 | }
55 |
56 |
57 | } // namespace Imf
58 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfPizCompressor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/OpenEXR/IlmImf/ImfPizCompressor.cpp
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfRleCompressor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/OpenEXR/IlmImf/ImfRleCompressor.cpp
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfThreading.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2005, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 | //-----------------------------------------------------------------------------
36 | //
37 | // Threading support for the IlmImf library
38 | //
39 | //-----------------------------------------------------------------------------
40 |
41 | #include "IlmThreadPool.h"
42 |
43 | namespace Imf {
44 |
45 |
46 | int
47 | globalThreadCount ()
48 | {
49 | return IlmThread::ThreadPool::globalThreadPool().numThreads();
50 | }
51 |
52 |
53 | void
54 | setGlobalThreadCount (int count)
55 | {
56 | IlmThread::ThreadPool::globalThreadPool().setNumThreads (count);
57 | }
58 |
59 |
60 | } // namespace Imf
61 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfVersion.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 | //-----------------------------------------------------------------------------
37 | //
38 | // Magic and version number.
39 | //
40 | //-----------------------------------------------------------------------------
41 |
42 |
43 | #include
44 |
45 | namespace Imf {
46 |
47 |
48 | bool
49 | isImfMagic (const char bytes[4])
50 | {
51 | return bytes[0] == ((MAGIC >> 0) & 0x00ff) &&
52 | bytes[1] == ((MAGIC >> 8) & 0x00ff) &&
53 | bytes[2] == ((MAGIC >> 16) & 0x00ff) &&
54 | bytes[3] == ((MAGIC >> 24) & 0x00ff);
55 | }
56 |
57 |
58 | } // namespace Imf
59 |
60 |
--------------------------------------------------------------------------------
/OpenEXR/IlmImf/ImfZipCompressor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/OpenEXR/IlmImf/ImfZipCompressor.cpp
--------------------------------------------------------------------------------
/OpenEXR/IlmThread/IlmThread.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {99e9aa1e-6130-495e-beac-31bd3b9b14ae}
6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
7 |
8 |
9 | {519cbaad-5f52-4b99-bb6b-eb39f0bb5f94}
10 | h;hpp;hxx;hm;inl
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 | Source Files
22 |
23 |
24 | Source Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Header Files
36 |
37 |
38 | Header Files
39 |
40 |
41 |
--------------------------------------------------------------------------------
/OpenEXR/IlmThread/IlmThread.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenEXR/Imath/Imath.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenEXR/Imath/ImathBox.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 | #include "ImathBox.h"
36 |
37 | // this file is necessary for template instantiation on windows
38 |
--------------------------------------------------------------------------------
/OpenEXR/Imath/ImathGLU.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 | #ifndef INCLUDED_IMATHGLU_H
38 | #define INCLUDED_IMATHGLU_H
39 |
40 | #include
41 | #include
42 |
43 | #include "ImathVec.h"
44 |
45 | inline
46 | void
47 | gluLookAt(const Imath::V3f &pos, const Imath::V3f &interest, const Imath::V3f &up)
48 | {
49 | gluLookAt(pos.x, pos.y, pos.z,
50 | interest.x, interest.y, interest.z,
51 | up.x, up.y, up.z);
52 | }
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/OpenEXR/Imath/ImathRandom.cpp:
--------------------------------------------------------------------------------
1 |
2 | ///////////////////////////////////////////////////////////////////////////
3 | //
4 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
5 | // Digital Ltd. LLC
6 | //
7 | // All rights reserved.
8 | //
9 | // Redistribution and use in source and binary forms, with or without
10 | // modification, are permitted provided that the following conditions are
11 | // met:
12 | // * Redistributions of source code must retain the above copyright
13 | // notice, this list of conditions and the following disclaimer.
14 | // * Redistributions in binary form must reproduce the above
15 | // copyright notice, this list of conditions and the following disclaimer
16 | // in the documentation and/or other materials provided with the
17 | // distribution.
18 | // * Neither the name of Industrial Light & Magic nor the names of
19 | // its contributors may be used to endorse or promote products derived
20 | // from this software without specific prior written permission.
21 | //
22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | //
34 | ///////////////////////////////////////////////////////////////////////////
35 |
36 | #include "ImathRandom.h"
37 |
38 | namespace Imath
39 | {
40 |
41 | static Rand48 globalRand48;
42 |
43 | double drand48()
44 | {
45 | return globalRand48.nextf();
46 | }
47 |
48 | long int lrand48()
49 | {
50 | return globalRand48.nexti();
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/OpenEXR/Imath/ImathShear.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 |
38 | //----------------------------------------------------------------------------
39 | //
40 | // Specializations of the Shear6 template.
41 | //
42 | //----------------------------------------------------------------------------
43 |
44 | #include "ImathShear.h"
45 |
46 | namespace Imath {
47 |
48 |
49 |
50 | // empty
51 |
52 |
53 |
54 | } // namespace Imath
55 |
--------------------------------------------------------------------------------
/OpenEXR/config.mac/OpenEXRConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // This is a hard-coded config file for OS X platforms. Don't
3 | // change any of these settings.
4 | //
5 |
6 | //
7 | // Define and set to 1 if the target system has POSIX thread support
8 | // and you want OpenEXR to use it for multithreaded file I/O.
9 | //
10 |
11 | #define HAVE_PTHREAD 1
12 |
13 | //
14 | // Define and set to 1 if the target system supports POSIX semaphores
15 | // and you want OpenEXR to use them; otherwise, OpenEXR will use its
16 | // own semaphore implementation.
17 | //
18 |
19 | /* #undef HAVE_POSIX_SEMAPHORES */
20 |
21 | //
22 | // Define and set to 1 if the target system is a Darwin-based system
23 | // (e.g., OS X).
24 | //
25 |
26 | #define HAVE_DARWIN 1
27 |
28 | //
29 | // Define and set to 1 if the target system supports a proc filesystem
30 | // compatible with the Linux kernel's proc filesystem. Note that this
31 | // is only used by a program in the IlmImfTest test suite, it's not
32 | // used by any OpenEXR library or application code.
33 | //
34 |
35 | /* #undef HAVE_LINUX_PROCFS */
36 |
37 | //
38 | // Define and set to 1 if the target system has a complete
39 | // implementation, specifically if it supports the std::right
40 | // formatter.
41 | //
42 |
43 | #define HAVE_COMPLETE_IOMANIP 1
44 |
--------------------------------------------------------------------------------
/OpenEXR/config.windows/OpenEXRConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // This is a hard-coded config file for Windows platforms. Don't
3 | // change any of these settings.
4 | //
5 |
6 | //
7 | // Define and set to 1 if the target system has POSIX thread support
8 | // and you want OpenEXR to use it for multithreaded file I/O.
9 | //
10 |
11 | /* #undef HAVE_PTHREAD */
12 |
13 | //
14 | // Define and set to 1 if the target system supports POSIX semaphores
15 | // and you want OpenEXR to use them; otherwise, OpenEXR will use its
16 | // own semaphore implementation.
17 | //
18 |
19 | /* #undef HAVE_POSIX_SEMAPHORES */
20 |
21 | //
22 | // Define and set to 1 if the target system is a Darwin-based system
23 | // (e.g., OS X).
24 | //
25 |
26 | /* #undef HAVE_DARWIN */
27 |
28 | //
29 | // Define and set to 1 if the target system supports a proc filesystem
30 | // compatible with the Linux kernel's proc filesystem. Note that this
31 | // is only used by a program in the IlmImfTest test suite, it's not
32 | // used by any OpenEXR library or application code.
33 | //
34 |
35 | /* #undef HAVE_LINUX_PROCFS */
36 |
37 | //
38 | // Define and set to 1 if the target system has a complete
39 | // implementation, specifically if it supports the std::right
40 | // formatter.
41 | //
42 |
43 | #define HAVE_COMPLETE_IOMANIP 1
44 |
--------------------------------------------------------------------------------
/OpenEXR/inc/ImathGLU.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 | // Digital Ltd. LLC
5 | //
6 | // All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions are
10 | // met:
11 | // * Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // * Redistributions in binary form must reproduce the above
14 | // copyright notice, this list of conditions and the following disclaimer
15 | // in the documentation and/or other materials provided with the
16 | // distribution.
17 | // * Neither the name of Industrial Light & Magic nor the names of
18 | // its contributors may be used to endorse or promote products derived
19 | // from this software without specific prior written permission.
20 | //
21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | //
33 | ///////////////////////////////////////////////////////////////////////////
34 |
35 |
36 |
37 | #ifndef INCLUDED_IMATHGLU_H
38 | #define INCLUDED_IMATHGLU_H
39 |
40 | #include
41 | #include
42 |
43 | #include "ImathVec.h"
44 |
45 | inline
46 | void
47 | gluLookAt(const Imath::V3f &pos, const Imath::V3f &interest, const Imath::V3f &up)
48 | {
49 | gluLookAt(pos.x, pos.y, pos.z,
50 | interest.x, interest.y, interest.z,
51 | up.x, up.y, up.z);
52 | }
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/OpenEXR/inc/OpenEXRConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // This is a hard-coded config file for Windows platforms. Don't
3 | // change any of these settings.
4 | //
5 |
6 | //
7 | // Define and set to 1 if the target system has POSIX thread support
8 | // and you want OpenEXR to use it for multithreaded file I/O.
9 | //
10 |
11 | /* #undef HAVE_PTHREAD */
12 |
13 | //
14 | // Define and set to 1 if the target system supports POSIX semaphores
15 | // and you want OpenEXR to use them; otherwise, OpenEXR will use its
16 | // own semaphore implementation.
17 | //
18 |
19 | /* #undef HAVE_POSIX_SEMAPHORES */
20 |
21 | //
22 | // Define and set to 1 if the target system is a Darwin-based system
23 | // (e.g., OS X).
24 | //
25 |
26 | /* #undef HAVE_DARWIN */
27 |
28 | //
29 | // Define and set to 1 if the target system supports a proc filesystem
30 | // compatible with the Linux kernel's proc filesystem. Note that this
31 | // is only used by a program in the IlmImfTest test suite, it's not
32 | // used by any OpenEXR library or application code.
33 | //
34 |
35 | /* #undef HAVE_LINUX_PROCFS */
36 |
37 | //
38 | // Define and set to 1 if the target system has a complete
39 | // implementation, specifically if it supports the std::right
40 | // formatter.
41 | //
42 |
43 | #define HAVE_COMPLETE_IOMANIP 1
44 |
--------------------------------------------------------------------------------
/OpenImageIO/OpenImageIOv13.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {08fa9140-46c9-4619-9eeb-d374cce98ad7}
6 |
7 |
8 | {f068f17e-b35f-4cfb-b026-0e6d77a52ebe}
9 |
10 |
11 |
12 |
13 | Source
14 |
15 |
16 | Source
17 |
18 |
19 | Source
20 |
21 |
22 | Source
23 |
24 |
25 | Source
26 |
27 |
28 |
29 |
30 | Headers
31 |
32 |
33 | Headers
34 |
35 |
36 | Headers
37 |
38 |
39 | Headers
40 |
41 |
42 | Headers
43 |
44 |
45 | Headers
46 |
47 |
48 | Headers
49 |
50 |
51 | Headers
52 |
53 |
54 | Headers
55 |
56 |
57 | Headers
58 |
59 |
60 | Headers
61 |
62 |
63 | Headers
64 |
65 |
66 |
--------------------------------------------------------------------------------
/OpenImageIO/include/OpenImageIO/osdep.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2009 Larry Gritz and the other authors and contributors.
3 | All Rights Reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are
7 | met:
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 | * Neither the name of the software's owners nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
28 | (This is the Modified BSD License)
29 | */
30 | #ifndef OPENIMAGEIO_OSDEP_H
31 | #define OPENIMAGEIO_OSDEP_H
32 |
33 | #ifdef _WIN32
34 | # define WIN32_LEAN_AND_MEAN
35 | # define VC_EXTRALEAN
36 | # define NOMINMAX
37 | # include
38 | #endif
39 |
40 | #endif // OPENIMAGEIO_OSDEP_H
41 |
--------------------------------------------------------------------------------
/boostbuild/boost.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {faefb0d6-2af0-4967-9c6f-1ec358861437}
18 |
19 |
20 |
21 |
22 | Batch Files
23 |
24 |
25 |
--------------------------------------------------------------------------------
/build_cubins.bat:
--------------------------------------------------------------------------------
1 | SET nvcc=C:\CUDA75\bin\nvcc.exe
2 | SET cyclesroot=D:\Dev\CCSycles
3 | SET cyclesout=D:\Dev\CCSycles
4 | SET cudaversion=65
5 | SET shadermodelnum=%1
6 | SET shadermodel=sm_%shadermodelnum%
7 |
8 | IF [%shadermodelnum%]==[] (
9 | FOR %%s IN ("sm_20", "sm_21", "sm_30", "sm_35", "sm_50", "sm_52") DO (
10 | "%nvcc%" -arch=%%s -m64 --cubin %cyclesroot%/cycles/src/kernel/kernels/cuda/kernel.cu -o %cyclesout%/lib/kernel_%%s.cubin --ptxas-options="-v" -D__KERNEL_CUDA_VERSION__=%cudaversion% --use_fast_math -I%cyclesroot%/cycles/src/kernel/../util -I%cyclesroot%/cycles/src/kernel/svm -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
11 | )
12 | ) ELSE (
13 | "%nvcc%" -arch=%shadermodel% -m64 --cubin %cyclesroot%/cycles/src/kernel/kernels/cuda/kernel.cu -o %cyclesout%/lib/kernel_%shadermodel%.cubin --ptxas-options="-v" -D__KERNEL_CUDA_VERSION__=%cudaversion% --use_fast_math -I%cyclesroot%/cycles/src/kernel/../util -I%cyclesroot%/cycles/src/kernel/svm -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
14 | )
15 |
--------------------------------------------------------------------------------
/ccsycles_diag/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ccsycles_diag/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ccl;
3 |
4 | namespace ccsycles_diag
5 | {
6 | class Program
7 | {
8 | static void Main()
9 | {
10 | CSycles.initialise();
11 |
12 | var devices = Device.Devices;
13 |
14 | foreach (var dev in devices)
15 | {
16 | Console.WriteLine(dev);
17 | }
18 |
19 | Console.WriteLine("FirstCuda gives us: {0}", Device.FirstCuda);
20 | Console.WriteLine("FirstMultiOpenCL gives us: {0}", Device.FirstMultiOpenCL);
21 |
22 | CSycles.shutdown();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ccsycles_diag/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ccsycles_diag")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Hewlett-Packard Company")]
12 | [assembly: AssemblyProduct("ccsycles_diag")]
13 | [assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("525d93da-6597-46a8-90ba-23cc4da0219f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ccycles/ccycles_version.rc:
--------------------------------------------------------------------------------
1 | // This file contains the version resources for ccycles.vcxproj
2 | // The version numbers and copyright information comes from the header file below.
3 | // Please do not modify this file unless you are certain you know what you are doing!
4 | #include "..\..\..\..\..\version.h"
5 |
6 | VS_VERSION_INFO VERSIONINFO
7 | FILEVERSION VERSION_WITH_COMMAS
8 | PRODUCTVERSION VERSION_WITH_COMMAS
9 | FILEFLAGSMASK RHINO_FILE_FLAGS_MASK
10 | #ifdef _DEBUG
11 | FILEFLAGS 0x1L
12 | #else
13 | FILEFLAGS 0x0L
14 | #endif
15 | FILEOS 0x4L
16 | FILETYPE 0x2L
17 | FILESUBTYPE 0x0L
18 | BEGIN
19 | BLOCK "StringFileInfo"
20 | BEGIN
21 | BLOCK "080904e4"
22 | BEGIN
23 | VALUE "CompanyName", "Robert McNeel & Associates"
24 | VALUE "FileDescription", "CCycles - C-API for Cycles. Part of C[CS]?ycles"
25 | VALUE "FileVersion", VERSION_WITH_PERIODS
26 | VALUE "InternalName", "ccycles.dll"
27 | VALUE "LegalCopyright", COPYRIGHT
28 | VALUE "OriginalFilename", "ccycles.dll"
29 | VALUE "ProductName", "C[CS]?ycles - CCycles"
30 | VALUE "ProductVersion", VERSION_WITH_PERIODS
31 | END
32 | END
33 | BLOCK "VarFileInfo"
34 | BEGIN
35 | VALUE "Translation", 0x809, 1252
36 | END
37 | END
38 |
--------------------------------------------------------------------------------
/ccycles/device.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014-2015 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | #include "internal_types.h"
18 |
19 | extern std::vector devices;
20 |
21 | unsigned int cycles_number_devices() {
22 | return (unsigned int)devices.size();
23 | }
24 |
25 | unsigned int cycles_number_cuda_devices() {
26 | int i{ 0 };
27 | for (ccl::DeviceInfo di : devices) {
28 | if (di.type == ccl::DeviceType::DEVICE_CUDA) i++;
29 | }
30 |
31 | return i;
32 | }
33 |
34 | const char *cycles_device_description(int i) {
35 | if (i>= 0 && i < devices.size())
36 | return devices[i].description.c_str();
37 | else
38 | return "-";
39 | }
40 |
41 | const char *cycles_device_id(int i) {
42 | if (i >= 0 && i < devices.size())
43 | return devices[i].id.c_str();
44 | else
45 | return "-";
46 | }
47 |
48 | int cycles_device_num(int i) {
49 | if (i >= 0 && i < devices.size())
50 | return devices[i].num;
51 | else
52 | return INT_MIN;
53 | }
54 |
55 | bool cycles_device_advanced_shading(int i) {
56 | if (i >= 0 && i < devices.size())
57 | return devices[i].advanced_shading;
58 | else
59 | return false;
60 | }
61 |
62 | bool cycles_device_display_device(int i) {
63 | if (i >= 0 && i < devices.size())
64 | return devices[i].display_device;
65 | else
66 | return false;
67 | }
68 |
69 | bool cycles_device_pack_images(int i) {
70 | if (i >= 0 && i < devices.size())
71 | return devices[i].pack_images;
72 | else
73 | return false;
74 | }
75 |
76 | unsigned int cycles_device_type(int i) {
77 | if (i >= 0 && i < devices.size())
78 | return devices[i].type;
79 | else
80 | return 0;
81 | }
82 |
83 |
84 | const char* cycles_device_capabilities() {
85 | static string capabilities = ccl::Device::device_capabilities();
86 | return capabilities.c_str();
87 | }
--------------------------------------------------------------------------------
/ccycles/film.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014-2015 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | #include "internal_types.h"
18 |
19 | extern std::vector scenes;
20 |
21 | void cycles_film_set_exposure(unsigned int client_id, unsigned int scene_id, float exposure)
22 | {
23 | SCENE_FIND(scene_id)
24 | sce->film->exposure = exposure;
25 | sce->film->need_update = true;
26 | SCENE_FIND_END()
27 | }
28 |
29 | void cycles_film_set_filter(unsigned int client_id, unsigned int scene_id, unsigned int filter_type, float filter_width)
30 | {
31 | SCENE_FIND(scene_id)
32 | sce->film->filter_type = (ccl::FilterType)filter_type;
33 | if (sce->film->filter_type == ccl::FilterType::FILTER_BOX) sce->film->filter_width = 1.0f;
34 | else sce->film->filter_width = filter_width;
35 | SCENE_FIND_END()
36 | }
37 |
38 | void cycles_film_set_use_sample_clamp(unsigned int client_id, unsigned int scene_id, bool use_sample_clamp)
39 | {
40 | SCENE_FIND(scene_id)
41 | sce->film->use_sample_clamp = use_sample_clamp;
42 | SCENE_FIND_END()
43 | }
44 |
45 | void cycles_film_tag_update(unsigned int client_id, unsigned int scene_id)
46 | {
47 | SCENE_FIND(scene_id)
48 | sce->film->tag_update(sce);
49 | SCENE_FIND_END()
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/ccycles/transform.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014-2015 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | #include "internal_types.h"
18 |
19 |
--------------------------------------------------------------------------------
/csycles/Attributes/ShaderNodeAttribute.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl.Attributes
18 | {
19 | [System.AttributeUsage(System.AttributeTargets.Class)]
20 | public sealed class ShaderNodeAttribute : System.Attribute
21 | {
22 | private string nodeTypeName;
23 | private bool nodeTypeIsBase;
24 |
25 | public ShaderNodeAttribute(string name, bool base_class)
26 | {
27 | nodeTypeName = name;
28 | nodeTypeIsBase = base_class;
29 | }
30 |
31 | public ShaderNodeAttribute(string name)
32 | {
33 | nodeTypeName = name;
34 | nodeTypeIsBase = false;
35 | }
36 |
37 | public ShaderNodeAttribute() { }
38 |
39 | public string Name
40 | {
41 | get { return nodeTypeName; }
42 | set { nodeTypeName = value; }
43 | }
44 |
45 | public bool IsBase
46 | {
47 | get { return nodeTypeIsBase; }
48 | set { nodeTypeIsBase = value; }
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/csycles/CSycles.Film.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace ccl
4 | {
5 | public partial class CSycles
6 | {
7 | #region film
8 | [DllImport("ccycles.dll", SetLastError = false, EntryPoint = "cycles_film_set_filter", CallingConvention = CallingConvention.Cdecl)]
9 | private static extern void cycles_film_set_filter(uint clientId, uint sceneId, uint filter_type, float filter_width);
10 | public static void film_set_filter(uint clientId, uint sceneId, FilterType filter_type, float filter_width)
11 | {
12 | cycles_film_set_filter(clientId, sceneId, (uint)filter_type, filter_width);
13 | }
14 |
15 | [DllImport("ccycles.dll", SetLastError = false, EntryPoint = "cycles_film_set_exposure", CallingConvention = CallingConvention.Cdecl)]
16 | private static extern void cycles_film_set_exposure(uint clientId, uint sceneId, float exposure);
17 | public static void film_set_exposure(uint clientId, uint sceneId, float exposure)
18 | {
19 | cycles_film_set_exposure(clientId, sceneId, exposure);
20 | }
21 |
22 | [DllImport("ccycles.dll", SetLastError = false, EntryPoint = "cycles_film_set_use_sample_clamp", CallingConvention = CallingConvention.Cdecl)]
23 | private static extern void cycles_film_set_use_sample_clamp(uint clientId, uint sceneId, bool use_sample_clamp);
24 | public static void film_set_use_sample_clamp(uint clientId, uint sceneId, bool use_sample_clamp)
25 | {
26 | cycles_film_set_use_sample_clamp(clientId, sceneId, use_sample_clamp);
27 | }
28 |
29 | [DllImport("ccycles.dll", SetLastError = false, EntryPoint = "cycles_film_tag_update", CallingConvention = CallingConvention.Cdecl)]
30 | private static extern void cycles_film_tag_update(uint clientId, uint sceneId);
31 | public static void film_tag_update(uint clientId, uint sceneId)
32 | {
33 | cycles_film_tag_update(clientId, sceneId);
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/csycles/Client.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl
18 | {
19 | ///
20 | /// A client is a main point of entry for C[CS]?ycles API user
21 | ///
22 | public class Client
23 | {
24 | ///
25 | /// Id for this client
26 | ///
27 | public uint Id { get; private set; }
28 |
29 | ///
30 | /// Scene reference of this client
31 | ///
32 | public Scene Scene { get; set; }
33 |
34 | ///
35 | /// Create a new client
36 | ///
37 | public Client()
38 | {
39 | Id = CSycles.new_client();
40 | }
41 |
42 | ///
43 | /// Destroy a client.
44 | ///
45 | ~Client()
46 | {
47 | CSycles.release_client(Id);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/csycles/Colors.cs:
--------------------------------------------------------------------------------
1 | namespace ccl
2 | {
3 | public static class Colors
4 | {
5 | public static float4 black = new float4(0.0f, 0.0f, 0.0f, 1.0f);
6 | public static float4 white = new float4(1.0f, 1.0f, 1.0f, 1.0f);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/csycles/Film.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Drawing;
18 |
19 | namespace ccl
20 | {
21 | ///
22 | /// Film representation in a Cycles scene.
23 | ///
24 | public class Film
25 | {
26 | ///
27 | /// Reference to the scene in which this film is contained.
28 | ///
29 | internal Scene Scene { get; set; }
30 |
31 | ///
32 | /// Create a new film representation for Scene.
33 | ///
34 | ///
35 | internal Film(Scene scene)
36 | {
37 | Scene = scene;
38 | }
39 |
40 | ///
41 | /// Set film exposure
42 | ///
43 | public float Exposure
44 | {
45 | set
46 | {
47 | CSycles.film_set_exposure(Scene.Client.Id, Scene.Id, value);
48 | }
49 | }
50 |
51 | ///
52 | /// Set film filter type and width
53 | ///
54 | /// Box or Gaussian
55 | /// for proper Box use 1.0f
56 | public void SetFilter(FilterType filterType, float filterWidth)
57 | {
58 | CSycles.film_set_filter(Scene.Client.Id, Scene.Id, filterType, filterWidth);
59 | }
60 |
61 | ///
62 | /// Tag the film for update.
63 | ///
64 | public void Update()
65 | {
66 | CSycles.film_tag_update(Scene.Client.Id, Scene.Id);
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/csycles/Inputs.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl
18 | {
19 | ///
20 | /// Helper class for managing input sockets for shader nodes.
21 | ///
22 | public class Inputs : SocketCollection
23 | {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/csycles/Outputs.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl
18 | {
19 | ///
20 | /// Helper class for managing output sockets for shader nodes.
21 | ///
22 | public class Outputs : SocketCollection
23 | {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/csycles/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Reflection;
18 | using System.Runtime.CompilerServices;
19 | using System.Runtime.InteropServices;
20 |
21 | // General Information about an assembly is controlled through the following
22 | // set of attributes. Change these attribute values to modify the information
23 | // associated with an assembly.
24 | [assembly: AssemblyTitle("csycles")]
25 | [assembly: AssemblyDescription("")]
26 | [assembly: AssemblyConfiguration("")]
27 | [assembly: AssemblyCompany("Hewlett-Packard Company")]
28 | [assembly: AssemblyProduct("csycles")]
29 | [assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2014")]
30 | [assembly: AssemblyTrademark("")]
31 | [assembly: AssemblyCulture("")]
32 |
33 | // Setting ComVisible to false makes the types in this assembly not visible
34 | // to COM components. If you need to access a type in this assembly from
35 | // COM, set the ComVisible attribute to true on that type.
36 | [assembly: ComVisible(false)]
37 |
38 | // The following GUID is for the ID of the typelib if this project is exposed to COM
39 | [assembly: Guid("0d4bcd1a-282c-492e-a615-37efb0a56927")]
40 |
41 | // Version information for an assembly consists of the following four values:
42 | //
43 | // Major Version
44 | // Minor Version
45 | // Build Number
46 | // Revision
47 | //
48 | // You can specify all the values or you can default the Build and Revision Numbers
49 | // by using the '*' as shown below:
50 | // [assembly: AssemblyVersion("1.0.*")]
51 | [assembly: AssemblyVersion("1.0.0.0")]
52 | [assembly: AssemblyFileVersion("1.0.0.0")]
53 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/AbsorptionVolumeNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class AbsorptionVolumeInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 | public FloatSocket Density { get; set; }
27 |
28 | public AbsorptionVolumeInputs(ShaderNode parentNode)
29 | {
30 | Color = new Float4Socket(parentNode, "Color");
31 | AddSocket(Color);
32 | Density = new FloatSocket(parentNode, "Density");
33 | AddSocket(Density);
34 | }
35 | }
36 |
37 | public class AbsorptionVolumeOutputs : Outputs
38 | {
39 | public ClosureSocket Volume { get; set; }
40 |
41 | public AbsorptionVolumeOutputs(ShaderNode parentNode)
42 | {
43 | Volume = new ClosureSocket(parentNode, "Volume");
44 | AddSocket(Volume);
45 | }
46 | }
47 |
48 | ///
49 | /// A absorption volume node.
50 | ///
51 | [ShaderNode("absorption_volume")]
52 | public class AbsorptionVolumeNode : ShaderNode
53 | {
54 | public AbsorptionVolumeInputs ins { get { return (AbsorptionVolumeInputs)inputs; } }
55 | public AbsorptionVolumeOutputs outs { get { return (AbsorptionVolumeOutputs)outputs; } }
56 | ///
57 | /// Create a new Absorption volume node
58 | ///
59 | public AbsorptionVolumeNode() : this("a absorption volume node") { }
60 | public AbsorptionVolumeNode(string name) :
61 | base(ShaderNodeType.AbsorptionVolume, name)
62 | {
63 | inputs = new AbsorptionVolumeInputs(this);
64 | outputs = new AbsorptionVolumeOutputs(this);
65 | ins.Color.Value = new float4(1.0f);
66 | ins.Density.Value = 1.0f;
67 | }
68 |
69 | internal override void ParseXml(XmlReader xmlNode)
70 | {
71 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
72 | Utilities.Instance.get_float(ins.Density, xmlNode.GetAttribute("density"));
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/CombineHsvNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class CombineHsvInputs : Inputs
24 | {
25 | public FloatSocket H { get; set; }
26 | public FloatSocket S { get; set; }
27 | public FloatSocket V { get; set; }
28 |
29 | public CombineHsvInputs(ShaderNode parentNode)
30 | {
31 | H = new FloatSocket(parentNode, "H");
32 | AddSocket(H);
33 | S = new FloatSocket(parentNode, "S");
34 | AddSocket(S);
35 | V = new FloatSocket(parentNode, "V");
36 | AddSocket(V);
37 | }
38 | }
39 |
40 | public class CombineHsvOutputs : Outputs
41 | {
42 | public Float4Socket Image { get; set; }
43 |
44 | public CombineHsvOutputs(ShaderNode parentNode)
45 | {
46 | Image = new Float4Socket(parentNode, "Image");
47 | AddSocket(Image);
48 | }
49 | }
50 |
51 | ///
52 | /// Add a Combine HSV node, converting single H S V scalars to a vector output
53 | ///
54 | [ShaderNode("combine_hsv")]
55 | public class CombineHsvNode : ShaderNode
56 | {
57 | public CombineHsvInputs ins { get { return (CombineHsvInputs)inputs; } }
58 | public CombineHsvOutputs outs { get { return (CombineHsvOutputs)outputs; } }
59 |
60 | public CombineHsvNode() : this("A combine HSV node") { }
61 | public CombineHsvNode(string name) :
62 | base(ShaderNodeType.CombineHsv, name)
63 | {
64 | inputs = new CombineHsvInputs(this);
65 | outputs = new CombineHsvOutputs(this);
66 |
67 | ins.H.Value = 0.0f;
68 | ins.S.Value = 0.0f;
69 | ins.V.Value = 0.0f;
70 | }
71 |
72 | internal override void ParseXml(XmlReader xmlNode)
73 | {
74 | Utilities.Instance.get_float(ins.H, xmlNode.GetAttribute("H"));
75 | Utilities.Instance.get_float(ins.S, xmlNode.GetAttribute("S"));
76 | Utilities.Instance.get_float(ins.V, xmlNode.GetAttribute("V"));
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/CombineRgbNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class CombineRgbInputs : Inputs
24 | {
25 | public FloatSocket R { get; set; }
26 | public FloatSocket G { get; set; }
27 | public FloatSocket B { get; set; }
28 |
29 | public CombineRgbInputs(ShaderNode parentNode)
30 | {
31 | R = new FloatSocket(parentNode, "R");
32 | AddSocket(R);
33 | G = new FloatSocket(parentNode, "G");
34 | AddSocket(G);
35 | B = new FloatSocket(parentNode, "B");
36 | AddSocket(B);
37 | }
38 | }
39 |
40 | public class CombineRgbOutputs : Outputs
41 | {
42 | public Float4Socket Image { get; set; }
43 |
44 | public CombineRgbOutputs(ShaderNode parentNode)
45 | {
46 | Image = new Float4Socket(parentNode, "Image");
47 | AddSocket(Image);
48 | }
49 | }
50 |
51 | ///
52 | /// Add a Combine RGB node, converting single R G B scalars to a vector output
53 | ///
54 | [ShaderNode("combine_rgb")]
55 | public class CombineRgbNode : ShaderNode
56 | {
57 | public CombineRgbInputs ins { get { return (CombineRgbInputs)inputs; } }
58 | public CombineRgbOutputs outs { get { return (CombineRgbOutputs)outputs; } }
59 |
60 | public CombineRgbNode() : this("a combine rgb node") { }
61 | public CombineRgbNode(string name) :
62 | base(ShaderNodeType.CombineRgb, name)
63 | {
64 | inputs = new CombineRgbInputs(this);
65 | outputs = new CombineRgbOutputs(this);
66 |
67 | ins.R.Value = 0.0f;
68 | ins.G.Value = 0.0f;
69 | ins.B.Value = 0.0f;
70 | }
71 |
72 | internal override void ParseXml(XmlReader xmlNode)
73 | {
74 | Utilities.Instance.get_float(ins.R, xmlNode.GetAttribute("R"));
75 | Utilities.Instance.get_float(ins.G, xmlNode.GetAttribute("G"));
76 | Utilities.Instance.get_float(ins.B, xmlNode.GetAttribute("B"));
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/CombineXyzNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class CombineXyzInputs : Inputs
24 | {
25 | public FloatSocket X { get; set; }
26 | public FloatSocket Y { get; set; }
27 | public FloatSocket Z { get; set; }
28 |
29 | public CombineXyzInputs(ShaderNode parentNode)
30 | {
31 | X = new FloatSocket(parentNode, "X");
32 | AddSocket(X);
33 | Y = new FloatSocket(parentNode, "Y");
34 | AddSocket(Y);
35 | Z = new FloatSocket(parentNode, "Z");
36 | AddSocket(Z);
37 | }
38 | }
39 |
40 | public class CombineXyzOutputs : Outputs
41 | {
42 | public Float4Socket Vector { get; set; }
43 |
44 | public CombineXyzOutputs(ShaderNode parentNode)
45 | {
46 | Vector = new Float4Socket(parentNode, "Vector");
47 | AddSocket(Vector);
48 | }
49 | }
50 |
51 | ///
52 | /// Add a Combine XYZ node, converting single X Y Z scalars to a vector output
53 | ///
54 | [ShaderNode("combine_xyz")]
55 | public class CombineXyzNode : ShaderNode
56 | {
57 | public CombineXyzInputs ins { get { return (CombineXyzInputs)inputs; } }
58 | public CombineXyzOutputs outs { get { return (CombineXyzOutputs)outputs; } }
59 |
60 | public CombineXyzNode() : this("a combine XYZ node") { }
61 | public CombineXyzNode(string name) :
62 | base(ShaderNodeType.CombineXyz, name)
63 | {
64 | inputs = new CombineXyzInputs(this);
65 | outputs = new CombineXyzOutputs(this);
66 |
67 | ins.X.Value = 0.0f;
68 | ins.Y.Value = 0.0f;
69 | ins.Z.Value = 0.0f;
70 | }
71 |
72 | internal override void ParseXml(XmlReader xmlNode)
73 | {
74 | Utilities.Instance.get_float(ins.X, xmlNode.GetAttribute("X"));
75 | Utilities.Instance.get_float(ins.Y, xmlNode.GetAttribute("Y"));
76 | Utilities.Instance.get_float(ins.Z, xmlNode.GetAttribute("Z"));
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/EmissionNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class EmissionInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 | public FloatSocket Strength { get; set; }
27 |
28 | internal EmissionInputs(ShaderNode parentNode)
29 | {
30 | Color = new Float4Socket(parentNode, "Color");
31 | AddSocket(Color);
32 | Strength = new FloatSocket(parentNode, "Strength");
33 | AddSocket(Strength);
34 | }
35 | }
36 |
37 | public class EmissionOutputs : Outputs
38 | {
39 | public ClosureSocket Emission { get; set; }
40 |
41 | internal EmissionOutputs(ShaderNode parentNode)
42 | {
43 | Emission = new ClosureSocket(parentNode, "Emission");
44 | AddSocket(Emission);
45 | }
46 | }
47 |
48 | [ShaderNode("emission")]
49 | public class EmissionNode : ShaderNode
50 | {
51 | public EmissionInputs ins { get { return (EmissionInputs)inputs; } }
52 | public EmissionOutputs outs { get { return (EmissionOutputs)outputs; } }
53 |
54 | public EmissionNode() : this("an emission node") { }
55 | public EmissionNode(string name)
56 | : base(ShaderNodeType.Emission, name)
57 | {
58 | inputs = new EmissionInputs(this);
59 | outputs = new EmissionOutputs(this);
60 |
61 | ins.Color.Value = new float4(0.8f);
62 | ins.Strength.Value = 1.0f;
63 | }
64 |
65 | internal override void ParseXml(XmlReader xmlNode)
66 | {
67 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
68 | Utilities.Instance.get_float(ins.Strength, xmlNode.GetAttribute("strength"));
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/FresnelNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class FresnelInputs : Inputs
24 | {
25 | public Float4Socket Normal { get; set; }
26 | public FloatSocket IOR { get; set; }
27 |
28 | internal FresnelInputs(ShaderNode parentNode)
29 | {
30 | IOR = new FloatSocket(parentNode, "IOR");
31 | AddSocket(IOR);
32 | Normal = new Float4Socket(parentNode, "Normal");
33 | AddSocket(Normal);
34 | }
35 | }
36 |
37 | public class FresnelOutputs : Outputs
38 | {
39 | public FloatSocket Fac { get; set; }
40 |
41 | internal FresnelOutputs(ShaderNode parentNode)
42 | {
43 | Fac = new FloatSocket(parentNode, "Fac");
44 | AddSocket(Fac);
45 | }
46 | }
47 |
48 | [ShaderNode("fresnel")]
49 | public class FresnelNode : ShaderNode
50 | {
51 | public FresnelInputs ins { get { return (FresnelInputs)inputs; } }
52 | public FresnelOutputs outs { get { return (FresnelOutputs)outputs; } }
53 | public FresnelNode() : this("a fresnel input node") { }
54 | public FresnelNode(string name) :
55 | base(ShaderNodeType.Fresnel, name)
56 | {
57 | inputs = new FresnelInputs(this);
58 | outputs = new FresnelOutputs(this);
59 | ins.IOR.Value = 1.45f;
60 | ins.Normal.Value = new float4();
61 | }
62 |
63 | internal override void ParseXml(XmlReader xmlNode)
64 | {
65 | Utilities.Instance.get_float(ins.IOR, xmlNode.GetAttribute("ior"));
66 | Utilities.Instance.get_float4(ins.Normal, xmlNode.GetAttribute("normal"));
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/GammaNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class GammaInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 | public FloatSocket Gamma { get; set; }
27 |
28 | public GammaInputs(ShaderNode parentNode)
29 | {
30 | Color = new Float4Socket(parentNode, "Color");
31 | AddSocket(Color);
32 | Gamma = new FloatSocket(parentNode, "Gamma");
33 | AddSocket(Gamma);
34 | }
35 | }
36 |
37 | public class GammaOutputs : Outputs
38 | {
39 | public ClosureSocket Color { get; set; }
40 |
41 | public GammaOutputs(ShaderNode parentNode)
42 | {
43 | Color = new ClosureSocket(parentNode, "Color");
44 | AddSocket(Color);
45 | }
46 | }
47 |
48 | [ShaderNode("gamma")]
49 | public class GammaNode : ShaderNode
50 | {
51 | public GammaInputs ins { get { return (GammaInputs)inputs; } }
52 | public GammaOutputs outs { get { return (GammaOutputs)outputs; } }
53 |
54 | public GammaNode() : this("a gamma node") {}
55 | public GammaNode(string name)
56 | : base(ShaderNodeType.Gamma, name)
57 | {
58 | inputs = new GammaInputs(this);
59 | outputs = new GammaOutputs(this);
60 |
61 | ins.Color.Value = new float4(0.8f);
62 | ins.Gamma.Value = 1.0f;
63 | }
64 |
65 | internal override void ParseXml(XmlReader xmlNode)
66 | {
67 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
68 | Utilities.Instance.get_float(ins.Gamma, xmlNode.GetAttribute("gamma"));
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/HoldoutNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.ShaderNodes.Sockets;
18 | using ccl.Attributes;
19 |
20 | namespace ccl.ShaderNodes
21 | {
22 | public class HoldoutInputs : Inputs
23 | {
24 | public FloatSocket SurfaceMixWeight { get; set; }
25 | public FloatSocket VolumeMixWeight { get; set; }
26 |
27 | public HoldoutInputs(ShaderNode parentNode)
28 | {
29 | SurfaceMixWeight = new FloatSocket(parentNode, "SurfaceMixWeight");
30 | AddSocket(SurfaceMixWeight);
31 | VolumeMixWeight = new FloatSocket(parentNode, "VolumeMixWeight");
32 | AddSocket(VolumeMixWeight);
33 | }
34 | }
35 |
36 | public class HoldoutOutputs : Outputs
37 | {
38 | public ClosureSocket Holdout { get; set; }
39 |
40 | public HoldoutOutputs(ShaderNode parentNode)
41 | {
42 | Holdout = new ClosureSocket(parentNode, "Holdout");
43 | AddSocket(Holdout);
44 | }
45 | }
46 |
47 | [ShaderNode("holdout")]
48 | public class HoldoutNode : ShaderNode
49 | {
50 | public HoldoutInputs ins { get { return (HoldoutInputs)inputs; } }
51 | public HoldoutOutputs outs { get { return (HoldoutOutputs)outputs; } }
52 |
53 | public HoldoutNode() : this("a holdout node") { }
54 |
55 | public HoldoutNode(string name)
56 | : base(ShaderNodeType.Holdout, name)
57 | {
58 | inputs = new HoldoutInputs(this);
59 | outputs = new HoldoutOutputs(this);
60 |
61 | ins.SurfaceMixWeight.Value = 0.0f;
62 | ins.VolumeMixWeight.Value = 0.0f;
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/LayerWeightNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class LayerWeightInputs : Inputs
24 | {
25 | public FloatSocket Blend { get; set; }
26 | public Float4Socket Normal { get; set; }
27 |
28 | public LayerWeightInputs(ShaderNode parentNode)
29 | {
30 | Blend = new FloatSocket(parentNode, "Blend");
31 | AddSocket(Blend);
32 | Normal = new Float4Socket(parentNode, "Normal");
33 | AddSocket(Normal);
34 | }
35 | }
36 |
37 | public class LayerWeightOutputs : Outputs
38 | {
39 | public FloatSocket Fresnel { get; set; }
40 | public FloatSocket Facing { get; set; }
41 |
42 | public LayerWeightOutputs(ShaderNode parentNode)
43 | {
44 | Fresnel = new FloatSocket(parentNode, "Fresnel");
45 | AddSocket(Fresnel);
46 | Facing = new FloatSocket(parentNode, "Facing");
47 | AddSocket(Facing);
48 | }
49 | }
50 |
51 | [ShaderNode("layer_weight")]
52 | public class LayerWeightNode : ShaderNode
53 | {
54 | public LayerWeightInputs ins { get { return (LayerWeightInputs)inputs; } }
55 | public LayerWeightOutputs outs { get { return (LayerWeightOutputs)outputs; } }
56 |
57 | public LayerWeightNode() : this("a layerweight node") { }
58 | public LayerWeightNode(string name)
59 | : base(ShaderNodeType.LayerWeight, name)
60 | {
61 | inputs = new LayerWeightInputs(this);
62 | outputs = new LayerWeightOutputs(this);
63 |
64 | ins.Normal.Value = new float4(0.0f);
65 | ins.Blend.Value = 0.5f;
66 | }
67 |
68 | internal override void ParseXml(XmlReader xmlNode)
69 | {
70 | Utilities.Instance.get_float(ins.Blend, xmlNode.GetAttribute("blend"));
71 | Utilities.Instance.get_float4(ins.Normal, xmlNode.GetAttribute("normal"));
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/LightFalloffNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class LightFalloffOutputs : Outputs
24 | {
25 | public Float4Socket Quadratic { get; set; }
26 | public Float4Socket Linear { get; set; }
27 | public Float4Socket Constant { get; set; }
28 |
29 | public LightFalloffOutputs(ShaderNode parentNode)
30 | {
31 | Quadratic = new Float4Socket(parentNode, "Quadratic");
32 | AddSocket(Quadratic);
33 | Linear = new Float4Socket(parentNode, "Linear");
34 | AddSocket(Linear);
35 | Constant = new Float4Socket(parentNode, "Constant");
36 | AddSocket(Constant);
37 | }
38 | }
39 |
40 | public class LightFalloffInputs : Inputs
41 | {
42 | public FloatSocket Strength { get; set; }
43 | public FloatSocket Smooth { get; set; }
44 | public LightFalloffInputs(ShaderNode parentNode)
45 | {
46 | Strength = new FloatSocket(parentNode, "Strength");
47 | AddSocket(Strength);
48 | Smooth = new FloatSocket(parentNode, "Smooth");
49 | AddSocket(Smooth);
50 | }
51 | }
52 |
53 | [ShaderNode("light_falloff")]
54 | public class LightFalloffNode : ShaderNode
55 | {
56 | public LightFalloffInputs ins { get { return (LightFalloffInputs)inputs; } }
57 | public LightFalloffOutputs outs { get { return (LightFalloffOutputs)outputs; } }
58 |
59 | public LightFalloffNode() : this("a light fall-off node") { }
60 | public LightFalloffNode(string name) :
61 | base(ShaderNodeType.LightFalloff, name)
62 | {
63 | inputs = new LightFalloffInputs(this);
64 | outputs = new LightFalloffOutputs(this);
65 | }
66 |
67 | internal override void ParseXml(XmlReader xmlNode)
68 | {
69 | Utilities.Instance.get_float(ins.Smooth, xmlNode.GetAttribute("smooth"));
70 | Utilities.Instance.get_float(ins.Strength, xmlNode.GetAttribute("strength"));
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/OutputNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.ShaderNodes.Sockets;
18 | using ccl.Attributes;
19 |
20 | namespace ccl.ShaderNodes
21 | {
22 | ///
23 | /// OutputNode input sockets
24 | ///
25 | public class OutputInputs : Inputs
26 | {
27 | ///
28 | /// Surface shading socket. Plug Background here for world shaders
29 | ///
30 | public ClosureSocket Surface { get; set; }
31 | public ClosureSocket Volume { get; set; }
32 | ///
33 | /// Only useful for material output nodes
34 | ///
35 | public FloatSocket Displacement { get; set; }
36 |
37 | internal OutputInputs(ShaderNode parentNode)
38 | {
39 | Surface = new ClosureSocket(parentNode, "Surface");
40 | AddSocket(Surface);
41 | Volume = new ClosureSocket(parentNode, "Volume");
42 | AddSocket(Volume);
43 | Displacement = new FloatSocket(parentNode, "Displacement");
44 | AddSocket(Displacement);
45 | }
46 | }
47 |
48 | public class OutputOutputs : Outputs
49 | {
50 | internal OutputOutputs(ShaderNode parentNode)
51 | {
52 |
53 | }
54 | }
55 |
56 | ///
57 | /// The final output shader node for shaders.
58 | ///
59 | [ShaderNode("output")]
60 | public class OutputNode : ShaderNode
61 | {
62 | public OutputInputs ins { get { return (OutputInputs) inputs; } }
63 | public OutputOutputs outs { get { return (OutputOutputs) outputs; } }
64 |
65 | public OutputNode() : this("an output node") { }
66 | public OutputNode(string name) :
67 | base(ShaderNodeType.Output, name)
68 | {
69 | inputs = new OutputInputs(this);
70 | outputs = new OutputOutputs(this);
71 | }
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/RgbToBwNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.ShaderNodes.Sockets;
18 | using ccl.Attributes;
19 |
20 | namespace ccl.ShaderNodes
21 | {
22 | ///
23 | /// RgbToBw input sockets
24 | ///
25 | public class ConvertRgbInputs : Inputs
26 | {
27 | ///
28 | /// RgbToBw input color
29 | ///
30 | public Float4Socket Color { get; set; }
31 |
32 | internal ConvertRgbInputs(ShaderNode parentNode)
33 | {
34 | Color = new Float4Socket(parentNode, "Color");
35 | AddSocket(Color);
36 | }
37 | }
38 |
39 | ///
40 | /// RgbToBw output sockets
41 | ///
42 | public class ConvertValOutputs : Outputs
43 | {
44 | ///
45 | /// RgbToBw value calculated from input color
46 | ///
47 | public FloatSocket Val { get; set; }
48 |
49 | internal ConvertValOutputs(ShaderNode parentNode)
50 | {
51 | Val = new FloatSocket(parentNode, "Val");
52 | AddSocket(Val);
53 | }
54 | }
55 |
56 | ///
57 | /// RgbToBw node to convert a color to a value
58 | ///
59 | [ShaderNode("rgb_to_bw")]
60 | public class RgbToBwNode : ShaderNode
61 | {
62 | ///
63 | /// RgbToBw input sockets
64 | ///
65 | public ConvertRgbInputs ins { get { return (ConvertRgbInputs)inputs; } }
66 | ///
67 | /// RgbToBw output sockets
68 | ///
69 | public ConvertValOutputs outs { get { return (ConvertValOutputs)outputs; } }
70 |
71 | ///
72 | /// Create new RgbToBw node
73 | ///
74 | public RgbToBwNode() : this("An RgbToBw node") { }
75 |
76 | ///
77 | /// Create new RgbToBw node with given name
78 | ///
79 | public RgbToBwNode(string name) :
80 | base(ShaderNodeType.RgbToBw, name)
81 | {
82 | inputs = new ConvertRgbInputs(this);
83 | outputs = new ConvertValOutputs(this);
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/RgbToLuminance.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.Attributes;
18 |
19 | namespace ccl.ShaderNodes
20 | {
21 |
22 | ///
23 | /// RgbToBw node to convert a color to a value
24 | ///
25 | [ShaderNode("rgb_to_luminance")]
26 | public class RgbToLuminanceNode : ShaderNode
27 | {
28 | ///
29 | /// RgbToBw input sockets
30 | ///
31 | public ConvertRgbInputs ins { get { return (ConvertRgbInputs)inputs; } }
32 | ///
33 | /// RgbToBw output sockets
34 | ///
35 | public ConvertValOutputs outs { get { return (ConvertValOutputs)outputs; } }
36 |
37 | ///
38 | /// Create new RgbToBw node
39 | ///
40 | public RgbToLuminanceNode() : this("An RgbToLuminance node") { }
41 |
42 | ///
43 | /// Create new RgbToLuminance node with given name
44 | ///
45 | public RgbToLuminanceNode(string name) :
46 | base(ShaderNodeType.RgbToLuminance, name)
47 | {
48 | inputs = new ConvertRgbInputs(this);
49 | outputs = new ConvertValOutputs(this);
50 | }
51 |
52 | internal override void ParseXml(System.Xml.XmlReader xmlNode)
53 | {
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/SeparateHsvNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class SeparateHsvInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 |
27 | public SeparateHsvInputs(ShaderNode parentNode)
28 | {
29 | Color = new Float4Socket(parentNode, "Color");
30 | AddSocket(Color);
31 | }
32 | }
33 |
34 | public class SeparateHsvOutputs : Outputs
35 | {
36 | public FloatSocket H { get; set; }
37 | public FloatSocket S { get; set; }
38 | public FloatSocket V { get; set; }
39 |
40 | public SeparateHsvOutputs(ShaderNode parentNode)
41 | {
42 | H = new FloatSocket(parentNode, "H");
43 | AddSocket(H);
44 | S = new FloatSocket(parentNode, "S");
45 | AddSocket(S);
46 | V = new FloatSocket(parentNode, "V");
47 | AddSocket(V);
48 | }
49 | }
50 |
51 | [ShaderNode("separate_hsv")]
52 | public class SeparateHsvNode : ShaderNode
53 | {
54 | public SeparateHsvInputs ins { get { return (SeparateHsvInputs)inputs; } }
55 | public SeparateHsvOutputs outs { get { return (SeparateHsvOutputs)outputs; } }
56 |
57 | ///
58 | /// Create new Separate HSV node.
59 | ///
60 | public SeparateHsvNode() : this("a separate HSV node") { }
61 | public SeparateHsvNode(string name) :
62 | base(ShaderNodeType.SeparateHsv, name)
63 | {
64 | inputs = new SeparateHsvInputs(this);
65 | outputs = new SeparateHsvOutputs(this);
66 | }
67 |
68 | internal override void ParseXml(XmlReader xmlNode)
69 | {
70 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/SeparateRgbNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class SeparateRgbInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 |
27 | public SeparateRgbInputs(ShaderNode parentNode)
28 | {
29 | Color = new Float4Socket(parentNode, "Image");
30 | AddSocket(Color);
31 | }
32 | }
33 |
34 | public class SeparateRgbOutputs : Outputs
35 | {
36 | public FloatSocket R { get; set; }
37 | public FloatSocket G { get; set; }
38 | public FloatSocket B { get; set; }
39 |
40 | public SeparateRgbOutputs(ShaderNode parentNode)
41 | {
42 | R = new FloatSocket(parentNode, "R");
43 | AddSocket(R);
44 | G = new FloatSocket(parentNode, "G");
45 | AddSocket(G);
46 | B = new FloatSocket(parentNode, "B");
47 | AddSocket(B);
48 | }
49 | }
50 |
51 | [ShaderNode("separate_rgb")]
52 | public class SeparateRgbNode : ShaderNode
53 | {
54 | public SeparateRgbInputs ins { get { return (SeparateRgbInputs)inputs; } }
55 | public SeparateRgbOutputs outs { get { return (SeparateRgbOutputs)outputs; } }
56 |
57 | ///
58 | /// Create new Separate RGB node.
59 | ///
60 | public SeparateRgbNode() : this("a separate rgb node") { }
61 | public SeparateRgbNode(string name) :
62 | base(ShaderNodeType.SeparateRgb, name)
63 | {
64 | inputs = new SeparateRgbInputs(this);
65 | outputs = new SeparateRgbOutputs(this);
66 | }
67 |
68 | internal override void ParseXml(XmlReader xmlNode)
69 | {
70 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/SeparateXyzNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class SeparateXyzInputs : Inputs
24 | {
25 | public Float4Socket Vector { get; set; }
26 |
27 | public SeparateXyzInputs(ShaderNode parentNode)
28 | {
29 | Vector = new Float4Socket(parentNode, "Vector");
30 | AddSocket(Vector);
31 | }
32 | }
33 |
34 | public class SeparateXyzOutputs : Outputs
35 | {
36 | public FloatSocket X { get; set; }
37 | public FloatSocket Y { get; set; }
38 | public FloatSocket Z { get; set; }
39 |
40 | public SeparateXyzOutputs(ShaderNode parentNode)
41 | {
42 | X = new FloatSocket(parentNode, "X");
43 | AddSocket(X);
44 | Y = new FloatSocket(parentNode, "Y");
45 | AddSocket(Y);
46 | Z = new FloatSocket(parentNode, "Z");
47 | AddSocket(Z);
48 | }
49 | }
50 |
51 | ///
52 | /// Add a Separate XYZ node, converting a vector input to single X Y Z scalar nodes
53 | ///
54 | [ShaderNode("separate_xyz")]
55 | public class SeparateXyzNode : ShaderNode
56 | {
57 | public SeparateXyzInputs ins { get { return (SeparateXyzInputs)inputs; } }
58 | public SeparateXyzOutputs outs { get { return (SeparateXyzOutputs)outputs; } }
59 |
60 | public SeparateXyzNode() : this("a separate XYZ node") { }
61 | public SeparateXyzNode(string name) :
62 | base(ShaderNodeType.SeparateXyz, name)
63 | {
64 | inputs = new SeparateXyzInputs(this);
65 | outputs = new SeparateXyzOutputs(this);
66 |
67 | ins.Vector.Value = new float4(0.0f);
68 | }
69 |
70 | internal override void ParseXml(XmlReader xmlNode)
71 | {
72 | Utilities.Instance.get_float4(ins.Vector, xmlNode.GetAttribute("vector"));
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/ClosureSocket.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System;
18 |
19 | namespace ccl.ShaderNodes.Sockets
20 | {
21 | ///
22 | /// Base class to denote a closure socket
23 | ///
24 | public class ClosureSocket : SocketBase
25 | {
26 | public object Value { get; set; }
27 |
28 | public ClosureSocket(ShaderNode parentNode, string name)
29 | : base(parentNode, name)
30 | {
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/Float4Socket.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl.ShaderNodes.Sockets
18 | {
19 | ///
20 | /// Float4Socket is used to communicate vectors between nodes.
21 | ///
22 | public class Float4Socket : SocketBase
23 | {
24 | ///
25 | /// Get or set the float4 value of the socket
26 | ///
27 | public float4 Value { get; set; }
28 | ///
29 | /// Create socket for parentNode. The name has to correspond to the socket name in Cycles.
30 | ///
31 | ///
32 | ///
33 | public Float4Socket(ShaderNode parentNode, string name)
34 | : base(parentNode, name)
35 | {
36 | Value = new float4();
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/FloatSocket.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl.ShaderNodes.Sockets
18 | {
19 | ///
20 | /// FloatSocket is used to communicate a single float value between
21 | /// nodes.
22 | ///
23 | public class FloatSocket : SocketBase
24 | {
25 | ///
26 | /// Get or set the value for the float socket
27 | ///
28 | public float Value { get; set; }
29 | ///
30 | /// Create a new FloatSocket.
31 | ///
32 | /// The name of the socket has to correspond to the names in Cycles.
33 | ///
34 | /// The ShaderNode for which the socket is created
35 | /// Name of the socket
36 | public FloatSocket(ShaderNode parentNode, string name)
37 | : base(parentNode, name)
38 | {
39 | Value = 0.0f;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/IntSocket.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl.ShaderNodes.Sockets
18 | {
19 | public class IntSocket : SocketBase
20 | {
21 | public int Value { get; set; }
22 | public IntSocket(ShaderNode parentNode, string name)
23 | : base(parentNode, name)
24 | {
25 | Value = 0;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/SocketBase.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System;
18 |
19 | namespace ccl.ShaderNodes.Sockets
20 | {
21 | public class SocketBase
22 | {
23 | internal ShaderNode Parent { get; set; }
24 |
25 | internal string Name { get; set; }
26 |
27 | public void Connect(SocketBase to)
28 | {
29 | to.ConnectionFrom = this;
30 | }
31 |
32 | internal SocketBase(ShaderNode parentNode, string name)
33 | {
34 | Parent = parentNode;
35 | Name = name;
36 | }
37 |
38 | internal SocketBase ConnectionFrom { get; set; }
39 |
40 | ///
41 | /// Get string containing node name, type and socket name
42 | ///
43 | public string Path
44 | {
45 | get { return String.Format("{0}({1}):{2}", Parent.Name, Parent.Type, Name); }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/Sockets/StringSocket.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | namespace ccl.ShaderNodes.Sockets
18 | {
19 | public class StringSocket : SocketBase
20 | {
21 | public string Value { get; set; }
22 | public StringSocket(ShaderNode parentNode, string name)
23 | : base(parentNode, name)
24 | {
25 | Value = "";
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/TextureNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.Attributes;
18 |
19 | namespace ccl.ShaderNodes
20 | {
21 | ///
22 | /// Base texture node
23 | ///
24 | [ShaderNode("texture_node_base", true)]
25 | public class TextureNode : ShaderNode
26 | {
27 | public enum TextureColorSpace
28 | {
29 | None,
30 | Color,
31 | }
32 |
33 | public enum TextureProjection
34 | {
35 | Flat,
36 | Box,
37 | Sphere,
38 | Tube,
39 | }
40 |
41 | public enum EnvironmentProjection
42 | {
43 | Equirectangular,
44 | MirrorBall,
45 | Wallpaper
46 | }
47 |
48 | internal TextureNode(ShaderNodeType type) :
49 | base(type) { }
50 |
51 | internal TextureNode(ShaderNodeType type, string name) :
52 | base(type, name) { }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/TransparentBsdfNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Xml;
18 | using ccl.ShaderNodes.Sockets;
19 | using ccl.Attributes;
20 |
21 | namespace ccl.ShaderNodes
22 | {
23 | public class TransparentBsdfInputs : Inputs
24 | {
25 | public Float4Socket Color { get; set; }
26 |
27 | internal TransparentBsdfInputs(ShaderNode parentNode)
28 | {
29 | Color = new Float4Socket(parentNode, "Color");
30 | AddSocket(Color);
31 | }
32 | }
33 |
34 | public class TransparentBsdfOutputs : Outputs
35 | {
36 | public ClosureSocket BSDF { get; set; }
37 |
38 | internal TransparentBsdfOutputs(ShaderNode parentNode)
39 | {
40 | BSDF = new ClosureSocket(parentNode, "BSDF");
41 | AddSocket(BSDF);
42 | }
43 | }
44 |
45 | ///
46 | /// A Transparent BSDF closure.
47 |
48 | /// There is one output BSDF
49 | ///
50 | [ShaderNode("transparent_bsdf")]
51 | public class TransparentBsdfNode : ShaderNode
52 | {
53 | public TransparentBsdfInputs ins { get { return (TransparentBsdfInputs)inputs; } }
54 | public TransparentBsdfOutputs outs { get { return (TransparentBsdfOutputs)outputs; } }
55 | ///
56 | /// Create a new Transparent BSDF closure. Default Color is white
57 | ///
58 | public TransparentBsdfNode() : this("a transparent bsdf node") { }
59 | ///
60 | /// Create a new Transparent BSDF closure. Default Color is white
61 | ///
62 | public TransparentBsdfNode(string name) :
63 | base(ShaderNodeType.Transparent, name)
64 | {
65 | inputs = new TransparentBsdfInputs(this);
66 | outputs = new TransparentBsdfOutputs(this);
67 | ins.Color.Value = new float4(1.0f, 1.0f, 1.0f, 1.0f);
68 | }
69 |
70 | internal override void ParseXml(XmlReader xmlNode)
71 | {
72 | Utilities.Instance.get_float4(ins.Color, xmlNode.GetAttribute("color"));
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/csycles/ShaderNodes/ValueNode.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using ccl.ShaderNodes.Sockets;
18 | using ccl.Attributes;
19 |
20 | namespace ccl.ShaderNodes
21 | {
22 | public class ValueInputs : Inputs
23 | {
24 | }
25 |
26 | public class ValueOutputs : Outputs
27 | {
28 | public FloatSocket Value { get; set; }
29 |
30 | internal ValueOutputs(ShaderNode parentNode)
31 | {
32 | Value = new FloatSocket(parentNode, "Value");
33 | AddSocket(Value);
34 | }
35 | }
36 |
37 | [ShaderNode("value")]
38 | public class ValueNode : ShaderNode
39 | {
40 |
41 | public ValueInputs ins { get { return (ValueInputs)inputs; } }
42 | public ValueOutputs outs { get { return (ValueOutputs)outputs; } }
43 | public ValueNode() : this("a value input node") { }
44 | public ValueNode(string name) :
45 | base(ShaderNodeType.Value, name)
46 | {
47 | inputs = null;
48 | outputs = new ValueOutputs(this);
49 | }
50 |
51 | ///
52 | /// Set member variable [IN] for ValueNode.
53 | ///
54 | public float Value { get; set; }
55 |
56 | internal override void SetDirectMembers(uint clientId, uint shaderId)
57 | {
58 | CSycles.shadernode_set_member_float(clientId, shaderId, Id, Type, "value", Value);
59 | }
60 | internal override void ParseXml(System.Xml.XmlReader xmlNode)
61 | {
62 | var f4 = 0.0f;
63 | Utilities.Instance.get_float(ref f4, xmlNode.GetAttribute("value"));
64 | Value = f4;
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/csycles/XmlReadState.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System;
18 |
19 | namespace ccl
20 | {
21 | public class XmlReadState : IDisposable
22 | {
23 | public Scene Scene { get; set; }
24 | public Transform Transform { get; set; }
25 | public bool Smooth { get; set; }
26 | public Shader Shader { get; set; }
27 | public string BasePath { get; set; }
28 | public float DicingRate { get; set; }
29 | public bool Silent { get; set; }
30 | // public DisplacementMethod DisplacementMethod {get; set; }
31 |
32 | public bool IsShadowCatcher { get; set; }
33 |
34 | public XmlReadState()
35 | : this(null, null, false, null, "", 0.0f, false, false)
36 | {
37 |
38 | }
39 |
40 | public XmlReadState(Scene scene, Transform transform, bool smooth, Shader shader, string basePath, float dicingRate, bool silent, bool is_shadowcatcher)
41 | {
42 | Scene = scene;
43 | Transform = transform;
44 | Smooth = smooth;
45 | Shader = shader;
46 | BasePath = basePath;
47 | DicingRate = dicingRate;
48 | Silent = silent;
49 | IsShadowCatcher = is_shadowcatcher;
50 | }
51 |
52 | public XmlReadState(XmlReadState old)
53 | :this(old.Scene, new Transform(old.Transform), old.Smooth, old.Shader, old.BasePath, old.DicingRate, old.Silent, old.IsShadowCatcher)
54 | {
55 | }
56 |
57 | public void Dispose()
58 | {
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/csycles_tester/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/csycles_tester/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright 2014 Robert McNeel and Associates
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | **/
16 |
17 | using System.Reflection;
18 | using System.Runtime.InteropServices;
19 |
20 | // General Information about an assembly is controlled through the following
21 | // set of attributes. Change these attribute values to modify the information
22 | // associated with an assembly.
23 | [assembly: AssemblyTitle("csycles_tester")]
24 | [assembly: AssemblyDescription("Tester software for the C[CS]?ycles project")]
25 | [assembly: AssemblyConfiguration("")]
26 | [assembly: AssemblyCompany("Robert McNeel & Associates")]
27 | [assembly: AssemblyProduct("csycles_tester")]
28 | [assembly: AssemblyCopyright("Copyright © Robert McNeel & Associates")]
29 | [assembly: AssemblyTrademark("")]
30 | [assembly: AssemblyCulture("")]
31 |
32 | // Setting ComVisible to false makes the types in this assembly not visible
33 | // to COM components. If you need to access a type in this assembly from
34 | // COM, set the ComVisible attribute to true on that type.
35 | [assembly: ComVisible(false)]
36 |
37 | // The following GUID is for the ID of the typelib if this project is exposed to COM
38 | [assembly: Guid("6b13a879-98ba-4622-95ea-765f4f10f651")]
39 |
40 | // Version information for an assembly consists of the following four values:
41 | //
42 | // Major Version
43 | // Minor Version
44 | // Build Number
45 | // Revision
46 | //
47 | // You can specify all the values or you can default the Build and Revision Numbers
48 | // by using the '*' as shown below:
49 | // [assembly: AssemblyVersion("1.0.*")]
50 | [assembly: AssemblyVersion("1.0.0.0")]
51 | [assembly: AssemblyFileVersion("1.0.0.0")]
52 |
--------------------------------------------------------------------------------
/csycles_tester/RenderModalCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using ef = Eto.Forms;
7 | using ccl;
8 |
9 | namespace csycles_tester
10 | {
11 | public class RenderModalCommand : ef.Command
12 | {
13 |
14 | CSyclesForm m_parent;
15 | public RenderModalCommand(CSyclesForm parent, string filename)
16 | {
17 | MenuText = filename;
18 | Tag = filename;
19 | m_parent = parent;
20 | }
21 |
22 | protected override void OnExecuted(EventArgs e)
23 | {
24 | base.OnExecuted(e);
25 | (m_parent.DataContext as RendererModel).RenderScene(MenuText);
26 | m_parent.Image.Image = (m_parent.DataContext as RendererModel).Result;
27 | m_parent.Invalidate();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/csycles_tester/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/csycles_unittests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("csycles_unittests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("csycles_unittests")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("0ac99723-77a8-4db5-a411-185764442a07")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/csycles_unittests/SetupTests.cs:
--------------------------------------------------------------------------------
1 | using NUnit.Framework;
2 | using System;
3 | using ccl;
4 | using System.IO;
5 |
6 | namespace csycles_unittests
7 | {
8 | [SetUpFixture]
9 | public class SetupTests
10 | {
11 | [OneTimeSetUp]
12 | public void OneTimeSetUp()
13 | {
14 | var path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) ?? "";
15 | var userpath = Path.Combine(path, "userpath");
16 |
17 | CSycles.path_init(path, userpath);
18 | CSycles.initialise();
19 | }
20 |
21 | [OneTimeTearDown]
22 | public void OneTimeTearDown()
23 | {
24 | CSycles.shutdown();
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/csycles_unittests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/fsycles/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fsycles/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/glew/glew.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 |
23 |
24 | Header Files
25 |
26 |
27 | Header Files
28 |
29 |
30 | Header Files
31 |
32 |
33 |
--------------------------------------------------------------------------------
/pthreads/MAINTAINERS:
--------------------------------------------------------------------------------
1 | CVS Repository maintainers
2 |
3 | Ross Johnson rpj@ise.canberra.edu.au
4 | Ben Elliston bje@cygnus.com
5 |
--------------------------------------------------------------------------------
/pthreads/attr.c:
--------------------------------------------------------------------------------
1 | /*
2 | * attr.c
3 | *
4 | * Description:
5 | * This translation unit agregates operations on thread attribute objects.
6 | * It is used for inline optimisation.
7 | *
8 | * The included modules are used separately when static executable sizes
9 | * must be minimised.
10 | *
11 | * --------------------------------------------------------------------------
12 | *
13 | * Pthreads-win32 - POSIX Threads Library for Win32
14 | * Copyright(C) 1998 John E. Bossom
15 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
16 | *
17 | * Contact Email: rpj@callisto.canberra.edu.au
18 | *
19 | * The current list of contributors is contained
20 | * in the file CONTRIBUTORS included with the source
21 | * code distribution. The list can also be seen at the
22 | * following World Wide Web location:
23 | * http://sources.redhat.com/pthreads-win32/contributors.html
24 | *
25 | * This library is free software; you can redistribute it and/or
26 | * modify it under the terms of the GNU Lesser General Public
27 | * License as published by the Free Software Foundation; either
28 | * version 2 of the License, or (at your option) any later version.
29 | *
30 | * This library is distributed in the hope that it will be useful,
31 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33 | * Lesser General Public License for more details.
34 | *
35 | * You should have received a copy of the GNU Lesser General Public
36 | * License along with this library in the file COPYING.LIB;
37 | * if not, write to the Free Software Foundation, Inc.,
38 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
39 | */
40 |
41 | #include "pthread.h"
42 | #include "implement.h"
43 |
44 | #include "pthread_attr_init.c"
45 | #include "pthread_attr_destroy.c"
46 | #include "pthread_attr_getdetachstate.c"
47 | #include "pthread_attr_setdetachstate.c"
48 | #include "pthread_attr_getstackaddr.c"
49 | #include "pthread_attr_setstackaddr.c"
50 | #include "pthread_attr_getstacksize.c"
51 | #include "pthread_attr_setstacksize.c"
52 | #include "pthread_attr_getscope.c"
53 | #include "pthread_attr_setscope.c"
54 |
--------------------------------------------------------------------------------
/pthreads/barrier.c:
--------------------------------------------------------------------------------
1 | /*
2 | * barrier.c
3 | *
4 | * Description:
5 | * This translation unit implements barrier primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #include "pthread_barrier_init.c"
42 | #include "pthread_barrier_destroy.c"
43 | #include "pthread_barrier_wait.c"
44 | #include "pthread_barrierattr_init.c"
45 | #include "pthread_barrierattr_destroy.c"
46 | #include "pthread_barrierattr_getpshared.c"
47 | #include "pthread_barrierattr_setpshared.c"
48 |
--------------------------------------------------------------------------------
/pthreads/cancel.c:
--------------------------------------------------------------------------------
1 | /*
2 | * cancel.c
3 | *
4 | * Description:
5 | * POSIX thread functions related to thread cancellation.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #include "pthread_setcancelstate.c"
42 | #include "pthread_setcanceltype.c"
43 | #include "pthread_testcancel.c"
44 | #include "pthread_cancel.c"
45 |
--------------------------------------------------------------------------------
/pthreads/condvar.c:
--------------------------------------------------------------------------------
1 | /*
2 | * condvar.c
3 | *
4 | * Description:
5 | * This translation unit implements condition variables and their primitives.
6 | *
7 | *
8 | * --------------------------------------------------------------------------
9 | *
10 | * Pthreads-win32 - POSIX Threads Library for Win32
11 | * Copyright(C) 1998 John E. Bossom
12 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
13 | *
14 | * Contact Email: rpj@callisto.canberra.edu.au
15 | *
16 | * The current list of contributors is contained
17 | * in the file CONTRIBUTORS included with the source
18 | * code distribution. The list can also be seen at the
19 | * following World Wide Web location:
20 | * http://sources.redhat.com/pthreads-win32/contributors.html
21 | *
22 | * This library is free software; you can redistribute it and/or
23 | * modify it under the terms of the GNU Lesser General Public
24 | * License as published by the Free Software Foundation; either
25 | * version 2 of the License, or (at your option) any later version.
26 | *
27 | * This library is distributed in the hope that it will be useful,
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 | * Lesser General Public License for more details.
31 | *
32 | * You should have received a copy of the GNU Lesser General Public
33 | * License along with this library in the file COPYING.LIB;
34 | * if not, write to the Free Software Foundation, Inc.,
35 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
36 | *
37 | */
38 |
39 | #include "pthread.h"
40 | #include "implement.h"
41 |
42 | #include "ptw32_cond_check_need_init.c"
43 | #include "pthread_condattr_init.c"
44 | #include "pthread_condattr_destroy.c"
45 | #include "pthread_condattr_getpshared.c"
46 | #include "pthread_condattr_setpshared.c"
47 | #include "pthread_cond_init.c"
48 | #include "pthread_cond_destroy.c"
49 | #include "pthread_cond_wait.c"
50 | #include "pthread_cond_signal.c"
51 |
--------------------------------------------------------------------------------
/pthreads/exit.c:
--------------------------------------------------------------------------------
1 | /*
2 | * exit.c
3 | *
4 | * Description:
5 | * This translation unit implements routines associated with exiting from
6 | * a thread.
7 | *
8 | * --------------------------------------------------------------------------
9 | *
10 | * Pthreads-win32 - POSIX Threads Library for Win32
11 | * Copyright(C) 1998 John E. Bossom
12 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
13 | *
14 | * Contact Email: rpj@callisto.canberra.edu.au
15 | *
16 | * The current list of contributors is contained
17 | * in the file CONTRIBUTORS included with the source
18 | * code distribution. The list can also be seen at the
19 | * following World Wide Web location:
20 | * http://sources.redhat.com/pthreads-win32/contributors.html
21 | *
22 | * This library is free software; you can redistribute it and/or
23 | * modify it under the terms of the GNU Lesser General Public
24 | * License as published by the Free Software Foundation; either
25 | * version 2 of the License, or (at your option) any later version.
26 | *
27 | * This library is distributed in the hope that it will be useful,
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 | * Lesser General Public License for more details.
31 | *
32 | * You should have received a copy of the GNU Lesser General Public
33 | * License along with this library in the file COPYING.LIB;
34 | * if not, write to the Free Software Foundation, Inc.,
35 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
36 | */
37 |
38 | #include "pthread.h"
39 | #include "implement.h"
40 | #if ! defined(_UWIN) && ! defined(WINCE)
41 | # include
42 | #endif
43 |
44 | #include "pthread_exit.c"
45 |
--------------------------------------------------------------------------------
/pthreads/fork.c:
--------------------------------------------------------------------------------
1 | /*
2 | * fork.c
3 | *
4 | * Description:
5 | * Implementation of fork() for POSIX threads.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 |
38 | #include "pthread.h"
39 | #include "implement.h"
40 |
--------------------------------------------------------------------------------
/pthreads/misc.c:
--------------------------------------------------------------------------------
1 | /*
2 | * misc.c
3 | *
4 | * Description:
5 | * This translation unit implements miscellaneous thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #include "pthread_kill.c"
42 | #include "pthread_once.c"
43 | #include "pthread_self.c"
44 | #include "pthread_equal.c"
45 | #include "pthread_setconcurrency.c"
46 | #include "pthread_getconcurrency.c"
47 | #include "ptw32_new.c"
48 | #include "ptw32_calloc.c"
49 | #include "ptw32_reuse.c"
50 | #include "w32_CancelableWait.c"
51 |
--------------------------------------------------------------------------------
/pthreads/mutex.c:
--------------------------------------------------------------------------------
1 | /*
2 | * mutex.c
3 | *
4 | * Description:
5 | * This translation unit implements mutual exclusion (mutex) primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #if ! defined(_UWIN) && ! defined(WINCE)
38 | # include
39 | #endif
40 | #if !defined(NEED_FTIME)
41 | #include
42 | #endif
43 | #include "pthread.h"
44 | #include "implement.h"
45 |
46 |
47 | #include "ptw32_mutex_check_need_init.c"
48 | #include "pthread_mutex_init.c"
49 | #include "pthread_mutex_destroy.c"
50 | #include "pthread_mutexattr_init.c"
51 | #include "pthread_mutexattr_destroy.c"
52 | #include "pthread_mutexattr_getpshared.c"
53 | #include "pthread_mutexattr_setpshared.c"
54 | #include "pthread_mutexattr_settype.c"
55 | #include "pthread_mutexattr_gettype.c"
56 | #include "pthread_mutexattr_setrobust.c"
57 | #include "pthread_mutexattr_getrobust.c"
58 | #include "pthread_mutex_lock.c"
59 | #include "pthread_mutex_timedlock.c"
60 | #include "pthread_mutex_unlock.c"
61 | #include "pthread_mutex_trylock.c"
62 | #include "pthread_mutex_consistent.c"
63 |
--------------------------------------------------------------------------------
/pthreads/nonportable.c:
--------------------------------------------------------------------------------
1 | /*
2 | * nonportable.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | #include "pthread_mutexattr_setkind_np.c"
41 | #include "pthread_mutexattr_getkind_np.c"
42 | #include "pthread_getw32threadhandle_np.c"
43 | #include "pthread_getunique_np.c"
44 | #include "pthread_delay_np.c"
45 | #include "pthread_num_processors_np.c"
46 | #include "pthread_win32_attach_detach_np.c"
47 | #include "pthread_timechange_handler_np.c"
48 |
--------------------------------------------------------------------------------
/pthreads/private.c:
--------------------------------------------------------------------------------
1 | /*
2 | * private.c
3 | *
4 | * Description:
5 | * This translation unit implements routines which are private to
6 | * the implementation and may be used throughout it.
7 | *
8 | * --------------------------------------------------------------------------
9 | *
10 | * Pthreads-win32 - POSIX Threads Library for Win32
11 | * Copyright(C) 1998 John E. Bossom
12 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
13 | *
14 | * Contact Email: rpj@callisto.canberra.edu.au
15 | *
16 | * The current list of contributors is contained
17 | * in the file CONTRIBUTORS included with the source
18 | * code distribution. The list can also be seen at the
19 | * following World Wide Web location:
20 | * http://sources.redhat.com/pthreads-win32/contributors.html
21 | *
22 | * This library is free software; you can redistribute it and/or
23 | * modify it under the terms of the GNU Lesser General Public
24 | * License as published by the Free Software Foundation; either
25 | * version 2 of the License, or (at your option) any later version.
26 | *
27 | * This library is distributed in the hope that it will be useful,
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 | * Lesser General Public License for more details.
31 | *
32 | * You should have received a copy of the GNU Lesser General Public
33 | * License along with this library in the file COPYING.LIB;
34 | * if not, write to the Free Software Foundation, Inc.,
35 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
36 | */
37 |
38 | #include "pthread.h"
39 | #include "implement.h"
40 |
41 | #include "ptw32_MCS_lock.c"
42 | #include "ptw32_is_attr.c"
43 | #include "ptw32_processInitialize.c"
44 | #include "ptw32_processTerminate.c"
45 | #include "ptw32_threadStart.c"
46 | #include "ptw32_threadDestroy.c"
47 | #include "ptw32_tkAssocCreate.c"
48 | #include "ptw32_tkAssocDestroy.c"
49 | #include "ptw32_callUserDestroyRoutines.c"
50 | #include "ptw32_semwait.c"
51 | #include "ptw32_timespec.c"
52 | #include "ptw32_relmillisecs.c"
53 | #include "ptw32_throw.c"
54 | #include "ptw32_getprocessors.c"
55 |
--------------------------------------------------------------------------------
/pthreads/pthread.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread.c
3 | *
4 | * Description:
5 | * This translation unit agregates pthreads-win32 translation units.
6 | * It is used for inline optimisation of the library,
7 | * maximising for speed at the expense of size.
8 | *
9 | * --------------------------------------------------------------------------
10 | *
11 | * Pthreads-win32 - POSIX Threads Library for Win32
12 | * Copyright(C) 1998 John E. Bossom
13 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
14 | *
15 | * Contact Email: rpj@callisto.canberra.edu.au
16 | *
17 | * The current list of contributors is contained
18 | * in the file CONTRIBUTORS included with the source
19 | * code distribution. The list can also be seen at the
20 | * following World Wide Web location:
21 | * http://sources.redhat.com/pthreads-win32/contributors.html
22 | *
23 | * This library is free software; you can redistribute it and/or
24 | * modify it under the terms of the GNU Lesser General Public
25 | * License as published by the Free Software Foundation; either
26 | * version 2 of the License, or (at your option) any later version.
27 | *
28 | * This library is distributed in the hope that it will be useful,
29 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 | * Lesser General Public License for more details.
32 | *
33 | * You should have received a copy of the GNU Lesser General Public
34 | * License along with this library in the file COPYING.LIB;
35 | * if not, write to the Free Software Foundation, Inc.,
36 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
37 | */
38 |
39 | #include "pthread.h"
40 | #include "implement.h"
41 |
42 | /* The following are ordered for inlining */
43 |
44 | #include "private.c"
45 | #include "attr.c"
46 | #include "barrier.c"
47 | #include "cancel.c"
48 | #include "cleanup.c"
49 | #include "condvar.c"
50 | #include "create.c"
51 | #include "dll.c"
52 | #include "autostatic.c"
53 | #include "errno.c"
54 | #include "exit.c"
55 | #include "fork.c"
56 | #include "global.c"
57 | #include "misc.c"
58 | #include "mutex.c"
59 | #include "nonportable.c"
60 | #include "rwlock.c"
61 | #include "sched.c"
62 | #include "semaphore.c"
63 | #include "signal.c"
64 | #include "spin.c"
65 | #include "sync.c"
66 | #include "tsd.c"
67 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_getinheritsched.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_getinheritsched.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_getinheritsched (const pthread_attr_t * attr, int *inheritsched)
43 | {
44 | if (ptw32_is_attr (attr) != 0 || inheritsched == NULL)
45 | {
46 | return EINVAL;
47 | }
48 |
49 | *inheritsched = (*attr)->inheritsched;
50 | return 0;
51 | }
52 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_getschedparam.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_getschedparam.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_getschedparam (const pthread_attr_t * attr,
43 | struct sched_param *param)
44 | {
45 | if (ptw32_is_attr (attr) != 0 || param == NULL)
46 | {
47 | return EINVAL;
48 | }
49 |
50 | memcpy (param, &(*attr)->param, sizeof (*param));
51 | return 0;
52 | }
53 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_getschedpolicy.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_getschedpolicy.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_getschedpolicy (const pthread_attr_t * attr, int *policy)
43 | {
44 | if (ptw32_is_attr (attr) != 0 || policy == NULL)
45 | {
46 | return EINVAL;
47 | }
48 |
49 | /*
50 | * Validate the policy arg.
51 | * Check that a policy constant wasn't passed rather than &policy.
52 | */
53 | if (policy <= (int *) SCHED_MAX)
54 | {
55 | return EINVAL;
56 | }
57 |
58 | *policy = SCHED_OTHER;
59 |
60 | return 0;
61 | }
62 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_getscope.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_getscope.c
3 | *
4 | * Description:
5 | * This translation unit implements operations on thread attribute objects.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | /* ignore warning "unreferenced formal parameter" */
41 | #if defined(_MSC_VER)
42 | #pragma warning( disable : 4100 )
43 | #endif
44 |
45 | int
46 | pthread_attr_getscope (const pthread_attr_t * attr, int *contentionscope)
47 | {
48 | #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
49 | *contentionscope = (*attr)->contentionscope;
50 | return 0;
51 | #else
52 | return ENOSYS;
53 | #endif
54 | }
55 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_setinheritsched.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_setinheritsched.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_setinheritsched (pthread_attr_t * attr, int inheritsched)
43 | {
44 | if (ptw32_is_attr (attr) != 0)
45 | {
46 | return EINVAL;
47 | }
48 |
49 | if (PTHREAD_INHERIT_SCHED != inheritsched
50 | && PTHREAD_EXPLICIT_SCHED != inheritsched)
51 | {
52 | return EINVAL;
53 | }
54 |
55 | (*attr)->inheritsched = inheritsched;
56 | return 0;
57 | }
58 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_setschedparam.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_setschedparam.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_setschedparam (pthread_attr_t * attr,
43 | const struct sched_param *param)
44 | {
45 | int priority;
46 |
47 | if (ptw32_is_attr (attr) != 0 || param == NULL)
48 | {
49 | return EINVAL;
50 | }
51 |
52 | priority = param->sched_priority;
53 |
54 | /* Validate priority level. */
55 | if (priority < sched_get_priority_min (SCHED_OTHER) ||
56 | priority > sched_get_priority_max (SCHED_OTHER))
57 | {
58 | return EINVAL;
59 | }
60 |
61 | memcpy (&(*attr)->param, param, sizeof (*param));
62 | return 0;
63 | }
64 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_setschedpolicy.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_setschedpolicy.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | pthread_attr_setschedpolicy (pthread_attr_t * attr, int policy)
43 | {
44 | if (ptw32_is_attr (attr) != 0)
45 | {
46 | return EINVAL;
47 | }
48 |
49 | if (policy != SCHED_OTHER)
50 | {
51 | return ENOTSUP;
52 | }
53 |
54 | return 0;
55 | }
56 |
--------------------------------------------------------------------------------
/pthreads/pthread_attr_setscope.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_attr_setscope.c
3 | *
4 | * Description:
5 | * This translation unit implements operations on thread attribute objects.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | /* ignore warning "unreferenced formal parameter" */
41 | #if defined(_MSC_VER)
42 | #pragma warning( disable : 4100 )
43 | #endif
44 |
45 | int
46 | pthread_attr_setscope (pthread_attr_t * attr, int contentionscope)
47 | {
48 | #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
49 | switch (contentionscope)
50 | {
51 | case PTHREAD_SCOPE_SYSTEM:
52 | (*attr)->contentionscope = contentionscope;
53 | return 0;
54 | case PTHREAD_SCOPE_PROCESS:
55 | return ENOTSUP;
56 | default:
57 | return EINVAL;
58 | }
59 | #else
60 | return ENOSYS;
61 | #endif
62 | }
63 |
--------------------------------------------------------------------------------
/pthreads/pthread_barrier_init.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_barrier_init.c
3 | *
4 | * Description:
5 | * This translation unit implements barrier primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | int
42 | pthread_barrier_init (pthread_barrier_t * barrier,
43 | const pthread_barrierattr_t * attr, unsigned int count)
44 | {
45 | pthread_barrier_t b;
46 |
47 | if (barrier == NULL || count == 0)
48 | {
49 | return EINVAL;
50 | }
51 |
52 | if (NULL != (b = (pthread_barrier_t) calloc (1, sizeof (*b))))
53 | {
54 | b->pshared = (attr != NULL && *attr != NULL
55 | ? (*attr)->pshared : PTHREAD_PROCESS_PRIVATE);
56 |
57 | b->nCurrentBarrierHeight = b->nInitialBarrierHeight = count;
58 | b->lock = 0;
59 |
60 | if (0 == sem_init (&(b->semBarrierBreeched), b->pshared, 0))
61 | {
62 | *barrier = b;
63 | return 0;
64 | }
65 | (void) free (b);
66 | }
67 |
68 | return ENOMEM;
69 | }
70 |
--------------------------------------------------------------------------------
/pthreads/pthread_getconcurrency.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_getconcurrency.c
3 | *
4 | * Description:
5 | * This translation unit implements miscellaneous thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | int
42 | pthread_getconcurrency (void)
43 | {
44 | return ptw32_concurrency;
45 | }
46 |
--------------------------------------------------------------------------------
/pthreads/pthread_getunique_np.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_getunique_np.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | /*
41 | *
42 | */
43 | unsigned __int64
44 | pthread_getunique_np (pthread_t thread)
45 | {
46 | return ((ptw32_thread_t*)thread.p)->seqNumber;
47 | }
48 |
--------------------------------------------------------------------------------
/pthreads/pthread_getw32threadhandle_np.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_getw32threadhandle_np.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | /*
41 | * pthread_getw32threadhandle_np()
42 | *
43 | * Returns the win32 thread handle that the POSIX
44 | * thread "thread" is running as.
45 | *
46 | * Applications can use the win32 handle to set
47 | * win32 specific attributes of the thread.
48 | */
49 | HANDLE
50 | pthread_getw32threadhandle_np (pthread_t thread)
51 | {
52 | return ((ptw32_thread_t *)thread.p)->threadH;
53 | }
54 |
55 | /*
56 | * pthread_getw32threadid_np()
57 | *
58 | * Returns the win32 thread id that the POSIX
59 | * thread "thread" is running as.
60 | */
61 | DWORD
62 | pthread_getw32threadid_np (pthread_t thread)
63 | {
64 | return ((ptw32_thread_t *)thread.p)->thread;
65 | }
66 |
--------------------------------------------------------------------------------
/pthreads/pthread_mutexattr_getkind_np.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_mutexattr_getkind_np.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | int
41 | pthread_mutexattr_getkind_np (pthread_mutexattr_t * attr, int *kind)
42 | {
43 | return pthread_mutexattr_gettype (attr, kind);
44 | }
45 |
--------------------------------------------------------------------------------
/pthreads/pthread_mutexattr_gettype.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_mutexattr_gettype.c
3 | *
4 | * Description:
5 | * This translation unit implements mutual exclusion (mutex) primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | int
42 | pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind)
43 | {
44 | int result = 0;
45 |
46 | if (attr != NULL && *attr != NULL && kind != NULL)
47 | {
48 | *kind = (*attr)->kind;
49 | }
50 | else
51 | {
52 | result = EINVAL;
53 | }
54 |
55 | return (result);
56 | }
57 |
--------------------------------------------------------------------------------
/pthreads/pthread_mutexattr_setkind_np.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_mutexattr_setkind_np.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | int
41 | pthread_mutexattr_setkind_np (pthread_mutexattr_t * attr, int kind)
42 | {
43 | return pthread_mutexattr_settype (attr, kind);
44 | }
45 |
--------------------------------------------------------------------------------
/pthreads/pthread_num_processors_np.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_num_processors_np.c
3 | *
4 | * Description:
5 | * This translation unit implements non-portable thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | /*
41 | * pthread_num_processors_np()
42 | *
43 | * Get the number of CPUs available to the process.
44 | */
45 | int
46 | pthread_num_processors_np (void)
47 | {
48 | int count;
49 |
50 | if (ptw32_getprocessors (&count) != 0)
51 | {
52 | count = 1;
53 | }
54 |
55 | return (count);
56 | }
57 |
--------------------------------------------------------------------------------
/pthreads/pthread_setconcurrency.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_setconcurrency.c
3 | *
4 | * Description:
5 | * This translation unit implements miscellaneous thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | int
42 | pthread_setconcurrency (int level)
43 | {
44 | if (level < 0)
45 | {
46 | return EINVAL;
47 | }
48 | else
49 | {
50 | ptw32_concurrency = level;
51 | return 0;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pthreads/pthread_spin_unlock.c:
--------------------------------------------------------------------------------
1 | /*
2 | * pthread_spin_unlock.c
3 | *
4 | * Description:
5 | * This translation unit implements spin lock primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | int
42 | pthread_spin_unlock (pthread_spinlock_t * lock)
43 | {
44 | register pthread_spinlock_t s;
45 |
46 | if (NULL == lock || NULL == *lock)
47 | {
48 | return (EINVAL);
49 | }
50 |
51 | s = *lock;
52 |
53 | if (s == PTHREAD_SPINLOCK_INITIALIZER)
54 | {
55 | return EPERM;
56 | }
57 |
58 | switch ((long)
59 | PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock,
60 | (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED,
61 | (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED))
62 | {
63 | case PTW32_SPIN_LOCKED:
64 | case PTW32_SPIN_UNLOCKED:
65 | return 0;
66 | case PTW32_SPIN_USE_MUTEX:
67 | return pthread_mutex_unlock (&(s->u.mutex));
68 | }
69 |
70 | return EINVAL;
71 | }
72 |
--------------------------------------------------------------------------------
/pthreads/ptw32_calloc.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ptw32_calloc.c
3 | *
4 | * Description:
5 | * This translation unit implements miscellaneous thread functions.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #if defined(NEED_CALLOC)
42 | void *
43 | ptw32_calloc (size_t n, size_t s)
44 | {
45 | unsigned int m = n * s;
46 | void *p;
47 |
48 | p = malloc (m);
49 | if (p == NULL)
50 | return NULL;
51 |
52 | memset (p, 0, m);
53 |
54 | return p;
55 | }
56 | #endif
57 |
--------------------------------------------------------------------------------
/pthreads/ptw32_is_attr.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ptw32_is_attr.c
3 | *
4 | * Description:
5 | * This translation unit implements operations on thread attribute objects.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | int
41 | ptw32_is_attr (const pthread_attr_t * attr)
42 | {
43 | /* Return 0 if the attr object is valid, non-zero otherwise. */
44 |
45 | return (attr == NULL ||
46 | *attr == NULL || (*attr)->valid != PTW32_ATTR_VALID);
47 | }
48 |
--------------------------------------------------------------------------------
/pthreads/ptw32_rwlock_cancelwrwait.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ptw32_rwlock_cancelwrwait.c
3 | *
4 | * Description:
5 | * This translation unit implements read/write lock primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 | void
41 | ptw32_rwlock_cancelwrwait (void *arg)
42 | {
43 | pthread_rwlock_t rwl = (pthread_rwlock_t) arg;
44 |
45 | rwl->nSharedAccessCount = -rwl->nCompletedSharedAccessCount;
46 | rwl->nCompletedSharedAccessCount = 0;
47 |
48 | (void) pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted));
49 | (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));
50 | }
51 |
--------------------------------------------------------------------------------
/pthreads/rwlock.c:
--------------------------------------------------------------------------------
1 | /*
2 | * rwlock.c
3 | *
4 | * Description:
5 | * This translation unit implements read/write lock primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "ptw32_rwlock_check_need_init.c"
38 | #include "ptw32_rwlock_cancelwrwait.c"
39 | #include "pthread_rwlock_init.c"
40 | #include "pthread_rwlock_destroy.c"
41 | #include "pthread_rwlockattr_init.c"
42 | #include "pthread_rwlockattr_destroy.c"
43 | #include "pthread_rwlockattr_getpshared.c"
44 | #include "pthread_rwlockattr_setpshared.c"
45 | #include "pthread_rwlock_rdlock.c"
46 | #include "pthread_rwlock_timedrdlock.c"
47 | #include "pthread_rwlock_wrlock.c"
48 | #include "pthread_rwlock_timedwrlock.c"
49 | #include "pthread_rwlock_unlock.c"
50 | #include "pthread_rwlock_tryrdlock.c"
51 | #include "pthread_rwlock_trywrlock.c"
52 |
--------------------------------------------------------------------------------
/pthreads/sched.c:
--------------------------------------------------------------------------------
1 | /*
2 | * sched.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | #include "pthread_attr_setschedpolicy.c"
42 | #include "pthread_attr_getschedpolicy.c"
43 | #include "pthread_attr_setschedparam.c"
44 | #include "pthread_attr_getschedparam.c"
45 | #include "pthread_attr_setinheritsched.c"
46 | #include "pthread_attr_getinheritsched.c"
47 | #include "pthread_setschedparam.c"
48 | #include "pthread_getschedparam.c"
49 | #include "sched_get_priority_max.c"
50 | #include "sched_get_priority_min.c"
51 | #include "sched_setscheduler.c"
52 | #include "sched_getscheduler.c"
53 | #include "sched_yield.c"
54 |
--------------------------------------------------------------------------------
/pthreads/sched_getscheduler.c:
--------------------------------------------------------------------------------
1 | /*
2 | * sched_getscheduler.c
3 | *
4 | * Description:
5 | * POSIX thread functions that deal with thread scheduling.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 | #include "sched.h"
40 |
41 | int
42 | sched_getscheduler (pid_t pid)
43 | {
44 | /*
45 | * Win32 only has one policy which we call SCHED_OTHER.
46 | * However, we try to provide other valid side-effects
47 | * such as EPERM and ESRCH errors.
48 | */
49 | if (0 != pid)
50 | {
51 | int selfPid = (int) GetCurrentProcessId ();
52 |
53 | if (pid != selfPid)
54 | {
55 | HANDLE h =
56 | OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) pid);
57 |
58 | if (NULL == h)
59 | {
60 | errno =
61 | (GetLastError () ==
62 | (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH;
63 | return -1;
64 | }
65 | else
66 | CloseHandle(h);
67 | }
68 | }
69 |
70 | return SCHED_OTHER;
71 | }
72 |
--------------------------------------------------------------------------------
/pthreads/sem_close.c:
--------------------------------------------------------------------------------
1 | /*
2 | * -------------------------------------------------------------
3 | *
4 | * Module: sem_close.c
5 | *
6 | * Purpose:
7 | * Semaphores aren't actually part of the PThreads standard.
8 | * They are defined by the POSIX Standard:
9 | *
10 | * POSIX 1003.1b-1993 (POSIX.1b)
11 | *
12 | * -------------------------------------------------------------
13 | *
14 | * --------------------------------------------------------------------------
15 | *
16 | * Pthreads-win32 - POSIX Threads Library for Win32
17 | * Copyright(C) 1998 John E. Bossom
18 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
19 | *
20 | * Contact Email: rpj@callisto.canberra.edu.au
21 | *
22 | * The current list of contributors is contained
23 | * in the file CONTRIBUTORS included with the source
24 | * code distribution. The list can also be seen at the
25 | * following World Wide Web location:
26 | * http://sources.redhat.com/pthreads-win32/contributors.html
27 | *
28 | * This library is free software; you can redistribute it and/or
29 | * modify it under the terms of the GNU Lesser General Public
30 | * License as published by the Free Software Foundation; either
31 | * version 2 of the License, or (at your option) any later version.
32 | *
33 | * This library is distributed in the hope that it will be useful,
34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 | * Lesser General Public License for more details.
37 | *
38 | * You should have received a copy of the GNU Lesser General Public
39 | * License along with this library in the file COPYING.LIB;
40 | * if not, write to the Free Software Foundation, Inc.,
41 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
42 | */
43 |
44 | #include "pthread.h"
45 | #include "semaphore.h"
46 | #include "implement.h"
47 |
48 | /* ignore warning "unreferenced formal parameter" */
49 | #if defined(_MSC_VER)
50 | #pragma warning( disable : 4100 )
51 | #endif
52 |
53 | int
54 | sem_close (sem_t * sem)
55 | {
56 | errno = ENOSYS;
57 | return -1;
58 | } /* sem_close */
59 |
--------------------------------------------------------------------------------
/pthreads/sem_open.c:
--------------------------------------------------------------------------------
1 | /*
2 | * -------------------------------------------------------------
3 | *
4 | * Module: sem_open.c
5 | *
6 | * Purpose:
7 | * Semaphores aren't actually part of the PThreads standard.
8 | * They are defined by the POSIX Standard:
9 | *
10 | * POSIX 1003.1b-1993 (POSIX.1b)
11 | *
12 | * -------------------------------------------------------------
13 | *
14 | * --------------------------------------------------------------------------
15 | *
16 | * Pthreads-win32 - POSIX Threads Library for Win32
17 | * Copyright(C) 1998 John E. Bossom
18 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
19 | *
20 | * Contact Email: rpj@callisto.canberra.edu.au
21 | *
22 | * The current list of contributors is contained
23 | * in the file CONTRIBUTORS included with the source
24 | * code distribution. The list can also be seen at the
25 | * following World Wide Web location:
26 | * http://sources.redhat.com/pthreads-win32/contributors.html
27 | *
28 | * This library is free software; you can redistribute it and/or
29 | * modify it under the terms of the GNU Lesser General Public
30 | * License as published by the Free Software Foundation; either
31 | * version 2 of the License, or (at your option) any later version.
32 | *
33 | * This library is distributed in the hope that it will be useful,
34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 | * Lesser General Public License for more details.
37 | *
38 | * You should have received a copy of the GNU Lesser General Public
39 | * License along with this library in the file COPYING.LIB;
40 | * if not, write to the Free Software Foundation, Inc.,
41 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
42 | */
43 |
44 | #include "pthread.h"
45 | #include "semaphore.h"
46 | #include "implement.h"
47 |
48 | /* ignore warning "unreferenced formal parameter" */
49 | #if defined(_MSC_VER)
50 | #pragma warning( disable : 4100 )
51 | #endif
52 |
53 | int
54 | sem_open (const char *name, int oflag, mode_t mode, unsigned int value)
55 | {
56 | errno = ENOSYS;
57 | return -1;
58 | } /* sem_open */
59 |
--------------------------------------------------------------------------------
/pthreads/sem_unlink.c:
--------------------------------------------------------------------------------
1 | /*
2 | * -------------------------------------------------------------
3 | *
4 | * Module: sem_unlink.c
5 | *
6 | * Purpose:
7 | * Semaphores aren't actually part of the PThreads standard.
8 | * They are defined by the POSIX Standard:
9 | *
10 | * POSIX 1003.1b-1993 (POSIX.1b)
11 | *
12 | * -------------------------------------------------------------
13 | *
14 | * --------------------------------------------------------------------------
15 | *
16 | * Pthreads-win32 - POSIX Threads Library for Win32
17 | * Copyright(C) 1998 John E. Bossom
18 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
19 | *
20 | * Contact Email: rpj@callisto.canberra.edu.au
21 | *
22 | * The current list of contributors is contained
23 | * in the file CONTRIBUTORS included with the source
24 | * code distribution. The list can also be seen at the
25 | * following World Wide Web location:
26 | * http://sources.redhat.com/pthreads-win32/contributors.html
27 | *
28 | * This library is free software; you can redistribute it and/or
29 | * modify it under the terms of the GNU Lesser General Public
30 | * License as published by the Free Software Foundation; either
31 | * version 2 of the License, or (at your option) any later version.
32 | *
33 | * This library is distributed in the hope that it will be useful,
34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 | * Lesser General Public License for more details.
37 | *
38 | * You should have received a copy of the GNU Lesser General Public
39 | * License along with this library in the file COPYING.LIB;
40 | * if not, write to the Free Software Foundation, Inc.,
41 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
42 | */
43 |
44 | #include "pthread.h"
45 | #include "semaphore.h"
46 | #include "implement.h"
47 |
48 | /* ignore warning "unreferenced formal parameter" */
49 | #if defined(_MSC_VER)
50 | #pragma warning( disable : 4100 )
51 | #endif
52 |
53 | int
54 | sem_unlink (const char *name)
55 | {
56 | errno = ENOSYS;
57 | return -1;
58 | } /* sem_unlink */
59 |
--------------------------------------------------------------------------------
/pthreads/spin.c:
--------------------------------------------------------------------------------
1 | /*
2 | * spin.c
3 | *
4 | * Description:
5 | * This translation unit implements spin lock primitives.
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #include "ptw32_spinlock_check_need_init.c"
42 | #include "pthread_spin_init.c"
43 | #include "pthread_spin_destroy.c"
44 | #include "pthread_spin_lock.c"
45 | #include "pthread_spin_unlock.c"
46 | #include "pthread_spin_trylock.c"
47 |
--------------------------------------------------------------------------------
/pthreads/sync.c:
--------------------------------------------------------------------------------
1 | /*
2 | * sync.c
3 | *
4 | * Description:
5 | * This translation unit implements functions related to thread
6 | * synchronisation.
7 | *
8 | * --------------------------------------------------------------------------
9 | *
10 | * Pthreads-win32 - POSIX Threads Library for Win32
11 | * Copyright(C) 1998 John E. Bossom
12 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
13 | *
14 | * Contact Email: rpj@callisto.canberra.edu.au
15 | *
16 | * The current list of contributors is contained
17 | * in the file CONTRIBUTORS included with the source
18 | * code distribution. The list can also be seen at the
19 | * following World Wide Web location:
20 | * http://sources.redhat.com/pthreads-win32/contributors.html
21 | *
22 | * This library is free software; you can redistribute it and/or
23 | * modify it under the terms of the GNU Lesser General Public
24 | * License as published by the Free Software Foundation; either
25 | * version 2 of the License, or (at your option) any later version.
26 | *
27 | * This library is distributed in the hope that it will be useful,
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 | * Lesser General Public License for more details.
31 | *
32 | * You should have received a copy of the GNU Lesser General Public
33 | * License along with this library in the file COPYING.LIB;
34 | * if not, write to the Free Software Foundation, Inc.,
35 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
36 | */
37 |
38 | #include "pthread.h"
39 | #include "implement.h"
40 |
41 |
42 | #include "pthread_detach.c"
43 | #include "pthread_join.c"
44 |
--------------------------------------------------------------------------------
/pthreads/tsd.c:
--------------------------------------------------------------------------------
1 | /*
2 | * tsd.c
3 | *
4 | * Description:
5 | * POSIX thread functions which implement thread-specific data (TSD).
6 | *
7 | * --------------------------------------------------------------------------
8 | *
9 | * Pthreads-win32 - POSIX Threads Library for Win32
10 | * Copyright(C) 1998 John E. Bossom
11 | * Copyright(C) 1999,2005 Pthreads-win32 contributors
12 | *
13 | * Contact Email: rpj@callisto.canberra.edu.au
14 | *
15 | * The current list of contributors is contained
16 | * in the file CONTRIBUTORS included with the source
17 | * code distribution. The list can also be seen at the
18 | * following World Wide Web location:
19 | * http://sources.redhat.com/pthreads-win32/contributors.html
20 | *
21 | * This library is free software; you can redistribute it and/or
22 | * modify it under the terms of the GNU Lesser General Public
23 | * License as published by the Free Software Foundation; either
24 | * version 2 of the License, or (at your option) any later version.
25 | *
26 | * This library is distributed in the hope that it will be useful,
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 | * Lesser General Public License for more details.
30 | *
31 | * You should have received a copy of the GNU Lesser General Public
32 | * License along with this library in the file COPYING.LIB;
33 | * if not, write to the Free Software Foundation, Inc.,
34 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
35 | */
36 |
37 | #include "pthread.h"
38 | #include "implement.h"
39 |
40 |
41 | #include "pthread_key_create.c"
42 | #include "pthread_key_delete.c"
43 | #include "pthread_setspecific.c"
44 | #include "pthread_getspecific.c"
45 |
--------------------------------------------------------------------------------
/tests/50_grey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tests/50_grey.png
--------------------------------------------------------------------------------
/tests/alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tests/alpha.png
--------------------------------------------------------------------------------
/tests/default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/tests/img.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tests/img.bmp
--------------------------------------------------------------------------------
/tests/objects/cube.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/tests/objects/uv_cube.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/tests/performance_tester.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tests/performance_tester.blend
--------------------------------------------------------------------------------
/tests/scene_cube_default_surface.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tests/scene_cube_surface.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/scene_lookat.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/tests/scene_node_tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/tests/solidcol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tests/solidcol.png
--------------------------------------------------------------------------------
/tools/exporter_tester.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jesterKing/CCSycles/830d4128d7bb26bdd26f7458beca3079bcd147a7/tools/exporter_tester.blend
--------------------------------------------------------------------------------