Skip to content

Instantly share code, notes, and snippets.

View Themaister's full-sized avatar

Hans-Kristian Arntzen Themaister

View GitHub Profile
#include "window.hpp"
#include <iostream>
#include "shader.hpp"
#include "structure.hpp"
#include "mesh.hpp"
#include <assert.h>
using namespace GL;
using namespace GLU;
using namespace GLU::Matrices;
#include "window.hpp"
#include <iostream>
#include "shader.hpp"
#include "structure.hpp"
#include "mesh.hpp"
#include <assert.h>
using namespace GL;
using namespace GLU;
using namespace GLU::Matrices;
<?xml version="1.0" encoding="UTF-8"?>
<!--
Dot 'n bloom shader
Author: Themaister
License: Public domain
-->
<shader language="GLSL">
<vertex><![CDATA[
varying vec2 c00;
varying vec2 c10;
<?xml version="1.0" encoding="UTF-8"?>
<!--
Dot 'n bloom shader
Author: Themaister
License: Public domain
-->
<shader language="GLSL">
<vertex><![CDATA[
varying vec2 c00;
varying vec2 c10;
enum menu_type
{
TEXTURE_BACKDROP,
TEXTURE_MENU
};
bool LoadMenuTexture(enum menu_type type, const std::string &path);
bool PS3Graphics::load_png(const std::string& path, unsigned &width, unsigned &height, uint8_t *data)
{
// Holy shit, Sony!
CtrlMallocArg MallocArg;
CtrlFreeArg FreeArg;
CellPngDecMainHandle mHandle = NULL;
CellPngDecSubHandle sHandle = NULL;
CellPngDecThreadInParam InParam;
CellPngDecThreadOutParam OutParam;
CellPngDecSrc src;
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010-2011 - Hans-Kristian Arntzen
*
* Some code herein may be based on code found in BSNES.
*
* SSNES is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
#ifdef BIG_ENDIAN
struct rgba
{
uint8_t r;
uint8_t g;
/*
Author: Themaister
License: Public domain
*/
struct input
{
float2 video_size;
float2 texture_size;
float2 output_size;
shaders = 2
shader0 = water.cg
filter_linear0 = true
scale_type0 = viewport
scale0 = 1.0
shader1 = mario.cg
filter_linear1 = true