1
0
Fork 0
Commit graph

23 commits

Author SHA1 Message Date
4f04a8e7c9 include/Spectre/Graphics/PixelFormat.h: Define 32BRG and 32BRGA formats. 2020-10-22 16:10:15 +02:00
f7fcc2633c Graphics/Image: dont store PixelFormat, instead define a new enum for number of channels.
The image class has a strict internal representation so we dont need "format".
PixelFormat enum can be passed to functions that modify the pixel data (like setPixels()) so that a proper convertion can be done.
2020-10-22 13:06:19 +02:00
6e14209aae
Font: add FontDescription class. 2020-01-06 00:18:07 +01:00
2dd1187ff2
Font: move Glyph to it's own header. 2020-01-05 23:40:25 +01:00
5c4eea4ae1
Font: rename Driver stuff to Engine and move subdirectory 2020-01-05 23:31:45 +01:00
8b96338e24
include/Spectre/Graphics/Font.h: Minor typo fix. 2020-01-05 23:20:00 +01:00
2a111a237d
Move OpenGL headers from API to implementation.
We don't want to expose any OpenGL functions to client code. Because if we do, there is a chance we break client code if we switch implementation (Direct3D).
2020-01-03 20:30:08 +01:00
4df668e68f
Minor formating fixes. 2019-12-29 22:26:05 +01:00
a39069cdb9
GL/WGL: Upgrade to glad2 2019-12-24 20:29:16 +01:00
e10daeaaa6
Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine.

So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
2019-09-30 19:10:17 +02:00
ba11d5002b include/Spectre/Graphics/PixelFormat.h: Minor stuff. 2019-05-31 19:36:58 +02:00
f1c68cb0b4 remove GLEW headers. 2018-05-14 16:28:06 +02:00
45a3362d99 include/Spectre/Graphics/OpenGL.h: include GLAD instead of glew. 2018-05-14 16:27:55 +02:00
e2195c1d49 Adding GLAD files. 2018-05-14 12:01:33 +02:00
17e580dfa2 include/Spectre/Graphics/Vertex2D.h: minor fix. 2018-05-12 19:22:01 +02:00
93f869acc6 BatchRenderer2D: OpenGL Core profile requires the use of VAO, so implement that. 2018-02-28 00:42:09 +01:00
8ce53c41cb Renderable2D: Adding Z order variable. 2016-06-26 17:15:49 +02:00
84ffd0189e Renderer2D: reverse the relationship between Renderer2D and Renderable.
Pass Renderer2D to Renderable and have each subclass of Renderable decide what the Renderer should do (like drawText(), drawRect() etc).

This makes the Renderable more flexible. right now, each renderable has a texture, vertices and indices. but what if some renderables does not use textures? or more than one? What if some renderables are just a group of other renderables? (Scene Graph's).

If we instead just make Renderables implement render(Renderer2D& r) interface. we can make each renderable pass the data it holds to the renderer without a hard defined interface.
2016-06-18 13:26:08 +02:00
b2dbee33fb Font: moving text size from font to Text object. 2016-05-05 11:04:54 +02:00
c74dda1200 include/Spectre/Graphics/Font.h: move texture variable into it's own struct.
When implementing rendering of glyphs with different properties: size, stroke width, bold etc.
We will need to store them in different textures.
2016-04-23 18:36:39 +02:00
308e0dff6b Graphics/Text.h: Adding outline width/color. 2016-03-29 07:31:52 +02:00
8675018522 Graphics: Change Vertex color to 4 components. 2016-02-02 00:09:29 +01:00
edfc5298e1 Initial commit 2016-01-10 09:26:43 +01:00