mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
CombinerProgram initial work
This commit is contained in:
parent
19f5f8b302
commit
60813209f7
|
@ -302,6 +302,8 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Graphics\Context.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\GLFunctions.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramImpl.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\opengl_BufferManipulationObjectFactory.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\opengl_CachedFunctions.cpp" />
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\opengl_ContextImpl.cpp" />
|
||||
|
@ -429,10 +431,13 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_mupenplus|Win32'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\CombinerProgram.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\Context.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\ContextImpl.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\ObjectHandle.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\GLFunctions.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramBuilder.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramImpl.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\opengl_BufferManipulationObjectFactory.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\opengl_CachedFunctions.h" />
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\opengl_ContextImpl.h" />
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
<Filter Include="Source Files\Graphics\OpenGL">
|
||||
<UniqueIdentifier>{207de069-1088-4913-84f5-3cf0804928dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\Graphics\OpenGL\GLSL">
|
||||
<UniqueIdentifier>{f6f08b9a-17ba-4e14-a73b-bb0c3878811f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\Graphics\OpenGL\GLSL">
|
||||
<UniqueIdentifier>{e67eafa1-5cea-4267-bc12-715e06c744db}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\Combiner.cpp">
|
||||
|
@ -299,6 +305,12 @@
|
|||
<ClCompile Include="..\..\src\CombinerKey.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramBuilder.cpp">
|
||||
<Filter>Source Files\Graphics\OpenGL\GLSL</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramImpl.cpp">
|
||||
<Filter>Source Files\Graphics\OpenGL\GLSL</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\3DMath.h">
|
||||
|
@ -544,8 +556,17 @@
|
|||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\opengl_BufferManipulationObjectFactory.h">
|
||||
<Filter>Header Files\Graphics\OpenGL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\CombinerProgram.h">
|
||||
<Filter>Header Files\Graphics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\CombinerKey.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramBuilder.h">
|
||||
<Filter>Header Files\Graphics\OpenGL\GLSL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\GLSL\glsl_CombinerProgramImpl.h">
|
||||
<Filter>Header Files\Graphics\OpenGL\GLSL</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
15
src/Graphics/CombinerProgram.h
Normal file
15
src/Graphics/CombinerProgram.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
#include "CombinerKey.h"
|
||||
|
||||
namespace graphics {
|
||||
|
||||
class CombinerProgram
|
||||
{
|
||||
public:
|
||||
virtual ~CombinerProgram() {};
|
||||
virtual void activate() = 0;
|
||||
virtual void update(bool _force) = 0;
|
||||
virtual CombinerKey getKey() const = 0;
|
||||
};
|
||||
|
||||
}
|
|
@ -68,6 +68,12 @@ void Context::addFrameBufferRenderTarget(const FrameBufferRenderTarget & _params
|
|||
m_impl->addFrameBufferRenderTarget(_params);
|
||||
}
|
||||
|
||||
CombinerProgram * Context::createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key)
|
||||
{
|
||||
return m_impl->createCombinerProgram(_color, _alpha, _key);
|
||||
|
||||
}
|
||||
|
||||
bool Context::isMultisamplingSupported() const
|
||||
{
|
||||
// TODO
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <Combiner.h>
|
||||
#include "ObjectHandle.h"
|
||||
#include "Parameter.h"
|
||||
#include "CombinerProgram.h"
|
||||
|
||||
#define GRAPHICS_CONTEXT
|
||||
|
||||
|
@ -79,6 +81,8 @@ namespace graphics {
|
|||
|
||||
void addFrameBufferRenderTarget(const FrameBufferRenderTarget & _params);
|
||||
|
||||
CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key);
|
||||
|
||||
bool isMultisamplingSupported() const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace graphics {
|
|||
virtual void addFrameBufferRenderTarget(const Context::FrameBufferRenderTarget & _params) = 0;
|
||||
virtual ObjectHandle createRenderbuffer() = 0;
|
||||
virtual void initRenderbuffer(const Context::InitRenderbufferParams & _params) = 0;
|
||||
virtual CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#include "glsl_CombinerProgramBuilder.h"
|
||||
|
||||
using namespace opengl::glsl;
|
||||
|
||||
CombinerProgramBuilder::CombinerProgramBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CombinerProgramBuilder::~CombinerProgramBuilder()
|
||||
{
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
#include <Combiner.h>
|
||||
#include <Graphics/CombinerProgram.h>
|
||||
|
||||
namespace opengl {
|
||||
namespace glsl {
|
||||
|
||||
class CombinerProgramBuilder
|
||||
{
|
||||
public:
|
||||
CombinerProgramBuilder();
|
||||
~CombinerProgramBuilder();
|
||||
graphics::CombinerProgram * buildCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
26
src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.cpp
Normal file
26
src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "glsl_CombinerProgramImpl.h"
|
||||
|
||||
using namespace opengl::glsl;
|
||||
|
||||
CombinerProgramImpl::CombinerProgramImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CombinerProgramImpl::~CombinerProgramImpl()
|
||||
{
|
||||
}
|
||||
|
||||
void CombinerProgramImpl::activate()
|
||||
{
|
||||
}
|
||||
|
||||
void CombinerProgramImpl::update(bool _force)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CombinerKey CombinerProgramImpl::getKey() const
|
||||
{
|
||||
return CombinerKey();
|
||||
}
|
19
src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.h
Normal file
19
src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#include <Graphics/CombinerProgram.h>
|
||||
|
||||
namespace opengl {
|
||||
namespace glsl {
|
||||
|
||||
class CombinerProgramImpl : public graphics::CombinerProgram
|
||||
{
|
||||
public:
|
||||
CombinerProgramImpl();
|
||||
~CombinerProgramImpl();
|
||||
|
||||
void activate() override;
|
||||
void update(bool _force) override;
|
||||
CombinerKey getKey() const override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -104,3 +104,8 @@ void ContextImpl::addFrameBufferRenderTarget(const graphics::Context::FrameBuffe
|
|||
{
|
||||
m_addFramebufferRenderTarget->addFrameBufferRenderTarget(_params);
|
||||
}
|
||||
|
||||
graphics::CombinerProgram * ContextImpl::createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace opengl {
|
|||
|
||||
void addFrameBufferRenderTarget(const graphics::Context::FrameBufferRenderTarget & _params) override;
|
||||
|
||||
graphics::CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<CachedFunctions> m_cachedFunctions;
|
||||
std::unique_ptr<Create2DTexture> m_createTexture;
|
||||
|
|
Loading…
Reference in New Issue
Block a user