Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Furkan Üzümcü Furkanzmc

🏠
Working from home
View GitHub Profile
@Furkanzmc
Furkanzmc / gist:8336889
Created Jan 9, 2014
*.pro File for SFML
View gist:8336889
INCLUDEPATH += D:\SFML2\include
LIBS += D:\SFML2\lib\sfml-system.lib \
D:\SFML2\lib\sfml-window.lib \
D:\SFML2\lib\sfml-graphics.lib \
D:\SFML2\lib\sfml-audio.lib \
D:\SFML2\lib\sfml-network.lib
@Furkanzmc
Furkanzmc / mainKinect.cpp
Last active Jan 2, 2016
Go through all Kinects...
View mainKinect.cpp
#include <iostream>
#include <Windows.h>
#include <NuiApi.h>
int main() {
INuiSensor *nuiSensor;
HRESULT hr;
HANDLE mHandleSkeletonStream;
HANDLE mHandleNextSkeletonEvent;
int sensorCount = 0;
@Furkanzmc
Furkanzmc / SpriteComponent.h
Last active Aug 29, 2015
A component definition
View SpriteComponent.h
#ifndef SPRITECOMPONENT_H
#define SPRITECOMPONENT_H
#include "BaseComponent.h"
#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Texture.hpp>
class SpriteComponent : public zmc::BaseComponent, public sf::Sprite
{
public:
SpriteComponent(int componentType)
@Furkanzmc
Furkanzmc / ShipEntitySystem.cpp
Last active Aug 29, 2015
An Entity System that inherits BaseEntitySystem
View ShipEntitySystem.cpp
#include "ShipEntitySystem.h"
ShipEntitySystem::ShipEntitySystem(sf::RenderWindow &window)
: mRenderWindow(window)
{
}
ShipEntitySystem::~ShipEntitySystem()
{
@Furkanzmc
Furkanzmc / main.cpp
Last active Aug 29, 2015
main.cpp file for the zmcEntitySystem tutorial
View main.cpp
#include <iostream>
#include <memory>
#include "EntityManager.h"
#include "Example/ShipEntitySystem.h"
#include "Example/SpriteComponent.h"
#include <SFML/Graphics.hpp>
#include "ComponentManager.h"
using namespace std;
using namespace zmc;
@Furkanzmc
Furkanzmc / OpenBR.sh
Created Jul 12, 2014
OpenBR Cmake Command Parameters
View OpenBR.sh
C:\Program Files (x86)\CMake\bin\cmake.exe -G "Visual Studio 12 2013" -DCMAKE_PREFIX_PATH="D:/OpenCV/build;C:/Qt/Qt5.3.1/5.3/msvc2013" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release ..
View WrapLabelText.cpp
void adjustFontSize(Label *label, const float &desiredSize)
{
std::string str = label->getString();
const float estimatedCharSize = label->getBoundingBox().size.width / label->getStringLength();
const float columnNumberToWrap = desiredSize / estimatedCharSize;
const float numberOfTimesToWrap = label->getBoundingBox().size.width / desiredSize;
for (int i = 1; i < numberOfTimesToWrap; i++) {
const int index = columnNumberToWrap * i;
std::string splitter = std::isspace(str.at(index)) ? "\n" : "-\n";
@Furkanzmc
Furkanzmc / VSyncForCocos2dX.cpp
Last active Aug 29, 2015 — forked from daltondotgd/VSyncForCocos2dX.cpp
To enable VSync for WIN32 in cocos2d-x, modify initWithRect(...) function in CCGLView.cpp, so it contains this code right before 'initGlew();'
View VSyncForCocos2dX.cpp
...
...
...
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
// Turn on vertical screen sync under Windows.
// (I.e. it uses the WGL_EXT_swap_control extension)
typedef BOOL(WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int interval);
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
@Furkanzmc
Furkanzmc / FindKinectSDKv2.cmake
Created May 22, 2015
Cmake file to find Kinect SDK v2 library on Windows
View FindKinectSDKv2.cmake
set(KinectSDK2_FOUND OFF CACHE BOOL "Kinect 2.x SDK found")
set(KINECTSDK20_DIR "NOT FOUND" CACHE PATH "Kinect 2.x SDK path")
if(WIN32)
if(EXISTS $ENV{KINECTSDK20_DIR})
message(KINECT_FOUND)
set(KinectSDK2_FOUND ON CACHE BOOL "Kinect 2.x SDK found" FORCE)
set(KinectSDK2_DIR $ENV{KinectSDK2_DIR} CACHE PATH "Kinect 2.x SDK path" FORCE)
if(EXISTS $ENV{KINECTSDK20_DIR}/inc)
set(KinectSDK2_INCLUDE_DIRS $ENV{KINECTSDK20_DIR}/inc)
View Onename Verification.txt
Verifying that +furkanzmc is my blockchain ID. https://onename.com/furkanzmc