Skip to content

Instantly share code, notes, and snippets.

package test;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
package test;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import javax.imageio.ImageIO;
public class Client12 {
@kjyong1983
kjyong1983 / main_init.cpp
Created June 27, 2021 11:41
simple dx12 initialization
#include<Windows.h>
#include<d3d12.h>
#include"d3dx12.h" // https://github.com/microsoft/DirectX-Headers/blob/main/include/directx/d3dx12.h
#include<dxgi1_6.h>
#include<DirectXColors.h>
#include<DirectXMath.h>
#include<iostream>
#include<string>
#include <comdef.h>
@kjyong1983
kjyong1983 / shaders.hlsl
Created June 27, 2021 11:44
sample shader file for directx 12
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
@kjyong1983
kjyong1983 / main_triangle.cpp
Created June 27, 2021 11:47
simple triangle drawing for directx12
#include<Windows.h>
#include<d3d12.h>
#include"d3dx12.h"
#include<dxgi1_6.h>
#include<dxgidebug.h>
#include<d3dcompiler.h>
#include<DirectXColors.h>
#include<DirectXMath.h>
#include<iostream>
#include<string>
@kjyong1983
kjyong1983 / d3dx12.h
Last active September 4, 2021 10:42
for dx12 study
//*********************************************************
//
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License (MIT).
//
//*********************************************************
#ifndef __D3DX12_H__
#define __D3DX12_H__
@kjyong1983
kjyong1983 / objparser.cpp
Last active September 13, 2021 14:48
simple wavefront .obj parser
#include "objparser.h"
std::vector<std::string> SplitString(std::string input, const char* sep)
{
std::vector<std::string> result;
char* temp = nullptr;
char* next = nullptr;
temp = strtok_s((char*)input.data(), sep, &next);
do
@kjyong1983
kjyong1983 / cube.obj
Created September 8, 2021 13:00
cube wavefront obj format
# cube.obj
#
g cube
v -1.0 -1.0 -1.0
v -1.0 +1.0 -1.0
v +1.0 +1.0 -1.0
v +1.0 -1.0 -1.0
v -1.0 -1.0 +1.0
#include<Windows.h>
#include<d3d12.h>
#include"d3dx12.h"
#include<dxgi1_6.h>
#include<dxgidebug.h>
#include<d3dcompiler.h>
#include<DirectXColors.h>
#include<DirectXMath.h>
#include<iostream>
#include<string>
#include <Windows.h>
#include <d3d12.h>
#include "d3dx12.h"
#include <dxgi1_6.h>
#include <dxgidebug.h>
#include <d3dcompiler.h>
#include <DirectXColors.h>
#include <DirectXMath.h>
#include <iostream>
#include <string>