CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrMetalLocalContext.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23// Metal renderer local context
24
25#ifndef ODTRMTLLOCALCONTEXT
26#define ODTRMTLLOCALCONTEXT
27
28#include "TD_PackPush.h"
29
30#include "../TrRndLocalContext.h"
31
32class OdTrMetalShadersRuntime;
33
35{
36public:
38
39 // Each platform implementation must implement last one method
41 //\/\delete macros below
42#if 0
43 virtual void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {};
44
45 virtual void glDrawArrays(GLenum mode, GLint first, GLsizei count) {};
46 virtual GLenum glGetError() { return GL_NO_ERROR; };
47
48 virtual void glGenTextures(GLsizei n, GLuint *textures) {};
49 virtual void glBindTexture(GLenum target, GLuint texture) {};
50 virtual void glTexParameteri(GLenum target, GLenum pname, GLint param) {};
51 virtual void glPixelStorei(GLenum pname, GLint param) {};
52 virtual void glTexImage2D(GLenum target, GLint level, GLint internalformat,
54 GLenum format, GLenum type, const GLvoid *data) {};
55 virtual void glActiveTexture(GLenum texture) {};
56 virtual void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) {};
57 virtual void glDeleteTextures(GLsizei n, const GLuint * textures) {};
58 virtual void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * data) {};
59
60 virtual void glEnable(GLenum cap) {};
61 virtual void glDisable(GLenum cap) {};
62 virtual void glStencilFunc(GLenum func, GLint ref, GLuint mask) {};
63 virtual void glStencilMask(GLuint mask) {};
64 virtual void glStencilOp(GLenum sfail, GLenum dpfail, GLenum dppass) {};
65 virtual void glClearStencil(GLint s) {};
66 virtual void glClear(GLbitfield mask) {};
67 virtual void glDepthFunc(GLenum func) {};
68 virtual void glDepthMask(GLboolean flag) {};
69 virtual void glDepthRangef(GLfloat nearVal, GLfloat farVal) {};
70 virtual void glClearDepthf(GLfloat depth) {};
71 virtual void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {};
72 virtual void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {};
73 virtual void glBlendFunc(GLenum sfactor, GLenum dfactor) {};
74 virtual void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {};
75 virtual void glBlendEquation(GLenum mode) {};
76 virtual void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {};
77 virtual void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {};
78 virtual void glPolygonOffset(GLfloat factor, GLfloat units) {};
79 virtual void glCullFace(GLenum mode) {};
80 virtual void glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {};
81
82 virtual void glGenFramebuffers(GLsizei n, GLuint *ids) {};
83 virtual void glBindFramebuffer(GLenum target, GLuint framebuffer) {};
86 virtual GLenum glCheckFramebufferStatus(GLenum target) { return 0; };
87 virtual void glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers) {};
88
89 virtual void glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) {};
90 virtual void glBindRenderbuffer(GLenum target, GLuint renderbuffer) {};
92 virtual void glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers) {};
93
94 virtual void glLineWidth(GLfloat width){};
95#endif
96 virtual void SetShadersRuntime(OdTrMetalShadersRuntime *ShadersRuntime){};
97 virtual void SetVertexAttribPointerSize(GLuint Size){};
98 virtual bool IsAttributeEnabled(GLuint index){return false;};
99 virtual void MetalSetAttributeBuffer(GLuint index, int MetalIndex, int Size){};
100 virtual void SendDepthRangeDiff(int index, int isVertex){};
101};
102
104
105#include "TD_PackPop.h"
106
107#endif // ODTRMTLLOCALCONTEXT
@ GL_NO_ERROR
Definition: NoGL.h:421
OdSmartPtr< OdTrMetalLocalContext > OdTrMetalLocalContextPtr
static OdSmartPtr< OdTrMetalLocalContext > createLocalContext(OdTrVisRenderClient *pDevice)
virtual void MetalSetAttributeBuffer(GLuint index, int MetalIndex, int Size)
virtual void SendDepthRangeDiff(int index, int isVertex)
virtual void SetVertexAttribPointerSize(GLuint Size)
virtual bool IsAttributeEnabled(GLuint index)
virtual void SetShadersRuntime(OdTrMetalShadersRuntime *ShadersRuntime)
GLuint renderbuffer
Definition: gles2_ext.h:491
#define glBlendColor
Definition: gles2_ext.h:155
GLenum GLint ref
Definition: gles2_ext.h:262
GLenum modeAlpha
Definition: gles2_ext.h:260
GLfloat GLfloat GLfloat alpha
Definition: gles2_ext.h:147
GLenum GLint * params
Definition: gles2_ext.h:184
GLenum func
Definition: gles2_ext.h:262
#define glCheckFramebufferStatus
Definition: gles2_ext.h:532
#define glBlendFuncSeparate
Definition: gles2_ext.h:154
GLint level
Definition: gles2_ext.h:110
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
#define glFramebufferTexture2D
Definition: gles2_ext.h:533
#define glBlendEquation
Definition: gles2_ext.h:156
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
GLuint index
Definition: gles2_ext.h:265
GLenum GLint GLuint mask
Definition: gles2_ext.h:262
GLenum sfail
Definition: gles2_ext.h:261
GLsizei GLsizei * count
Definition: gles2_ext.h:276
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
#define glBindFramebuffer
Definition: gles2_ext.h:529
#define glGenRenderbuffers
Definition: gles2_ext.h:525
#define glClearDepthf
Definition: gles2_ext.h:577
const GLuint * framebuffers
Definition: gles2_ext.h:498
GLenum GLenum GLuint texture
Definition: gles2_ext.h:501
#define glDepthRangef
Definition: gles2_ext.h:576
GLuint framebuffer
Definition: gles2_ext.h:497
const GLuint * renderbuffers
Definition: gles2_ext.h:492
#define glBindRenderbuffer
Definition: gles2_ext.h:523
GLenum GLenum textarget
Definition: gles2_ext.h:501
#define glDeleteFramebuffers
Definition: gles2_ext.h:530
#define glFramebufferRenderbuffer
Definition: gles2_ext.h:534
GLfloat GLfloat blue
Definition: gles2_ext.h:147
GLint GLint GLint GLsizei GLsizei GLenum format
Definition: gles2_ext.h:111
GLint GLenum internalformat
Definition: gles2_ext.h:110
GLint GLenum GLsizei GLsizei GLint border
Definition: gles2_ext.h:110
GLenum pname
Definition: gles2_ext.h:184
GLfloat x
Definition: gles2_ext.h:314
GLenum GLenum GLenum dppass
Definition: gles2_ext.h:261
#define glDeleteRenderbuffers
Definition: gles2_ext.h:524
GLenum GLenum renderbuffertarget
Definition: gles2_ext.h:502
GLenum attachment
Definition: gles2_ext.h:501
#define glRenderbufferStorage
Definition: gles2_ext.h:526
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
GLfloat green
Definition: gles2_ext.h:147
#define glBlendEquationSeparate
Definition: gles2_ext.h:388
#define glActiveTexture
Definition: gles2_ext.h:118
GLfloat GLfloat y
Definition: gles2_ext.h:316
#define glGenFramebuffers
Definition: gles2_ext.h:531
GLenum GLenum dpfail
Definition: gles2_ext.h:261
unsigned int GLbitfield
Definition: NoGL.h:33
void GLvoid
Definition: NoGL.h:45
float GLfloat
Definition: NoGL.h:41
int GLsizei
Definition: NoGL.h:37
float GLclampf
Definition: NoGL.h:42
unsigned int GLenum
Definition: NoGL.h:31
unsigned char GLboolean
Definition: NoGL.h:32
int GLint
Definition: NoGL.h:36
unsigned int GLuint
Definition: NoGL.h:40