File DrawContext.c
FileList > engine > src > rendering > DrawContext.c
Go to the source code of this file
#include "DrawContext.h"
#include <string.h>
#include <glad/glad.h>
#include <cglm/cglm.h>
#include "ObjectPool.h"
#include "Widget.h"
#include "DynArray.h"
#include "AssertLib.h"
#include "PlatformDefs.h"
#include "Game2DLayer.h"
#include "Log.h"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
Public Static Functions
Public Types Documentation
enum ShaderType
enum ShaderType {
ST_Vertex,
ST_Fragment,
ST_Program,
ST_NUM
};
Public Attributes Documentation
variable gScreenspaceOrtho
mat4 gScreenspaceOrtho;
variable gUIShader
struct Shader gUIShader;
variable gWorldspace2DShader
struct Shader gWorldspace2DShader;
variable uiFrag
const char* uiFrag;
variable uiVert
const char* uiVert;
variable worldspaceFrag
const char* worldspaceFrag;
variable worldspaceVert
const char* worldspaceVert;
Public Static Attributes Documentation
variable gShaderTypeNameLUT
const char* gShaderTypeNameLUT[ST_NUM];
Public Functions Documentation
function DestroyWorldspaceVertexBuffer
void DestroyWorldspaceVertexBuffer (
H2DWorldspaceVertexBuffer hBuf
)
function Dr_InitDrawContext
DrawContext Dr_InitDrawContext ()
function Dr_OnScreenDimsChange
void Dr_OnScreenDimsChange (
DrawContext * pCtx,
int newW,
int newH
)
function DrawWorldspaceVertexBuffer
void DrawWorldspaceVertexBuffer (
H2DWorldspaceVertexBuffer hBuf,
size_t indexCount,
mat4 view
)
function OBJECT_POOL
OBJECT_POOL (
struct VertexBuffer
)
function WorldspaceVertexBufferData
void WorldspaceVertexBufferData (
HUIVertexBuffer hBuf,
Worldspace2DVert * src,
size_t size,
VertIndexT * indices,
u32 numIndices
)
Public Static Functions Documentation
function CreateShader
static void CreateShader (
const char * vert,
const char * frag,
struct Shader * pShader
)
function CreateShaders
static void CreateShaders ()
function DestroyTexture
static void DestroyTexture (
hTexture tex
)
function DestroyUIVertexBuffer
static void DestroyUIVertexBuffer (
HUIVertexBuffer hBuf
)
function DrawUIVertexBuffer
static void DrawUIVertexBuffer (
HUIVertexBuffer hBuf,
size_t vertexCount
)
function NewUIVertexBuffer
static HUIVertexBuffer NewUIVertexBuffer (
int size
)
function NewWorldspaceVertexBuffer
static HWorldspaceVertexBuffer NewWorldspaceVertexBuffer (
int size
)
function SetCurrentAtlas
static void SetCurrentAtlas (
hTexture atlas
)
function TestShaderStatus
static void TestShaderStatus (
GLuint shader,
enum ShaderType type
)
function UIVertexBufferData
static void UIVertexBufferData (
HUIVertexBuffer hBuf,
WidgetVertex * src,
size_t size
)
function UploadTexture
static hTexture UploadTexture (
void * src,
int channels,
int pxWidth,
int pxHeight
)
The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/src/rendering/DrawContext.c