mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
|
|
@ -20,11 +20,9 @@
|
|||
#ifndef FONTSTASH_H
|
||||
#define FONTSTASH_H
|
||||
|
||||
|
||||
#define MAX_ROWS 128
|
||||
#define VERT_COUNT (6*128)
|
||||
#define INDEX_COUNT (VERT_COUNT*2)
|
||||
|
||||
#define VERT_COUNT (16 * 128)
|
||||
#define INDEX_COUNT (VERT_COUNT * 2)
|
||||
|
||||
struct vec2
|
||||
{
|
||||
|
|
@ -38,34 +36,33 @@ struct vec2
|
|||
|
||||
struct vec4
|
||||
{
|
||||
vec4(float x,float y, float z, float w)
|
||||
vec4(float x, float y, float z, float w)
|
||||
{
|
||||
p[0] = x;
|
||||
p[1] = y;
|
||||
p[2] = z;
|
||||
p[3] = w;
|
||||
|
||||
}
|
||||
|
||||
|
||||
float p[4];
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
vec4 position;
|
||||
vec4 colour;
|
||||
vec4 position;
|
||||
vec4 colour;
|
||||
vec2 uv;
|
||||
} Vertex;
|
||||
|
||||
struct sth_quad
|
||||
{
|
||||
float x0,y0,s0,t0;
|
||||
float x1,y1,s1,t1;
|
||||
float x0, y0, s0, t0;
|
||||
float x1, y1, s1, t1;
|
||||
};
|
||||
|
||||
struct sth_row
|
||||
{
|
||||
short x,y,h;
|
||||
short x, y, h;
|
||||
};
|
||||
|
||||
struct sth_glyph
|
||||
|
|
@ -73,37 +70,37 @@ struct sth_glyph
|
|||
unsigned int codepoint;
|
||||
short size;
|
||||
struct sth_texture* texture;
|
||||
int x0_,y0,x1,y1;
|
||||
float xadv,xoff,yoff;
|
||||
int x0_, y0, x1, y1;
|
||||
float xadv, xoff, yoff;
|
||||
int next;
|
||||
};
|
||||
|
||||
|
||||
struct sth_texture
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
void* m_userData;
|
||||
int m_userId;
|
||||
};
|
||||
|
||||
|
||||
unsigned char* m_texels;
|
||||
|
||||
|
||||
// TODO: replace rows with pointer
|
||||
struct sth_row rows[MAX_ROWS];
|
||||
int nrows;
|
||||
int nverts;
|
||||
|
||||
Vertex newverts[VERT_COUNT];
|
||||
struct sth_texture* next;
|
||||
|
||||
Vertex newverts[VERT_COUNT];
|
||||
struct sth_texture* next;
|
||||
};
|
||||
|
||||
|
||||
struct RenderCallbacks
|
||||
struct RenderCallbacks
|
||||
{
|
||||
virtual ~RenderCallbacks() {}
|
||||
virtual void updateTexture(sth_texture* texture, sth_glyph* glyph, int textureWidth, int textureHeight)=0;
|
||||
virtual void render(sth_texture* texture)=0;
|
||||
virtual void setColorRGBA(float color[4]) = 0;
|
||||
virtual void setWorldPosition(float pos[3]) = 0;
|
||||
virtual void setWorldOrientation(float orn[4]) = 0;
|
||||
virtual void updateTexture(sth_texture* texture, sth_glyph* glyph, int textureWidth, int textureHeight) = 0;
|
||||
virtual void render(sth_texture* texture) = 0;
|
||||
};
|
||||
|
||||
struct sth_stash* sth_create(int cachew, int cacheh, RenderCallbacks* callbacks);
|
||||
|
|
@ -121,26 +118,37 @@ void sth_begin_draw(struct sth_stash* stash);
|
|||
void sth_end_draw(struct sth_stash* stash);
|
||||
|
||||
void sth_draw_texture(struct sth_stash* stash,
|
||||
int idx, float size,
|
||||
float x, float y,
|
||||
int screenwidth, int screenheight,
|
||||
const char* s, float* dx);
|
||||
int idx, float size,
|
||||
float x, float y,
|
||||
int screenwidth, int screenheight,
|
||||
const char* s, float* dx, float colorRGBA[4]);
|
||||
|
||||
void sth_flush_draw(struct sth_stash* stash);
|
||||
|
||||
void sth_draw_text3D(struct sth_stash* stash,
|
||||
int idx, float fontSize,
|
||||
float x, float y, float z,
|
||||
const char* s, float* dx, float textScale, float colorRGBA[4], int bla);
|
||||
|
||||
void sth_draw_text(struct sth_stash* stash,
|
||||
int idx, float size,
|
||||
float x, float y, const char* string, float* dx, int screenwidth, int screenheight, int measureOnly=0, float retinaScale=1);
|
||||
float x, float y, const char* string, float* dx, int screenwidth, int screenheight, int measureOnly, float retinaScale, float colorRGBA[4]);
|
||||
|
||||
inline void sth_draw_text(struct sth_stash* stash,
|
||||
int idx, float size,
|
||||
float x, float y, const char* string, float* dx, int screenwidth, int screenheight, int measureOnly = false, float retinaScale = 1.)
|
||||
{
|
||||
float colorRGBA[4] = {1, 1, 1, 1};
|
||||
sth_draw_text(stash, idx, size, x, y, string, dx, screenwidth, screenheight, measureOnly, retinaScale, colorRGBA);
|
||||
}
|
||||
|
||||
void sth_dim_text(struct sth_stash* stash, int idx, float size, const char* string,
|
||||
float* minx, float* miny, float* maxx, float* maxy);
|
||||
|
||||
void sth_vmetrics(struct sth_stash* stash,
|
||||
int idx, float size,
|
||||
float* ascender, float* descender, float * lineh);
|
||||
float* ascender, float* descender, float* lineh);
|
||||
|
||||
void sth_delete(struct sth_stash* stash);
|
||||
|
||||
|
||||
|
||||
#endif // FONTSTASH_H
|
||||
#endif // FONTSTASH_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue