Skip to content

Instantly share code, notes, and snippets.

View daramkun's full-sized avatar
🐿️

진재연(Jin Jae-yeon) daramkun

🐿️
View GitHub Profile
#include <Windows.h>
int x = 0, y = 0;
LRESULT CALLBACK WndProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
switch ( uMsg )
{
case WM_PAINT:
{
#define _CRT_SECURE_NO_WARNINGS
#include <Windows.h>
#include <cstdio>
#include <cmath>
float x = 0, y = 0;
int targetX = 0, targetY = 0;
float angle;
HBITMAP myBitmap;
#include <Windows.h>
//////////////////////////////////////////////////////////////////
// TODO: Global Variables for Direct3D
bool InitializeDirect3D ( HWND hWnd )
{
// TODO: Initializing Direct3D
namespace ConsoleApplication2
{
class Program
{
static void Main ( string [] args )
{
using ( SharpDX.XAudio2.XAudio2 xaudio2 = new SharpDX.XAudio2.XAudio2 () )
{
using ( System.IO.Stream fileStream = new System.IO.FileStream ( "Test.mp3", System.IO.FileMode.Open ) )
{
@daramkun
daramkun / openal_streaming_with_mediafoundation.cpp
Last active September 6, 2017 18:41
OpenAL Streaming with MediaFoundation
#include <Windows.h>
#include <atlbase.h>
#include <vector>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <mfplay.h>
#include <mftransform.h>
@daramkun
daramkun / xaudio2_streaming_with_mediafoundation.cpp
Created September 7, 2017 07:37
XAudio2 Streaming with MediaFoundation
#include <Windows.h>
#include <atlbase.h>
#include <vector>
#include <functional>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <mfplay.h>
@daramkun
daramkun / ssetest.cpp
Last active October 16, 2017 06:43
SSE Operation Test
////////////////////////////////////////////////////////////////////////////////////////////////////
// Some Source code from https://gist.github.com/rygorous/4172889/3aff2b797b9be7ac261115a95f8d6f6fa32ed54d
//
// You need Intel Haswell Architecture(only Core-i & Xeon) or AMD Piledriver Architecture Processor.
// Because there is no FMA 3 operator in earlier than those.
////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma optimize ( "", off )
#include <cstdio>
#include <Windows.h>
#include <memory>
#include <mmintrin.h>
#include <immintrin.h>
#include <xmmintrin.h>
#include <functional>
#include <cstdio>
class HeapMemory
{
#include <Windows.h>
#include <cstdio>
#include <cstdint>
#define LOOP_REPEAT 10
#define LOOP_COUNT 48000 * 6
int main()
{
int8_t buffer1 [ LOOP_COUNT ];
#include <Windows.h>
#include <string>
#include <sstream>
float g_angle = 0;
LRESULT CALLBACK WndProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
switch ( uMsg )
{