mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-10-04 17:01:36 +02:00
byuu says: - fixed a bug in xml_element::parse() with <![CDATA[...]]> tags - merged FragmentShader and and VertexShader into Shader, which is an XML file that contains all relevant data - updated Qt port to reflect the above - added support for pixel shaders to the phoenix port - updated all pixel shaders to use the new format - ruby won't crash if you give an HLSL driver a GLSL shader or vice versa, but it will still crash on bad programs - phoenix::Viewport has its own window class, that paints a black brush background [The XML shader] format is subject to change, more specifically I may change the <source> tag from HLSL shaders. In the long-long term, it'd be nice to extend the format to allow multiple shaders to be chained together and to encode base64 texture files. But for now, this is good enough.
18 lines
589 B
C++
Executable File
18 lines
589 B
C++
Executable File
void Viewport::create(Window &parent, unsigned x, unsigned y, unsigned width, unsigned height) {
|
|
widget->window = CreateWindow(
|
|
L"phoenix_viewport", L"",
|
|
WS_CHILD | WS_VISIBLE | WS_DISABLED,
|
|
x, y, width, height,
|
|
parent.widget->window, (HMENU)object->id, GetModuleHandle(0), 0
|
|
);
|
|
SetWindowLongPtr(widget->window, GWLP_USERDATA, (LONG_PTR)this);
|
|
}
|
|
|
|
uintptr_t Viewport::handle() {
|
|
return (uintptr_t)widget->window;
|
|
}
|
|
|
|
static LRESULT CALLBACK Viewport_windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|
return DefWindowProc(hwnd, msg, wparam, lparam);
|
|
}
|