Browse Source

Initial commit

main
cinnaboot 5 years ago
commit
b2f75901fa
  1. 3
      .gitignore
  2. 26
      Makefile
  3. 120
      src/main.cpp
  4. 122
      src/orbits.h
  5. 201
      tags

3
.gitignore vendored

@ -0,0 +1,3 @@
build/*
ext/*
bin/*

26
Makefile

@ -0,0 +1,26 @@
OBJDIR = build
SRCDIR = src
LIBDIR = ext/tangerine
LIB = $(LIBDIR)/build/libTangerine.a
CXX = g++
CXXFLAGS = -std=c++11 -g -ggdb3 -Wall -I$(LIBDIR)/include/
LDFLAGS = -lSDL2 -lGLEW -lGL -lassimp
BIN = bin/orbital_shipping
SOURCES = $(wildcard $(SRCDIR)/*.cpp)
OBJECTS = $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES))
all: $(OBJECTS)
$(CXX) -o $(BIN) $(LDFLAGS) $(OBJDIR)/*.o $(LIB)
.PHONY: all
-include $(OBJDIR)/*.d
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c -MMD $< -o $@
clean:
rm -rf $(OBJDIR)/* $(BIN)
.PHONY: clean

120
src/main.cpp

@ -0,0 +1,120 @@
#include <cassert>
#include <cmath>
#include <SDL2/SDL.h>
#include <glm/glm.hpp>
#include "dumbLog.h"
#include "mesh.h"
#include "renderer.h"
#include "util.h"
#define ORBIT_IMPLEMENTATION
#include "orbits.h"
static ellipse_3d g_ellipse;
static uint g_index = 0;
simple_mesh*
constructEllipseMesh(ellipse_3d& e3d, glm::vec3 vertex_color)
{
simple_mesh* sm = meInitMesh(e3d.vert_count);
for (uint i = 0; i < e3d.vert_count; i++) {
sm->vertices[i] = e3d.vertices[i];
sm->vert_colors[i] = vertex_color;
}
return sm;
}
simple_mesh*
constructCircleMesh(float r, uint vert_count, glm::vec3 vertex_color)
{
simple_mesh* sm = meInitMesh(vert_count);
float angle = (float) M_PI * 2 / vert_count;
for (uint i = 0; i < vert_count; i++) {
sm->vertices[i] = glm::vec3(cos(i * angle) * r, sin(i * angle) * r, 0);
sm->vert_colors[i] = vertex_color;
}
return sm;
}
void
doFrameCallback(render_state* rs)
{
entity& satellite = rs->render_groups[0].entities[2];
g_index++;
if (g_index == g_ellipse.vert_count) g_index = 0;
static glm::mat4 xform =
glm::rotate(glm::mat4(1.0), (float) M_PI_2, glm::vec3(1, 0, 0));
glm::vec3 v = g_ellipse.vertices[g_index];
entSetWorldPosition(satellite, xform * glm::vec4(v.x, v.y, v.z, 1));
#if 0
LOG(Debug) << "SDL_GetTicks(): " << SDL_GetTicks() << "ms\n";
#endif
}
int
main()
{
render_state* rs = renInit("orbital shipping",
glm::vec2(1920, 1080),
SDL_INIT_TIMER);
if (rs == nullptr) {
LOG(Error) << "Error Initialzing renderer\n";
return 1;
}
cameraInitPerspective(
rs->cam,
glm::vec3(0, -100, 0),
glm::vec3(0, 0, 0),
glm::vec3(0,0,1)
);
// TODO: (renderer) this needs to be more convenient
shader_wrapper sw = { SIMPLE_SHADER, nullptr, rs->simple_shader };
rs->render_groups = renAllocateGroup(3, sw);
rs->render_group_count = 1;
entity& ellipse_entity = rs->render_groups[0].entities[0];
ellipse_parameters ep = constructEllipse(50, 30);
g_ellipse = constructEllipse3D(ep, 256);
simple_mesh* sm = constructEllipseMesh(g_ellipse, glm::vec3(255, 0, 255));
entInitMesh(ellipse_entity, sm, GL_LINES);
entRotate(ellipse_entity, (float) M_PI_2, glm::vec3(1, 0, 0));
entity& planet_entity = rs->render_groups[0].entities[1];
sm = constructCircleMesh(3, 24, glm::vec3(255, 255, 0));
entInitMesh(planet_entity, sm, GL_LINE_LOOP);
entRotate(planet_entity, (float) M_PI_2, glm::vec3(1, 0, 0));
entTranslate(planet_entity, glm::vec3(ep.f2.x, 0, 0));
entity& satellite_entity = rs->render_groups[0].entities[2];
sm = meInitMesh(3);
glm::vec3 s_color(255, 0, 0);
sm->vertices[0] = glm::vec3(0, 1, 0);
sm->vert_colors[0] = s_color;
sm->vertices[1] = glm::vec3(-1, -1, 0);
sm->vert_colors[1] = s_color;
sm->vertices[2] = glm::vec3(1, -1, 0);
sm->vert_colors[2] = s_color;
entInitMesh(satellite_entity, sm, GL_TRIANGLES);
entRotate(satellite_entity, (float) M_PI_2, glm::vec3(1, 0, 0));
entSetWorldPosition(satellite_entity, g_ellipse.vertices[0]);
renDoRenderLoop(rs, 60, doFrameCallback);
renShutdown(rs);
return 0;
}

122
src/orbits.h

@ -0,0 +1,122 @@
#pragma once
#include <cmath>
#include <glm/glm.hpp>
struct ellipse_parameters
{
double a; // NOTE: semi-major axis
double b; // NOTE: semi-minor axis
double e; // NOTE: eccentricity
double c; // NOTE: linear eccentricity
glm::vec2 f1;
glm::vec2 f2;
};
struct ellipse_3d
{
ellipse_parameters params;
glm::vec3* vertices;
uint vert_count;
};
struct orbital_elements
{
ellipse_parameters ep;
double iota; // NOTE: (ι) inclination
double omega; // NOTE: (ω) argument of periapsis
double mu; // NOTE: (μ) gravittional parameter
double nu; // NOTE: (ν) true anomaly
};
ellipse_parameters
constructEllipse(double a, double b);
// NOTE: create vertices for a 3d ellipse
// NOTE: all vertices are in the x/y plane with z = 0
ellipse_3d
constructEllipse3D(ellipse_parameters ep, uint vert_count);
/* NOTE: how-to propagate orbit position given inital true anomaly, semimajor
* axis, mean motion, and eccentricity: ref) section 4.4, Kepler's Problem,
* "Space Flight Dynamics" by Craig A. Kluever
*
* obtain initial eccentric anomaly (E1) from true anomaly (ϴ1) and e:
* tan(E1/2) = sqrt((1-e)/(1+e)) * tan(ϴ1/2)
*
* obtain inital mean anomaly:
* M1 = E1 - e*sin(E1)
*
* obtain propagated mean anomaly, mean motion (n) is sqrt(μ/a^3):
* M2 = M1 + n(t2 - t1)
*
* express Kepler's equation in terms of propagated mean anomly:
* M2 = E2 - e*sin(E2)
*
* Use Newton's method to search for an E2 that satisfies Kepler's equation:
* guess a starting value for E2_k (k indicates iteration index):
* E2_1 = M2 + e*sin(M2) + ((e^2 / 2) * sin(2 * M2))
*
* test if guess is a solution:
* F(E2_1) = E2_1 - e*sin(E2) - M2
*
* if the result of the error function is not below some small value
* (1 * 10^-8), compute the derivative, and and iterate again:
* f'(E2_1) = 1 - e*cos(E2_1)
*
* use Newton's method to compute the next trial value of E2:
* E2_2 = E2_1 - (f(E2_1) / f'(E2_1))
*
* after we converge on a solution, convert eccentric anomaly back to true
* anomoly:
* tan(ϴ2/2) = sqrt((1+e) / (1-e)) * tan(E2/2)
*/
#ifdef ORBIT_IMPLEMENTATION
double
getMeanMotion(ellipse_parameters ep)
{
return -1;
}
ellipse_parameters
constructEllipse(double a, double b)
{
assert(a > 0 && b > 0 && a >= b);
ellipse_parameters ep = { a, b };
ep.c = sqrt(a * a - b * b);
ep.e = ep.c / ep.a;
ep.f1.x = -1 * ep.c;
ep.f2.x = ep.c;
return ep;
}
ellipse_3d
constructEllipse3D(ellipse_parameters ep, uint vert_count)
{
assert(ep.a > 0 && ep.b > 0 &&
ep.a >= ep.b &&
vert_count > 0);
ellipse_3d e3d = { ep, nullptr, vert_count};
e3d.vertices = UTIL_ALLOC(vert_count, glm::vec3);
double angle = 2 * M_PI / vert_count;
for (uint i = 0; i < vert_count; i++) {
double a = angle * i;
// NOTE: solving for distance in polar coordinates
double r = ep.b / sqrt(1 - (ep.e * pow(cos(a), 2)));
// NOTE: converting from polar to rectangular
e3d.vertices[i] = glm::vec3(cos(a) * r, sin(a) * r, 0);
}
return e3d;
}
#endif

201
tags

@ -0,0 +1,201 @@
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /a3c87ab5/
A ../tangerine/include/util_image.h /^ real32 A;$/;" m struct:util_RGBA typeref:typename:real32
B ../tangerine/include/util_image.h /^ real32 B;$/;" m struct:util_RGBA typeref:typename:real32
D3DKMT_HANDLE ../tangerine/include/platform_wait_for_vblank.h /^typedef uint32_t D3DKMT_HANDLE;$/;" t typeref:typename:uint32_t
Debug ../tangerine/include/dumbLog.h /^ Debug$/;" e enum:log_level
Error ../tangerine/include/dumbLog.h /^ Error,$/;" e enum:log_level
G ../tangerine/include/util_image.h /^ real32 G;$/;" m struct:util_RGBA typeref:typename:real32
GLfloat ../tangerine/include/util.h /^typedef float GLfloat;$/;" t typeref:typename:float
Info ../tangerine/include/dumbLog.h /^ Info,$/;" e enum:log_level
LOG ../tangerine/include/dumbLog.h /^#define LOG(/;" d
MVP ../tangerine/include/camera.h /^ glm::mat4 MVP;$/;" m struct:camera typeref:typename:glm::mat4
ORTHOGRAPHIC ../tangerine/include/camera.h /^ ORTHOGRAPHIC,$/;" e enum:projection_type
OUT ../tangerine/include/dumbLog.h /^ std::ostream* OUT = &std::cout;$/;" m struct:dumbLog typeref:typename:std::ostream *
PERSPECTIVE ../tangerine/include/camera.h /^ PERSPECTIVE,$/;" e enum:projection_type
R ../tangerine/include/util_image.h /^ real32 R;$/;" m struct:util_RGBA typeref:typename:real32
SDL_Handles ../tangerine/include/renderer.h /^struct SDL_Handles$/;" s
SafeRatio ../tangerine/include/util.h /^SafeRatio(real32 dividend, real32 divisor)$/;" f typeref:typename:real32
SafeTruncateToInt32 ../tangerine/include/util.h /^SafeTruncateToInt32(int64 val)$/;" f typeref:typename:int32
UTIL_ALLOC ../tangerine/include/util.h /^#define UTIL_ALLOC(/;" d
Warning ../tangerine/include/dumbLog.h /^ Warning,$/;" e enum:log_level
__anon26f519c10108 ../tangerine/include/platform_wait_for_vblank.h /^typedef struct {$/;" s
bits_per_channel ../tangerine/include/util_image.h /^ int32 bits_per_channel;$/;" m struct:util_image typeref:typename:int32
bool32 ../tangerine/include/util.h /^typedef int32_t bool32;$/;" t typeref:typename:int32_t
cam ../tangerine/include/renderer.h /^ camera cam;$/;" m struct:render_state typeref:typename:camera
camera ../tangerine/include/camera.h /^struct camera$/;" s
cameraCreateRay ../tangerine/include/camera.h /^v3f cameraCreateRay(camera& cam, v2i vp_coords, v2i vp_dims);$/;" p typeref:typename:v3f
cameraInitPerspective ../tangerine/include/camera.h /^void cameraInitPerspective(camera& cam, glm::vec3 position, glm::vec3 target, glm::vec3 world_up/;" p typeref:typename:void
cameraIntersectPlane ../tangerine/include/camera.h /^bool cameraIntersectPlane(camera& cam, v3f ray, v3f plane_origin, v3f plane_normal, v3f& interse/;" p typeref:typename:bool
cameraMove ../tangerine/include/camera.h /^void cameraMove(camera& cam, bool up, bool left, bool down, bool right, bool forward, bool backw/;" p typeref:typename:void
cameraRoll ../tangerine/include/camera.h /^void cameraRoll(camera& cam, bool CW, bool CCW);$/;" p typeref:typename:void
cameraRotate ../tangerine/include/camera.h /^void cameraRotate(camera& cam, int32 xrel, int32 yrel);$/;" p typeref:typename:void
cameraUnproject ../tangerine/include/camera.h /^v2f cameraUnproject(camera& cam, int x, int y, int vp_width, int vp_height);$/;" p typeref:typename:v2f
clear_col ../tangerine/include/renderer.h /^ util_RGBA clear_col;$/;" m struct:render_state typeref:typename:util_RGBA
color ../tangerine/include/lights.h /^ glm::vec3 color;$/;" m struct:point_light typeref:typename:glm::vec3
constructEllipse src/main.cpp /^constructEllipse(unsigned int segments, glm::vec2 f1, glm::vec2 f2, float ecc)$/;" f typeref:typename:glm::vec2 *
cur_frame ../tangerine/include/animation.h /^ uint cur_frame;$/;" m struct:node_animation typeref:typename:uint
currentDisplayMode ../tangerine/include/renderer.h /^ SDL_DisplayMode currentDisplayMode;$/;" m struct:SDL_Handles typeref:typename:SDL_DisplayMode
data_len ../tangerine/include/util_image.h /^ uint data_len;$/;" m struct:util_image typeref:typename:uint
default_shader ../tangerine/include/renderer.h /^ shader_program* default_shader;$/;" m struct:render_state typeref:typename:shader_program *
diffuse_texture ../tangerine/include/mesh.h /^ util_image diffuse_texture;$/;" m struct:meMeshInfo typeref:typename:util_image
doFrameCallback src/main.cpp /^doFrameCallback(render_state* rs)$/;" f typeref:typename:void
dumbLog ../tangerine/include/dumbLog.h /^struct dumbLog$/;" s
entFree ../tangerine/include/entity.h /^void entFree(entity& e);$/;" p typeref:typename:void
entInit ../tangerine/include/entity.h /^bool entInit(entity& e, const char* model_path);$/;" p typeref:typename:bool
entScale ../tangerine/include/entity.h /^void entScale(entity& e, glm::vec3 v);$/;" p typeref:typename:void
entSetWorldPosition ../tangerine/include/entity.h /^void entSetWorldPosition(entity& e, glm::vec3 v);$/;" p typeref:typename:void
entTranslate ../tangerine/include/entity.h /^void entTranslate(entity& e, glm::vec3 v);$/;" p typeref:typename:void
entities ../tangerine/include/renderer.h /^ entity* entities;$/;" m struct:render_group typeref:typename:entity *
entity ../tangerine/include/entity.h /^struct entity$/;" s
entity_count ../tangerine/include/renderer.h /^ uint entity_count;$/;" m struct:render_group typeref:typename:uint
file_path ../tangerine/include/util_image.h /^ char file_path[256];$/;" m struct:util_image typeref:typename:char[256]
forward ../tangerine/include/camera.h /^ glm::vec3 forward;$/;" m struct:camera typeref:typename:glm::vec3
frame_callback_fn ../tangerine/include/renderer.h /^typedef void (*frame_callback_fn) (render_state*);$/;" t typeref:typename:void (*)(render_state *)
frame_callback_fn src/main.cpp /^typedef void (*frame_callback_fn) (render_state*);$/;" t typeref:typename:void (*)(render_state *) file:
g_platform_win_device_handles ../tangerine/include/platform_wait_for_vblank.h /^platform_win_device_handles g_platform_win_device_handles;$/;" v typeref:typename:platform_win_device_handles
getCurrentMS ../tangerine/include/dumbLog.h /^ int getCurrentMS();$/;" p struct:dumbLog typeref:typename:int
getCurrentTime ../tangerine/include/dumbLog.h /^ std::tm* getCurrentTime();$/;" p struct:dumbLog typeref:typename:std::tm *
glContext ../tangerine/include/renderer.h /^ SDL_GLContext glContext;$/;" m struct:SDL_Handles typeref:typename:SDL_GLContext
h ../tangerine/include/util_image.h /^ int32 h;$/;" m struct:util_image typeref:typename:int32
hAdapter ../tangerine/include/platform_wait_for_vblank.h /^ D3DKMT_HANDLE hAdapter = NULL;$/;" m struct:__anon26f519c10108 typeref:typename:D3DKMT_HANDLE
hAngle ../tangerine/include/camera.h /^ float hAngle;$/;" m struct:camera typeref:typename:float
handles ../tangerine/include/renderer.h /^ SDL_Handles handles;$/;" m struct:render_state typeref:typename:SDL_Handles
index_buffer_count ../tangerine/include/render_object.h /^ GLuint index_buffer_count;$/;" m struct:render_object typeref:typename:GLuint
index_buffer_id ../tangerine/include/render_object.h /^ GLuint index_buffer_id;$/;" m struct:render_object typeref:typename:GLuint
indices ../tangerine/include/mesh.h /^ uint* indices;$/;" m struct:meMeshInfo typeref:typename:uint *
int32 ../tangerine/include/util.h /^typedef int32_t int32;$/;" t typeref:typename:int32_t
int64 ../tangerine/include/util.h /^typedef int64_t int64;$/;" t typeref:typename:int64_t
intensity ../tangerine/include/lights.h /^ float intensity;$/;" m struct:point_light typeref:typename:float
key_count ../tangerine/include/animation.h /^ uint key_count;$/;" m struct:node_animation typeref:typename:uint
left ../tangerine/include/camera.h /^ glm::vec3 left;$/;" m struct:camera typeref:typename:glm::vec3
light_ID ../tangerine/include/lights.h /^ uint light_ID;$/;" m struct:point_light typeref:typename:uint
light_group ../tangerine/include/lights.h /^struct light_group$/;" s
lights ../tangerine/include/lights.h /^ point_light* lights;$/;" m struct:light_group typeref:typename:point_light *
lights ../tangerine/include/renderer.h /^ light_group* lights;$/;" m struct:render_state typeref:typename:light_group *
lightsAdd ../tangerine/include/lights.h /^lightsAdd(light_group* lights, glm::vec3 pos, glm::vec3 color, float intensity);$/;" p typeref:typename:bool
lightsInit ../tangerine/include/lights.h /^light_group* lightsInit(uint max_lights = 1000);$/;" p typeref:typename:light_group *
lightsOut ../tangerine/include/lights.h /^void lightsOut(light_group* lights);$/;" p typeref:typename:void
lightsUpdate ../tangerine/include/lights.h /^void lightsUpdate(light_group* lights, shader_program* shader);$/;" p typeref:typename:void
logLevelToString ../tangerine/include/dumbLog.h /^ const char* logLevelToString(log_level level);$/;" p struct:dumbLog typeref:typename:const char *
log_level ../tangerine/include/dumbLog.h /^enum log_level {$/;" g
logger ../tangerine/include/dumbLog.h /^static dumbLog logger;$/;" v typeref:typename:dumbLog
main src/main.cpp /^main()$/;" f typeref:typename:int
max_lights ../tangerine/include/lights.h /^ uint max_lights;$/;" m struct:light_group typeref:typename:uint
meFreeMeshGroup ../tangerine/include/mesh.h /^void meFreeMeshGroup(meMeshGroup& mesh_group);$/;" p typeref:typename:void
meInitAssimp ../tangerine/include/mesh.h /^bool meInitAssimp();$/;" p typeref:typename:bool
meLoadFromFile ../tangerine/include/mesh.h /^bool meLoadFromFile(meMeshGroup& mesh_group, const char* filepath);$/;" p typeref:typename:bool
meMeshGroup ../tangerine/include/mesh.h /^struct meMeshGroup$/;" s
meMeshInfo ../tangerine/include/mesh.h /^struct meMeshInfo$/;" s
meShutdownAssimp ../tangerine/include/mesh.h /^void meShutdownAssimp();$/;" p typeref:typename:void
mesh_group ../tangerine/include/entity.h /^ meMeshGroup mesh_group;$/;" m struct:entity typeref:typename:meMeshGroup
meshes ../tangerine/include/mesh.h /^ meMeshInfo** meshes;$/;" m struct:meMeshGroup typeref:typename:meMeshInfo **
model ../tangerine/include/camera.h /^ glm::mat4 model;$/;" m struct:camera typeref:typename:glm::mat4
model_matrix_id ../tangerine/include/shader_program.h /^ GLuint model_matrix_id;$/;" m struct:shader_program typeref:typename:GLuint
model_transform ../tangerine/include/mesh.h /^ glm::mat4 model_transform;$/;" m struct:meMeshInfo typeref:typename:glm::mat4
needs_update ../tangerine/include/lights.h /^ bool needs_update;$/;" m struct:light_group typeref:typename:bool
node_anim ../tangerine/include/mesh.h /^ node_animation* node_anim;$/;" m struct:meMeshInfo typeref:typename:node_animation *
node_animation ../tangerine/include/animation.h /^struct node_animation$/;" s
node_xform ../tangerine/include/render_object.h /^ glm::mat4 node_xform;$/;" m struct:render_object typeref:typename:glm::mat4
normal_buffer_id ../tangerine/include/render_object.h /^ GLuint normal_buffer_id;$/;" m struct:render_object typeref:typename:GLuint
normal_matrix_id ../tangerine/include/shader_program.h /^ GLuint normal_matrix_id;$/;" m struct:shader_program typeref:typename:GLuint
normals ../tangerine/include/mesh.h /^ glm::vec3* normals;$/;" m struct:meMeshInfo typeref:typename:glm::vec3 *
num_channels ../tangerine/include/util_image.h /^ int32 num_channels;$/;" m struct:util_image typeref:typename:int32
num_indices ../tangerine/include/mesh.h /^ uint num_indices;$/;" m struct:meMeshInfo typeref:typename:uint
num_lights ../tangerine/include/lights.h /^ uint num_lights;$/;" m struct:light_group typeref:typename:uint
num_lights_id ../tangerine/include/shader_program.h /^ GLuint num_lights_id;$/;" m struct:shader_program typeref:typename:GLuint
num_meshes ../tangerine/include/mesh.h /^ uint num_meshes;$/;" m struct:meMeshGroup typeref:typename:uint
num_vertices ../tangerine/include/mesh.h /^ uint num_vertices;$/;" m struct:meMeshInfo typeref:typename:uint
pixels ../tangerine/include/util_image.h /^ uint8* pixels;$/;" m struct:util_image typeref:typename:uint8 *
platform_init ../tangerine/include/platform_wait_for_vblank.h /^platform_init(SDL_Window* window)$/;" f typeref:typename:bool
platform_wait_for_vblank ../tangerine/include/platform_wait_for_vblank.h /^platform_wait_for_vblank(bool wait=true)$/;" f typeref:typename:void
platform_win_device_handles ../tangerine/include/platform_wait_for_vblank.h /^} platform_win_device_handles;$/;" t typeref:struct:__anon26f519c10108
point_light ../tangerine/include/lights.h /^struct point_light$/;" s
position ../tangerine/include/camera.h /^ glm::vec3 position;$/;" m struct:camera typeref:typename:glm::vec3
position ../tangerine/include/lights.h /^ glm::vec3 position;$/;" m struct:point_light typeref:typename:glm::vec3
program_id ../tangerine/include/shader_program.h /^ GLuint program_id;$/;" m struct:shader_program typeref:typename:GLuint
projection ../tangerine/include/camera.h /^ glm::mat4 projection;$/;" m struct:camera typeref:typename:glm::mat4
projection_matrix_id ../tangerine/include/shader_program.h /^ GLuint projection_matrix_id;$/;" m struct:shader_program typeref:typename:GLuint
projection_type ../tangerine/include/camera.h /^enum projection_type$/;" g
real32 ../tangerine/include/util.h /^typedef float real32;$/;" t typeref:typename:float
real64 ../tangerine/include/util.h /^typedef double real64;$/;" t typeref:typename:double
renAddLight ../tangerine/include/renderer.h /^renAddLight(render_state* rs,$/;" p typeref:typename:bool
renAllocateGroup ../tangerine/include/renderer.h /^renAllocateGroup(uint entity_count, shader_program shader);$/;" p typeref:typename:render_group *
renDoRenderLoop ../tangerine/include/renderer.h /^void renDoRenderLoop(render_state* rs,$/;" p typeref:typename:void
renInit ../tangerine/include/renderer.h /^renInit(const char* title = "Tangerine",$/;" p typeref:typename:render_state *
renRenderFrame ../tangerine/include/renderer.h /^void renRenderFrame(render_state* rs);$/;" p typeref:typename:void
renShutdown ../tangerine/include/renderer.h /^void renShutdown(render_state* rs);$/;" p typeref:typename:void
render_group ../tangerine/include/renderer.h /^struct render_group$/;" s
render_group_count ../tangerine/include/renderer.h /^ uint render_group_count;$/;" m struct:render_state typeref:typename:uint
render_groups ../tangerine/include/renderer.h /^ render_group* render_groups;$/;" m struct:render_state typeref:typename:render_group *
render_object ../tangerine/include/render_object.h /^struct render_object$/;" s
render_objs ../tangerine/include/entity.h /^ render_object* render_objs;$/;" m struct:entity typeref:typename:render_object *
render_state ../tangerine/include/renderer.h /^struct render_state$/;" s
ro ../tangerine/include/animation.h /^ render_object* ro;$/;" m struct:node_animation typeref:typename:render_object *
roDraw ../tangerine/include/render_object.h /^void roDraw(render_object& ro,$/;" p typeref:typename:void
roFree ../tangerine/include/render_object.h /^void roFree(render_object& ro);$/;" p typeref:typename:void
roInit ../tangerine/include/render_object.h /^bool roInit(meMeshInfo* mi_in, render_object& ro_out);$/;" p typeref:typename:bool
ro_count ../tangerine/include/entity.h /^ uint ro_count;$/;" m struct:entity typeref:typename:uint
sampler_id ../tangerine/include/shader_program.h /^ GLuint sampler_id;$/;" m struct:shader_program typeref:typename:GLuint
setOutputStream ../tangerine/include/dumbLog.h /^ void setOutputStream(std::ostream* out);$/;" p struct:dumbLog typeref:typename:void
shader ../tangerine/include/renderer.h /^ shader_program shader;$/;" m struct:render_group typeref:typename:shader_program
shaderFree ../tangerine/include/shader_program.h /^void shaderFree(shader_program* shader);$/;" p typeref:typename:void
shaderInit ../tangerine/include/shader_program.h /^shader_program* shaderInit(const char* vertex_code, const char* frag_code);$/;" p typeref:typename:shader_program *
shader_program ../tangerine/include/shader_program.h /^struct shader_program$/;" s
target ../tangerine/include/camera.h /^ glm::vec3 target;$/;" m struct:camera typeref:typename:glm::vec3
tex_id ../tangerine/include/render_object.h /^ GLuint tex_id;$/;" m struct:render_object typeref:typename:GLuint
texture_coords ../tangerine/include/mesh.h /^ glm::vec3* texture_coords; \/\/ NOTE: stay aligned with other buffers$/;" m struct:meMeshInfo typeref:typename:glm::vec3 *
uint ../tangerine/include/util.h /^typedef uint32_t uint;$/;" t typeref:typename:uint32_t
uint32 ../tangerine/include/util.h /^typedef uint32_t uint32;$/;" t typeref:typename:uint32_t
uint8 ../tangerine/include/util.h /^typedef uint8_t uint8;$/;" t typeref:typename:uint8_t
up ../tangerine/include/camera.h /^ glm::vec3 up;$/;" m struct:camera typeref:typename:glm::vec3
utilBaseName ../tangerine/include/util.h /^const char* utilBaseName(const char* path_str);$/;" p typeref:typename:const char *
utilConcatPath ../tangerine/include/util.h /^char* utilConcatPath(char* out, const char* base_dir, const char* file_name, uint max_len);$/;" p typeref:typename:char *
utilConvertColor ../tangerine/include/util.h /^utilConvertColor(GLfloat buf[3], uint32 color)$/;" f typeref:typename:void
utilCopyCStr ../tangerine/include/util.h /^bool utilCopyCStr(char* dest, const char* src, uint max_len);$/;" p typeref:typename:bool
utilDumpTextFile ../tangerine/include/util.h /^char* utilDumpTextFile(const char* filename);$/;" p typeref:typename:char *
utilFreeImage ../tangerine/include/util_image.h /^void utilFreeImage(util_image image);$/;" p typeref:typename:void
utilLoadImageBytes ../tangerine/include/util_image.h /^util_image utilLoadImageBytes(const unsigned char* bytes, uint length);$/;" p typeref:typename:util_image
utilLoadImagePath ../tangerine/include/util_image.h /^util_image utilLoadImagePath(const char* full_path);$/;" p typeref:typename:util_image
utilLogAlloc ../tangerine/include/util.h /^void* utilLogAlloc(uint item_count, uint type_size, const char* file_name, const int line);$/;" p typeref:typename:void *
utilMatchPrefix ../tangerine/include/util.h /^bool utilMatchPrefix(const char* lhs, const char* rhs, int sz);$/;" p typeref:typename:bool
utilSafeFree ../tangerine/include/util.h /^void utilSafeFree(const void* mem);$/;" p typeref:typename:void
utilWriteTextFile ../tangerine/include/util.h /^bool utilWriteTextFile(const char* filename, const char* text);$/;" p typeref:typename:bool
util_RGBA ../tangerine/include/util_image.h /^struct util_RGBA$/;" s
util_image ../tangerine/include/util_image.h /^struct util_image$/;" s
uv_buffer_id ../tangerine/include/render_object.h /^ GLuint uv_buffer_id;$/;" m struct:render_object typeref:typename:GLuint
v2f ../tangerine/include/util.h /^ v2f(): x(0), y(0) {}$/;" f struct:v2f
v2f ../tangerine/include/util.h /^ v2f(real64 a, real64 b): x(a), y(b) {}$/;" f struct:v2f
v2f ../tangerine/include/util.h /^struct v2f$/;" s
v2i ../tangerine/include/util.h /^ v2i() : x(0), y(0) {}$/;" f struct:v2i
v2i ../tangerine/include/util.h /^ v2i(int a, int b): x(a), y(b) {}$/;" f struct:v2i
v2i ../tangerine/include/util.h /^struct v2i$/;" s
v3f ../tangerine/include/util.h /^ v3f(): x(0), y(0), z(0) {}$/;" f struct:v3f
v3f ../tangerine/include/util.h /^ v3f(real64 a, real64 b, real64 c): x(a), y(b), z(c) {}$/;" f struct:v3f
v3f ../tangerine/include/util.h /^struct v3f$/;" s
vAngle ../tangerine/include/camera.h /^ float vAngle;$/;" m struct:camera typeref:typename:float
vertex_array_id ../tangerine/include/shader_program.h /^ GLuint vertex_array_id;$/;" m struct:shader_program typeref:typename:GLuint
vertex_buffer_id ../tangerine/include/render_object.h /^ GLuint vertex_buffer_id;$/;" m struct:render_object typeref:typename:GLuint
vertices ../tangerine/include/mesh.h /^ glm::vec3* vertices;$/;" m struct:meMeshInfo typeref:typename:glm::vec3 *
vidID ../tangerine/include/platform_wait_for_vblank.h /^ UINT vidID = 0;$/;" m struct:__anon26f519c10108 typeref:typename:UINT
view ../tangerine/include/camera.h /^ glm::mat4 view;$/;" m struct:camera typeref:typename:glm::mat4
view_matrix_id ../tangerine/include/shader_program.h /^ GLuint view_matrix_id;$/;" m struct:shader_program typeref:typename:GLuint
viewport_dims ../tangerine/include/renderer.h /^ glm::vec2 viewport_dims;$/;" m struct:render_state typeref:typename:glm::vec2
w ../tangerine/include/util_image.h /^ int32 w;$/;" m struct:util_image typeref:typename:int32
window ../tangerine/include/renderer.h /^ SDL_Window *window;$/;" m struct:SDL_Handles typeref:typename:SDL_Window *
world_transform ../tangerine/include/entity.h /^ glm::mat4 world_transform;$/;" m struct:entity typeref:typename:glm::mat4
world_up ../tangerine/include/camera.h /^ glm::vec3 world_up;$/;" m struct:camera typeref:typename:glm::vec3
x ../tangerine/include/util.h /^ int32 x;$/;" m struct:v2i typeref:typename:int32
x ../tangerine/include/util.h /^ real64 x;$/;" m struct:v2f typeref:typename:real64
x ../tangerine/include/util.h /^ real64 x;$/;" m struct:v3f typeref:typename:real64
xform_array ../tangerine/include/animation.h /^ glm::mat4* xform_array;$/;" m struct:node_animation typeref:typename:glm::mat4 *
y ../tangerine/include/util.h /^ int32 y;$/;" m struct:v2i typeref:typename:int32
y ../tangerine/include/util.h /^ real64 y;$/;" m struct:v2f typeref:typename:real64
y ../tangerine/include/util.h /^ real64 y;$/;" m struct:v3f typeref:typename:real64
z ../tangerine/include/util.h /^ real64 z;$/;" m struct:v3f typeref:typename:real64
Loading…
Cancel
Save