mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
implemented line rendering
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "shader.h"
|
||||
#include "box.h"
|
||||
#include "quad.h"
|
||||
#include "lineRenderer.h"
|
||||
|
||||
#include "glad.h"
|
||||
#include <glfw3.h>
|
||||
@@ -15,6 +16,7 @@ using namespace std;
|
||||
|
||||
namespace vb01{
|
||||
static Root *root = nullptr;
|
||||
Shader *shader = nullptr;
|
||||
|
||||
Root* Root::getSingleton(){
|
||||
if(!root)
|
||||
@@ -55,6 +57,8 @@ namespace vb01{
|
||||
initMainFramebuffer(fragTexture, brightTexture);
|
||||
initBloomFramebuffer();
|
||||
initGuiPlane(fragTexture, brightTexture);
|
||||
|
||||
shader = new Shader(Root::getSingleton()->getLibPath() + "line3D");
|
||||
}
|
||||
|
||||
void Root::initWindow(string name){
|
||||
@@ -148,6 +152,8 @@ namespace vb01{
|
||||
|
||||
rootNode->update();
|
||||
|
||||
LineRenderer::getSingleton()->drawLines();
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user