Added two render layers and the basic rendering pipeline; Fixed fullscreen graphics; No shader re-binding
This commit is contained in:
1 parent
e35688373e
commit
1c638bdcb9
12 files changed
+76
-35
No files matched your search
@@ -47,7 +47,7 @@ namespace nf {
|
||||
LPCWSTR m_wclassName;
|
||||
HWND m_window;
|
||||
LONG m_defaultWindowStyle;
|
||||
WINDOWPLACEMENT m_wndPlacement;
|
||||
int m_altWidth, m_altHeight;
|
||||
|
||||
std::chrono::duration<double> m_fpsDuration;
|
||||
double m_deltaTime;
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
#pragma once
|
||||
#include "VertexArray.h"
|
||||
#include "Shader.h"
|
||||
#include "VertexArray.h"
|
||||
#include "IndexBuffer.h"
|
||||
|
||||
namespace nf {
|
||||
class Drawable {
|
||||
enum class DrawableType {
|
||||
NF_GAME, NF_UI
|
||||
};
|
||||
public:
|
||||
Drawable();
|
||||
enum class DrawableType {
|
||||
NF_NONE, NF_GAME, NF_UI
|
||||
};
|
||||
Drawable(const char* vertexShader, const char* fragmentShader, const void* vertexBuffer, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount);
|
||||
|
||||
unsigned int getIndexCount();
|
||||
void bind();
|
||||
virtual DrawableType identity();
|
||||
|
||||
~Drawable();
|
||||
protected:
|
||||
//TODO: Add VAO, Shader, index buffer, etc.
|
||||
Shader m_shader;
|
||||
VertexArray m_vao;
|
||||
IndexBuffer m_ib;
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,6 @@ namespace nf {
|
||||
virtual void onExit();
|
||||
protected:
|
||||
Application* m_app;
|
||||
Renderer* m_renderer;
|
||||
//Resource identifier?
|
||||
};
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace nf {
|
||||
public:
|
||||
Renderer(Application* app);
|
||||
|
||||
void render(const Drawable& in);
|
||||
void render(Drawable* in);
|
||||
|
||||
void doFrame();
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace nf {
|
||||
void bind();
|
||||
void getUniformLocation(const char* uniformName);
|
||||
|
||||
static unsigned int current;
|
||||
|
||||
~Shader();
|
||||
private:
|
||||
unsigned int m_id;
|
||||
|
||||
Reference in new issue
Block a user