<commit_before>/*
 * Copyright (c), <NAME>.
 *
 * MIT License (MIT), http://opensource.org/licenses/MIT
 * Full license can be found in the LICENSE file
 */

#ifndef gk_h
#define gk_h
#ifdef __cplusplus
extern "C" {
#endif

#include <cglm.h>

typedef struct GkColorRGBA {
  float R;
  float G;
  float B;
  float A;
} GkColorRGBA;

typedef union GkColor {
  GkColorRGBA rgba;
  vec4        vec;
} GkColor;

#include "gk-common.h"
#include "gk-shader.h"
#include "gk-program.h"
#include "gk-light.h"

#include <stdlib.h>
#include <cglm.h>

#define GK_DRAW_ELEMENTS (1 << 0)
#define GK_DRAW_ARRAYS   (1 << 1)
#define GK_COMPLEX       (1 << 2)

#include "gk-model.h"

typedef struct GkNode {
  GkNodeFlags    flags;
  GkProgInfo    *pinfo;
  GkMatrix      *matrix;
  GkModelInst   *model;
  struct GkNode *next;
  struct GkNode *chld;
  struct GkNode *nodeInst;
} GkNode;

typedef struct GkScene {
  mat4        v;
  mat4        pv;
  GkNode     *rootNode;
  GkProgInfo *pinfo;
  GkLight    *lights;
  uint32_t    pvIsValid;
  uint32_t    vIsValid;
} GkScene;

GkModelInst *
gkMakeInstance(GkModelBase *model);

void
gkUniformMatrix(GkModelInst *modelInst);

void
gkRenderModel(GkScene     *scene,
              GkModelInst *modelInst,
              GkMatrix    *parentMat,
              GkProgInfo  *parentProg);

void
gkRenderNode(GkScene    *scene,
             GkNode     *node,
             GkMatrix   *parentMat,
             GkProgInfo *parentProg);

void
gkRenderScene(GkScene * scene);

#ifdef __cplusplus
}<commit_msg>keep global usage<commit_after>/*
 * Copyright (c), <NAME>.
 *
 * MIT License (MIT), http://opensource.org/licenses/MIT
 * Full license can be found in the LICENSE file
 */

#ifndef gk_h
#define gk_h
#ifdef __cplusplus
extern "C" {
#endif

#include <cglm.h>

typedef struct GkColorRGBA {
  float R;
  float G;
  float B;
  float A;
} GkColorRGBA;

typedef union GkColor {
  GkColorRGBA rgba;
  vec4        vec;
} GkColor;

#include "gk-common.h"
#include "gk-shader.h"
#include "gk-program.h"
#include "gk-light.h"

#include <stdlib.h>
#include <cglm.h>

#define GK_DRAW_ELEMENTS (1 << 0)
#define GK_DRAW_ARRAYS   (1 << 1)
#define GK_COMPLEX       (1 << 2)

#include "gk-model.h"

typedef struct GkNode {
  GkNodeFlags    flags;
  GkProgInfo    *pinfo;
  GkMatrix      *matrix;
  GkModelInst   *model;
  struct GkNode *next;
  struct GkNode *chld;
  struct GkNode *nodeInst;
} GkNode;

typedef struct GkScene {
  mat4        v;
  mat4        pv;
  GkNode     *rootNode;
  GkProgInfo *pinfo;
  GkLight    *lights;
  uint32_t    pvIsValid;
  uint32_t    vIsValid;
  GLenum      usage;
} GkScene;

GkModelInst *
gkMakeInstance(GkModelBase *model);

void
gkUniformMatrix(GkModelInst *modelInst);

void
gkRenderModel(GkScene     *scene,
              GkModelInst *modelInst,
              GkMatrix    *parentMat,
              GkProgInfo  *parentProg);

void
gkRenderNode(GkScene    *scene,
             GkNode     *node,
             GkMatrix   *parentMat,
             GkProgInfo *parentProg);

void
gkRenderScene(GkScene * scene);

#ifdef __cplusplus
}
{'fraction_non_alphanumeric': 0.10504065040650407, 'fraction_numerical': 0.008455284552845528, 'mean_word_length': 2.825870646766169, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1488034', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1224, 'n_words': 288}