mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- cleaned up a few copyright notices and unified licenses
This commit is contained in:
parent
6d7458fe42
commit
4f8e0dd936
12 changed files with 97 additions and 49 deletions
|
@ -961,11 +961,6 @@ Coding example #2:
|
||||||
|
|
||||||
TILE VARIABLES:
|
TILE VARIABLES:
|
||||||
NUMTILES - the number of tiles found TILES.DAT.
|
NUMTILES - the number of tiles found TILES.DAT.
|
||||||
TILESIZX[MAXTILES] - simply the x-dimension of the tile number.
|
|
||||||
TILESIZY[MAXTILES] - simply the y-dimension of the tile number.
|
|
||||||
WALOFF[MAXTILES] - the actual address pointing to the top-left
|
|
||||||
corner of the tile.
|
|
||||||
PICANM[MAXTILES] - flags for animating the tile.
|
|
||||||
|
|
||||||
TIMING VARIABLES:
|
TIMING VARIABLES:
|
||||||
TOTALCLOCK - When the engine is initialized, TOTALCLOCK is set to zero.
|
TOTALCLOCK - When the engine is initialized, TOTALCLOCK is set to zero.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
** bitmap.cpp
|
** bitmap.cpp
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2008 Christoph Oelckers
|
** Copyright 2008-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
** bitmap.h
|
** bitmap.h
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2008 Christoph Oelckers
|
** Copyright 2008-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -59,15 +59,15 @@ BuildFiles TileFiles;
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
picanm_t tileConvertAnimFormat(int32_t const picanmdisk)
|
picanm_t tileConvertAnimFormat(int32_t const picanimraw)
|
||||||
{
|
{
|
||||||
// Unpack a 4 byte packed anim descriptor into the internal 5 byte format.
|
// Unpack a 4 byte packed anim descriptor into the internal 5 byte format.
|
||||||
picanm_t anm;
|
picanm_t anm;
|
||||||
anm.num = picanmdisk & 63;
|
anm.num = picanimraw & 63;
|
||||||
anm.xofs = (picanmdisk >> 8) & 255;
|
anm.xofs = (picanimraw >> 8) & 255;
|
||||||
anm.yofs = (picanmdisk >> 16) & 255;
|
anm.yofs = (picanimraw >> 16) & 255;
|
||||||
anm.sf = ((picanmdisk >> 24) & 15) | (picanmdisk & 192);
|
anm.sf = ((picanimraw >> 24) & 15) | (picanimraw & 192);
|
||||||
anm.extra = (picanmdisk >> 28) & 15;
|
anm.extra = (picanimraw >> 28) & 15;
|
||||||
return anm;
|
return anm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,11 +228,10 @@ void BuildFiles::CloseAllMapArt()
|
||||||
//
|
//
|
||||||
// LoadArtFile
|
// LoadArtFile
|
||||||
//
|
//
|
||||||
// Returns the number of tiles found. Also loads all the data for
|
// Returns the number of tiles found.
|
||||||
// R_InitBuildTiles() to process later.
|
|
||||||
//
|
//
|
||||||
// let's load everything into memory on startup.
|
// let's load everything into memory on startup.
|
||||||
// Even for Ion Fury this will merely add 60 MB, because the engine already needs to cache the data, albeit in a compressed-per-lump form,
|
// Even for Ion Fury this will merely add 80 MB, because the engine already needs to cache the data, albeit in a compressed-per-lump form,
|
||||||
// so its 100MB art file will only have a partial impact on memory.
|
// so its 100MB art file will only have a partial impact on memory.
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -300,6 +299,8 @@ void BuildFiles::LoadArtSet(const char* filename)
|
||||||
// For each tile index there may only be one replacement and its
|
// For each tile index there may only be one replacement and its
|
||||||
// type may never change!
|
// type may never change!
|
||||||
//
|
//
|
||||||
|
// All these uses will need some review further down the line so that the texture manager's content is immutable.
|
||||||
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
||||||
|
@ -312,6 +313,13 @@ FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
||||||
FTexture* replacement = nullptr;
|
FTexture* replacement = nullptr;
|
||||||
if (type == FTexture::Writable)
|
if (type == FTexture::Writable)
|
||||||
{
|
{
|
||||||
|
// Creates an empty writable tile.
|
||||||
|
// Current use cases are:
|
||||||
|
// Camera textures (should be made to be creatable by the hardware renderer instead of falling back on the software renderer.)
|
||||||
|
// thumbnails for savegame and loadgame (should bypass the texture manager entirely.)
|
||||||
|
// view tilting in the software renderer (this should just use a local buffer instead of relying on the texture manager.)
|
||||||
|
// Movie playback (like thumbnails this should bypass the texture manager entirely.)
|
||||||
|
// Blood's 'lens' effect (apparently MP only) - combination of a camera texture with a distortion map - should be made a shader effect to be applied to the camera texture.
|
||||||
replacement = new FWritableTile;
|
replacement = new FWritableTile;
|
||||||
}
|
}
|
||||||
else if (type == FTexture::Restorable)
|
else if (type == FTexture::Restorable)
|
||||||
|
@ -320,6 +328,7 @@ FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
||||||
// It only gets used for the crosshair and two specific effects:
|
// It only gets used for the crosshair and two specific effects:
|
||||||
// A) the fire in Blood.
|
// A) the fire in Blood.
|
||||||
// B) the pin display in Redneck Rampage's bowling lanes.
|
// B) the pin display in Redneck Rampage's bowling lanes.
|
||||||
|
// All of these effects should probably be redone without actual texture hacking...
|
||||||
if (tile->GetWidth() == 0 || tile->GetHeight() == 0) return nullptr; // The base must have a size for this to work.
|
if (tile->GetWidth() == 0 || tile->GetHeight() == 0) return nullptr; // The base must have a size for this to work.
|
||||||
// todo: invalidate hardware textures for tile.
|
// todo: invalidate hardware textures for tile.
|
||||||
replacement = new FRestorableTile(tile);
|
replacement = new FRestorableTile(tile);
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
/*
|
/*
|
||||||
** pngtexture.cpp
|
** ddstexture.cpp
|
||||||
** Texture class for DDS images
|
** Texture class for DDS images
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2006-2007 Randy Heit
|
** Copyright 2006-2016 Randy Heit
|
||||||
|
** Copyright 2006-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
** Texture class for JPEG images
|
** Texture class for JPEG images
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2006-2007 Randy Heit
|
** Copyright 2005-2016 Randy Heit
|
||||||
|
** Copyright 2005-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2005 David HENRY
|
** Copyright 2005 David HENRY
|
||||||
** Copyright 2006 Christoph Oelckers
|
** Copyright 2006-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2004-2007 Randy Heit
|
** Copyright 2004-2007 Randy Heit
|
||||||
|
** Copyright 2005-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
** Texture class for TGA images
|
** Texture class for TGA images
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2006 Christoph Oelckers
|
** Copyright 2006-2019 Christoph Oelckers
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -1,24 +1,37 @@
|
||||||
//
|
/*
|
||||||
//---------------------------------------------------------------------------
|
** gl_samplers.cpp
|
||||||
//
|
**
|
||||||
// Copyright(C) 2014-2016 Christoph Oelckers
|
** Texture sampler handling
|
||||||
// All rights reserved.
|
**
|
||||||
//
|
**---------------------------------------------------------------------------
|
||||||
// This program is free software: you can redistribute it and/or modify
|
** Copyright 2015-2019 Christoph Oelckers
|
||||||
// it under the terms of the GNU Lesser General Public License as published by
|
** All rights reserved.
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
**
|
||||||
// (at your option) any later version.
|
** Redistribution and use in source and binary forms, with or without
|
||||||
//
|
** modification, are permitted provided that the following conditions
|
||||||
// This program is distributed in the hope that it will be useful,
|
** are met:
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
**
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
// GNU Lesser General Public License for more details.
|
** notice, this list of conditions and the following disclaimer.
|
||||||
//
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
// along with this program. If not, see http://www.gnu.org/licenses/
|
** documentation and/or other materials provided with the distribution.
|
||||||
//
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
//--------------------------------------------------------------------------
|
** derived from this software without specific prior written permission.
|
||||||
//
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
#include "glad/glad.h"
|
#include "glad/glad.h"
|
||||||
#include "glbackend.h"
|
#include "glbackend.h"
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
** documentation and/or other materials provided with the distribution.
|
** documentation and/or other materials provided with the distribution.
|
||||||
** 3. The name of the author may not be used to endorse or promote products
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
** derived from this software without specific prior written permission.
|
** derived from this software without specific prior written permission.
|
||||||
** 4. When not used as part of GZDoom or a GZDoom derivative, this code will be
|
|
||||||
** covered by the terms of the GNU Lesser General Public License as published
|
|
||||||
** by the Free Software Foundation; either version 2.1 of the License, or (at
|
|
||||||
** your option) any later version.
|
|
||||||
** 5. Full disclosure of the entire project's source code, except for third
|
|
||||||
** party libraries is mandatory. (NOTE: This clause is non-negotiable!)
|
|
||||||
**
|
**
|
||||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
|
|
@ -1,3 +1,37 @@
|
||||||
|
/*
|
||||||
|
** glbackend.cpp
|
||||||
|
**
|
||||||
|
** OpenGL API abstraction
|
||||||
|
**
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
** Copyright 2019 Christoph Oelckers
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
**
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
**
|
||||||
|
*/
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "glad/glad.h"
|
#include "glad/glad.h"
|
||||||
#include "glbackend.h"
|
#include "glbackend.h"
|
||||||
|
@ -77,7 +111,7 @@ void GLInstance::Init()
|
||||||
catch (const std::runtime_error& err)
|
catch (const std::runtime_error& err)
|
||||||
{
|
{
|
||||||
// This is far from an optimal solution but at this point the only way to get the error out.
|
// This is far from an optimal solution but at this point the only way to get the error out.
|
||||||
wm_msgbox("Shader compilation failed", err.what());
|
wm_msgbox(nullptr, "Shader compilation failed: %s", err.what());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue