Pioneer
Loading...
Searching...
No Matches
src
scenegraph
ColorMap.h
Go to the documentation of this file.
1
// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4
#ifndef _SCENEGRAPH_COLORMAP_H
5
#define _SCENEGRAPH_COLORMAP_H
6
/*
7
* Color look-up texture generator for newmodel pattern system
8
*/
9
#include "
graphics/Texture.h
"
10
#include "
libs.h
"
11
#include <SDL_stdinc.h>
12
13
namespace
Graphics
{
14
class
Renderer;
15
}
16
17
namespace
SceneGraph
{
18
19
class
ColorMap
{
20
public
:
21
ColorMap
();
22
Graphics::Texture
*
GetTexture
();
23
void
Generate
(
Graphics::Renderer
*r,
const
Color
&a,
const
Color
&b,
const
Color
&c);
24
void
SetSmooth
(
bool
);
25
26
private
:
27
void
AddColor(
int
width,
const
Color
&c, std::vector<Uint8> &out);
28
29
bool
m_smooth;
30
RefCountedPtr<Graphics::Texture>
m_texture;
31
};
32
33
}
// namespace SceneGraph
34
35
#endif
Texture.h
Graphics::Renderer
Definition:
Renderer.h:44
Graphics::Texture
Definition:
Texture.h:106
RefCountedPtr
Definition:
RefCounted.h:36
SceneGraph::ColorMap
Definition:
ColorMap.h:19
SceneGraph::ColorMap::SetSmooth
void SetSmooth(bool)
Definition:
ColorMap.cpp:50
SceneGraph::ColorMap::Generate
void Generate(Graphics::Renderer *r, const Color &a, const Color &b, const Color &c)
Definition:
ColorMap.cpp:30
SceneGraph::ColorMap::ColorMap
ColorMap()
Definition:
ColorMap.cpp:10
SceneGraph::ColorMap::GetTexture
Graphics::Texture * GetTexture()
Definition:
ColorMap.cpp:15
libs.h
Graphics
Definition:
Background.h:14
SceneGraph
Definition:
CityOnPlanet.h:31
Color4ub
Definition:
Color.h:66
Generated by
1.9.5