<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSharpGL;

namespace PhysicallyBasedRendering
{
    partial class PBRNode : ModernNode, IRenderable
    {
        private PBRModel model;
        public static PBRNode Create(PBRModel model)
        {
            throw new NotImplementedException();
            //var vs = new VertexShader(vertexCode);
            //var fs = new FragmentShader(fragmentCode);
            //var array = new ShaderArray(vs, fs);
            //var map = new AttributeMap();
            //map.Add("inPosition", PBRModel.strPosition);
            //map.Add("inNormal", PBRModel.strNormal);
            //map.Add("inTexCoord", PBRModel.strTexCoord);
            //var builder = new RenderMethodBuilder(array, map);
            //var node = new PBRNode(model, builder);
            //node.Initialize();

            //return node;
        }

        private PBRNode(PBRModel model, params RenderMethodBuilder[] builders) : base(model, builders) { this.model = model; }


    }
}
<commit_msg>LoadTexture<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSharpGL;
using System.Drawing;

namespace PhysicallyBasedRendering
{
    partial class PBRNode : ModernNode, IRenderable
    {
        private PBRModel model;
        public static PBRNode Create(PBRModel model)
        {
            throw new NotImplementedException();
            //var vs = new VertexShader(vertexCode);
            //var fs = new FragmentShader(fragmentCode);
            //var array = new ShaderArray(vs, fs);
            //var map = new AttributeMap();
            //map.Add("inPosition", PBRModel.strPosition);
            //map.Add("inNormal", PBRModel.strNormal);
            //map.Add("inTexCoord", PBRModel.strTexCoord);
            //var builder = new RenderMethodBuilder(array, map);
            //var node = new PBRNode(model, builder);
            //node.Initialize();

            //return node;
        }

        private PBRNode(PBRModel model, params RenderMethodBuilder[] builders) : base(model, builders) { this.model = model; }

        private Texture LoadTexture(string filename)
        {
            var bitmap = new Bitmap(filename);
            var storage = new TexImageBitmap(bitmap, GL.GL_RGB);
            var texture = new Texture(storage,
                new TexParameteri(TexParameter.PropertyName.TextureWrapS, (int)GL.GL_REPEAT),
                new TexParameteri(TexParameter.PropertyName.TextureWrapT, (int)GL.GL_REPEAT),
                new TexParameteri(TexParameter.PropertyName.TextureMinFilter, (int)GL.GL_LINEAR),
                new TexParameteri(TexParameter.PropertyName.TextureMagFilter, (int)GL.GL_LINEAR));

            return texture;
        }
    }
}

{'fraction_non_alphanumeric': 0.10472133475328363, 'fraction_numerical': 0.0, 'mean_word_length': 2.3507728894173603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5616396', 'n_tokens_mistral': 778, 'n_tokens_neox': 767, 'n_words': 181}