feat(gx): add GxRenderTargetGet
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run

This commit is contained in:
fallenoak 2026-02-18 08:43:11 -06:00
parent a51e9ba082
commit e7bd5968cf
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
4 changed files with 21 additions and 0 deletions

View File

@ -924,6 +924,10 @@ CGxPool* CGxDevice::PoolCreate(EGxPoolTarget target, EGxPoolUsage usage, uint32_
return pool;
}
void CGxDevice::RenderTargetGet(EGxBuffer buffer, CGxTex*& gxTex) {
gxTex = this->m_textureTarget[buffer].m_texture;
}
void CGxDevice::RsGet(EGxRenderState which, int32_t& value) {
value = static_cast<int32_t>(this->m_appRenderStates[which].m_value);
}

View File

@ -183,6 +183,7 @@ class CGxDevice {
void PrimVertexFormat(CGxBuf*, CGxVertexAttrib*, uint32_t);
void PrimVertexMask(uint32_t);
void PrimVertexPtr(CGxBuf*, EGxVertexBufferFormat);
void RenderTargetGet(EGxBuffer buffer, CGxTex*& gxTex);
void RsGet(EGxRenderState, int32_t&);
void RsSet(EGxRenderState, int32_t);
void RsSet(EGxRenderState, void*);

6
src/gx/RenderTarget.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "gx/RenderTarget.hpp"
#include "gx/Device.hpp"
void GxRenderTargetGet(EGxBuffer buffer, CGxTex*& gxTex) {
g_theGxDevicePtr->RenderTargetGet(buffer, gxTex);
}

10
src/gx/RenderTarget.hpp Normal file
View File

@ -0,0 +1,10 @@
#ifndef GX_RENDER_TARGET_HPP
#define GX_RENDER_TARGET_HPP
#include "gx/Types.hpp"
class CGxTex;
void GxRenderTargetGet(EGxBuffer buffer, CGxTex*& gxTex);
#endif