Init render data by DivaGL

This commit is contained in:
korenkonder
2024-04-02 23:51:10 +03:00
parent 17e78dd81f
commit e5418a847b
9 changed files with 566 additions and 2 deletions
+19
View File
@@ -23,6 +23,25 @@ void draw_state_stats::reset() {
field_1C = 0;
}
void sss_data::free() {
if (init_data)
for (RenderTexture& i : textures)
i.Free();
}
void sss_data::init() {
if (init_data)
return;
textures[0].Init(640, 360, 0, GL_RGBA16F, GL_ZERO /*GL_DEPTH_COMPONENT32F*/);
textures[1].Init(320, 180, 0, GL_RGBA16F, GL_ZERO);
textures[2].Init(320, 180, 0, GL_RGBA16F, GL_ZERO);
textures[3].Init(320, 180, 0, GL_RGBA16F, GL_ZERO);
param = { 0.0f, 0.0f, 0.0f, 1.0f };
init_data = true;
}
void sss_data::set_texture(int32_t texture_index) {
gl_state_active_bind_texture_2d(16, textures[texture_index].GetColorTex());
gl_state_active_texture(0);