<commit_before>/*   Copyright (c) nasser-sh 2016
 *
 *   Distributed under BSD-style license. See accompanying LICENSE.txt in project
 *   directory.
 */
#include <afxwin.h>
#include <gl/GL.h>
#include "GLRenderer.h"


namespace graphics {
namespace ffgl {

    void Init()
    {
        glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

        glEnable(GL_BLEND);
        glEnable(GL_DEPTH_TEST);
        glEnable(GL_LIGHTING); 
        glEnable(GL_LIGHT0);
        glEnable(GL_LINE_SMOOTH);
        glEnable(GL_POLYGON_SMOOTH);

        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
        glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);

        glEnableClientState(GL_VERTEX_ARRAY);
        glEnableClientState(GL_NORMAL_ARRAY);

    }


    void Draw(CMesh const &mesh)
    {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glVertexPointer(3, GL_FLOAT, 0, &mesh.Vertices().front());
        glNormalPointer(GL_FLOAT, 0, &mesh.Normals().front());
        glDrawElements(
            GL_TRIANGLES, <commit_msg>Add placeholder lighting to Fixed Function renderer<commit_after>/*   Copyright (c) nasser-sh 2016
 *
 *   Distributed under BSD-style license. See accompanying LICENSE.txt in project
 *   directory.
 */
#include <afxwin.h>
#include <gl/GL.h>
#include "GLRenderer.h"


namespace graphics {
namespace ffgl {

    void Init()
    {
        glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

        glEnable(GL_BLEND);
        glEnable(GL_DEPTH_TEST);
        glEnable(GL_LIGHTING); 
        glEnable(GL_LIGHT0);
        glEnable(GL_LINE_SMOOTH);
        glEnable(GL_POLYGON_SMOOTH);

        GLfloat lightPosition[] = { 0.0f, 0.0f, -2.0f, 1.0f };
        glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);

        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
        glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);

        glEnableClientState(GL_VERTEX_ARRAY);
        glEnableClientState(GL_NORMAL_ARRAY);
    }


    void Draw(CMesh const &mesh)
    {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glVertexPointer(3, GL_FLOAT, 0, &mesh.Vertices().front());
        glNormalPointer(GL_FLOAT, 0, &mesh.Normals().front());
        glDrawElements(
            GL_TRIANGLES, 
{'fraction_non_alphanumeric': 0.10928725701943845, 'fraction_numerical': 0.017710583153347732, 'mean_word_length': 3.0069204152249136, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7623189', 'n_tokens_mistral': 902, 'n_tokens_neox': 842, 'n_words': 135}