mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Improvement] (All): Remove redundant code.
This commit is contained in:
@@ -9,7 +9,7 @@ namespace MG_GL::GL {
|
|||||||
const FramebufferObject& fbo,
|
const FramebufferObject& fbo,
|
||||||
MG_Diligent::GLFramebufferInfo& fbInfo);
|
MG_Diligent::GLFramebufferInfo& fbInfo);
|
||||||
|
|
||||||
inline bool IsSamplerType(GLenum type) {
|
bool IsSamplerType(GLenum type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case GL_SAMPLER_2D:
|
case GL_SAMPLER_2D:
|
||||||
case GL_SAMPLER_3D:
|
case GL_SAMPLER_3D:
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
#include "../../../../Includes.h"
|
#include "../../../../Includes.h"
|
||||||
|
|
||||||
namespace MG_GL::GL {
|
namespace MG_GL::GL {
|
||||||
|
bool IsSamplerType(GLenum type);
|
||||||
|
|
||||||
void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
|
void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||||
void DrawArrays(GLenum mode, GLint first, GLsizei count);
|
void DrawArrays(GLenum mode, GLint first, GLsizei count);
|
||||||
void DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
|
void DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
|
||||||
|
|||||||
@@ -8,21 +8,6 @@
|
|||||||
#include "../../../../Includes.h"
|
#include "../../../../Includes.h"
|
||||||
|
|
||||||
namespace MG_GL::GL {
|
namespace MG_GL::GL {
|
||||||
inline bool IsSamplerType(GLenum type) {
|
|
||||||
switch (type) {
|
|
||||||
case GL_SAMPLER_2D:
|
|
||||||
case GL_SAMPLER_3D:
|
|
||||||
case GL_SAMPLER_CUBE:
|
|
||||||
case GL_SAMPLER_2D_SHADOW:
|
|
||||||
case GL_SAMPLER_2D_ARRAY:
|
|
||||||
case GL_SAMPLER_2D_ARRAY_SHADOW:
|
|
||||||
case GL_SAMPLER_CUBE_SHADOW:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline size_t GetUniformSize(GLenum type) {
|
inline size_t GetUniformSize(GLenum type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case GL_FLOAT: return sizeof(float);
|
case GL_FLOAT: return sizeof(float);
|
||||||
|
|||||||
Reference in New Issue
Block a user