1
0
forked from mirrors/0ad

Upgrade the Ogre GLSL Preprocessor

Add #elif support and some fixes.

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2456
This was SVN commit r23404.
This commit is contained in:
Stan
2020-01-15 18:20:36 +00:00
parent eafd44cfc5
commit 215447a761
5 changed files with 1528 additions and 1470 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -25,12 +25,12 @@ class TestPreprocessor : public CxxTest::TestSuite
public:
void setUp()
{
CPreprocessor::ErrorHandler = CPreprocessorWrapper::PyrogenesisShaderError;
Ogre::CPreprocessor::ErrorHandler = CPreprocessorWrapper::PyrogenesisShaderError;
}
void test_basic()
{
CPreprocessor preproc;
Ogre::CPreprocessor preproc;
const char* in = "#define TEST 2\n1+1=TEST\n";
size_t len = 0;
char* out = preproc.Parse(in, strlen(in), len);
@@ -45,7 +45,7 @@ public:
{
TestLogger logger;
CPreprocessor preproc;
Ogre::CPreprocessor preproc;
const char* in = "foo\n#if ()\nbar\n";
size_t len = 0;
char* out = preproc.Parse(in, strlen(in), len);