36 #ifndef __RE_OGLRender__
37 #define __RE_OGLRender__
103 #define RE_DRIVER_INFO_VENDOR "OpenGL Vendor"
104 #define RE_DRIVER_INFO_RENDERER "OpenGL Renderer"
105 #define RE_DRIVER_INFO_VERSION "OpenGL Version"
106 #define RE_DRIVER_INFO_SHADING_LANGUAGE "OpenGL Shading Language"
107 #define RE_DRIVER_INFO_DETECTED "Detected"
116 const char *className()
const;
130 {
return reinterpret_cast<RE_Render*
>(
this); }
132 {
return reinterpret_cast<const RE_Render*
>(
this); }
142 static bool hasGL11();
143 static bool hasGL12();
144 static bool hasGL13();
145 static bool hasGL14();
146 static bool hasGL15();
147 static bool hasGL20();
148 static bool hasGL21();
150 static bool hasGL3(
int minor);
151 static bool hasGL4(
int minor);
153 static int glMajorVersion();
154 static int glMinorVersion();
157 int glslMajorVersion();
158 int glslMinorVersion();
180 static void setPerformBadDriverCheck(
bool onoff);
183 static bool hasDriverVersion();
184 static int getDriverMajorVersion();
185 static int getDriverMinorVersion();
186 static int getDriverBuildMajorVersion();
187 static int getDriverBuildMinorVersion();
190 static bool getUsingCoreProfile();
191 static void setUsingCoreProfile(
bool using_core_profile);
198 static void clearGraphicsCache();
203 int64 getFreeTextureMemoryKB(
int64 *largest_chunk =
nullptr);
204 int64 getFreeBufferMemoryKB(
int64 *largest_chunk =
nullptr);
205 int64 getFreeFramebufferMemoryKB(
int64 *largest_chunk =
nullptr);
208 static int64 getInitialFreeMemoryKB();
212 static void exitWithBadDriver();
219 static void updateScreenSize();
224 static bool areScreensUniform();
242 static float pixelsToInches(
int n);
243 static int inchesToPixels(
float i);
244 static int scaledSize(
int size);
250 void checkForSuspendResume();
251 static void addSuspendResumeCB(
void (*cb)(
void*),
void *
data);
252 static void removeSuspendResumeCB(
void (*cb)(
void*),
void *
data);
259 void enableMultisample(
bool enable);
260 bool isMultisampleEnabled()
const;
262 void enableAlphaToCoverage(
bool enable);
263 bool isAlphaToCoverage()
const;
265 void getMaxViewportSize(
int &
w,
int &
h)
const;
266 int getMaxColorSamples()
const;
267 int getMaxDepthSamples()
const;
273 void setWindow(
RE_Window *,
bool attach =
true);
275 bool makeCurrent(
bool ignore_errors =
false);
276 static void resetCurrent();
280 bool isCurrentRender()
const;
281 bool isDrawableContextValid()
const;
288 {
return theCurrentRender.get() ==
this; }
298 void popOffscreenBufferFromDrawable();
307 void popOffscreenBuffer();
316 const RE_Window *getCurrentWindow()
const;
338 void lockContextForRender();
339 void unlockContextAfterRender();
340 bool tryLockContextForRender();
341 bool isContextLocked()
const;
350 void unlockContext();
360 int getNextGLError();
361 void clearGLErrors();
362 const char *getGLErrorString(
int error );
363 void printGLError(
const char *header,
364 bool assert =
false );
365 void printAllGLErrors(
const char *header,
366 bool assert =
false );
368 void dumpNewState(
bool show_all =
false,
369 bool show_shader_blocks =
true);
370 void dumpViewportState(
bool show_all =
false);
371 void dumpTextureState()
const;
372 void dumpVertexAttributes()
const;
373 void dumpFragmentTests(
bool show_all =
false)
const;
374 void dumpRasterizeState(
bool show_all =
false)
const;
375 void dumpTextureCacheState(
int stack_level =-1)
const;
380 bool isDebugLabelSupported()
const;
383 bool isDebugging()
const;
385 int pushDebug(
bool enable);
386 void popDebug(
int *nest =
nullptr);
388 int pushDebugGroup(
const char *
name,
int id=1987);
389 void popDebugGroup(
int *nest =
nullptr);
391 void addComment(
const char *
name,
400 int pushDrawFramebuffer();
404 void popDrawFramebuffer(
int *nest =
nullptr);
406 int pushReadFramebuffer();
410 void popReadFramebuffer(
int *nest =
nullptr);
412 void updateFramebuffer();
418 void unregisterFBO(
int id);
422 void useSampleMask(
bool use);
423 bool usingSampleMask()
const;
424 int getMaxIntegerSamples()
const;
425 int getSampleMask(
int mask_number);
426 void setSampleMask(
int mask_number,
int mask);
427 static int getMatteMaskForSampleCount(
int samples);
433 void clearC(
float *
color =
nullptr);
434 void clearZ(
float z = 1.0);
435 void clearCZ(
float z = 1.0);
444 void enableColorBufferWriting();
445 void disableColorBufferWriting();
446 bool getColorBufferWriting();
447 void updateColorBufferWriting();
456 void popDrawBuffer(
int *nest = 0);
459 bool getDrawBufferIsBlendable();
462 void popReadBuffer(
int *nest = 0);
469 bool isFrontBufferDirty()
const;
470 void setFrontBufferDirty(
bool d);
472 void flush(
int wait=0);
484 void disableScreenMask();
485 void intersectMask2DI(
const UT_DimRect &rect);
488 bool getScreenMask();
491 int getOGLMaxClipPlanes();
492 void enableClipDistance(
int clip_plane,
bool enable);
493 bool clipDistanceEnabled(
int clip_plane)
const;
500 int pushBackfaceCulling();
501 int pushBackfaceCulling(
bool backface);
502 void popBackfaceCulling(
int *nested = 0);
504 bool isBackface()
const;
505 void setBackface(
bool removeBackface);
506 bool getReverseWinding();
507 void setReverseWinding(
bool reverse_winding);
512 bool isPointOffset();
514 bool isPolygonOffset();
515 void pointOffset(
bool onoff );
516 void lineOffset(
bool onoff );
517 void polygonOffset(
bool onoff );
518 void setOffsetAmount(
float variable,
float constant );
519 void getOffsetAmount(
float *variable,
float *constant)
const;
533 int stream_bitfield = 0x1);
536 void endTransformFeedback();
540 int getNumFeedbackPrimitives(
int stream = 0);
544 bool hasFeedbackBufferOverflow(
int stream = 0);
547 bool isTransformFeedbackEnabled()
const;
549 bool isRasterizeEnabled()
const;
554 float getLineWidth()
const;
555 float getMaxSmoothLineWidth();
563 void setProgramPointSize(
bool enable);
564 bool getProgramPointSize()
const;
572 int pushDepthState();
573 void popDepthState(
int *nest =
nullptr);
577 void enableDepthBufferWriting();
578 void disableDepthBufferWriting();
579 bool getDepthBufferWriting();
580 void updateDepthBufferWriting();
583 void enableDepthTest();
584 void disableDepthTest();
586 void updateDepthTest();
591 void updateZFunction()
const;
595 void enableDepthClamp(
bool b);
596 bool getDepthClamp();
597 void updateDepthClamp();
599 void setDepthRange(
double nr,
double fr);
600 void getDepthRange(
double &nr,
double &fr)
const;
603 int pushStencilState();
604 void popStencilState(
int *nest =
nullptr);
606 void setStencil(
bool enable);
607 void setSClearValue(
int clearValue);
608 void setSWriteMask(
int writeMask);
613 void updateStencilState();
614 void resetSFunction();
615 void resetSWriteMask();
616 void resetSClearValue();
617 void resetSOperation();
620 void enableLogicOp();
621 void disableLogicOp();
627 int pushBlendState();
628 void popBlendState(
int *nesting = 0);
630 bool isBlending()
const;
631 void blend(
int onoff);
646 void blendAlpha(
int onoff = 1);
647 void blendAlphaPremult(
bool onoff =
true);
649 int pushSmoothLines();
650 void popSmoothLines(
int *nesting = 0);
653 void smoothBlendLinesNoFlagChange(
bool by_smooth);
656 int getBlendSmoothLevel()
const;
658 static void allowSmoothLines(
int yn);
659 static int allowsSmoothLines();
671 RE_Shader *override_mat_shader =
nullptr,
672 bool allow_partial_render =
false);
676 RE_Shader *override_mat_shader =
nullptr,
677 bool allow_partial_render =
false);
679 void popMaterial(
int *nest =
nullptr);
695 void popShader(
int *nest =
nullptr);
699 int pushShaderTransformFeedback(
RE_Shader *sh,
702 int stream_bitfield = 0x1);
706 int stream_bitfield = 0x1);
707 void popShaderTransformFeedback(
int *nest =
nullptr);
713 void setShaderOnlyMode(
bool enable);
714 void requestFixedFunction();
726 void setPatchVertices(
int num_verts);
735 bool setShaderSampleRate(
fpreal rate);
736 fpreal getShaderSampleRate()
const;
738 bool isSampleShading()
const;
766 { popUniform(bindex); }
772 void printBuiltInUniforms(
bool bound_only);
786 {
return myBuiltInUniformSerial; }
802 bool inverse_too =
false);
803 void popObjectMatrix();
808 void setFragmentDerivativeHint(
bool nicest);
809 bool getFragmentDerivativeHint();
816 void setConstAttribF32(
int loc,
int vsize,
const fpreal32 *
data);
819 void setConstAttribF32(
int loc,
int vsize,
const fpreal64 *
data);
822 void setConstAttribF64(
int loc,
int vsize,
const fpreal64 *
data);
825 void setConstAttribI32(
int loc,
int vsize,
const int32 *
data);
828 void setConstAttribU32(
int loc,
int vsize,
const uint32 *
data);
865 int bindTextureRaw(
int id,
int unit);
876 void setActiveTexture(
int textureunit);
877 int getActiveTexture()
const;
885 void popTextureState(
int *nest =
nullptr);
894 int findFirstFreeTextureUnit(
int starting_unit = 0)
const;
897 void updateTextureState()
const;
901 {
return myMaxTextureShaderUnits; }
903 {
return myMaxTextureVertexUnits; }
905 {
return myMaxTextureGeometryUnits; }
907 {
return myMaxTextureFragmentUnits; }
909 {
return myMaxTextureAnisotropy; }
914 {
return myMaxTextureSize; }
916 {
return myMaxTexture3DSize; }
918 {
return myMaxTextureRectSize; }
922 {
return myMaxColorBuffers; }
925 {
return myMaxDrawBuffers; }
928 void disableAllTextures();
932 bool bindImageTexture(
int image_unit,
937 void unbindImageTexture(
int image_unit);
943 int pushReadAlignment(
const void *
data,
int scansize);
944 void popReadAlignment(
int *nest =
nullptr);
946 int pushWriteAlignment(
const void *
data,
int scansize);
947 void popWriteAlignment(
int *nest =
nullptr);
950 void useSeamlessMaps(
bool enable);
951 bool usingSeamlessMaps();
962 int num_layers,
int size = 64 );
968 RE_OGLTexture *getRandomSampleMaskTexture(
unsigned int seed,
int nsamples,
975 int convert16bit = 0,
976 bool isinteger =
false);
977 #ifdef KARMA_OUTPUT_GPU_BUFFERS
985 bool is3DLUTSupported()
const;
987 void buildRasterTextureGeometry(
994 void displayRasterTexture(
float x,
float y,
float z,
997 void displayRasterTexture(
float x,
float y,
float z,
1001 void displayRasterTexture(
float x,
float y,
float z,
1007 float alpha_mult=1.0
f);
1013 void saveRaster(
int x,
int y,
int w,
int h,
1017 bool use_backbuf =
true);
1026 void setViewportFontOffset(
int x,
int y);
1027 int getViewportFontOffsetX()
const;
1028 int getViewportFontOffsetY()
const;
1051 bool region_support);
1052 void endConditionalRender();
1056 void enablePrimitiveRestart(
bool enable);
1057 void setPrimitiveRestartIndex(
unsigned int index);
1061 void drawViewportPoint(
const fpreal32 p[3],
1066 void drawViewportString(
const fpreal32 p[3],
1072 void postDrawViewportString();
1075 static void destroyShaderObject(
unsigned int progid,
bool unreg,
1077 static void destroyTextureObject(
unsigned int texid,
RE_OGLTexture *tex);
1078 static void destroyRenderbufferObject(
unsigned int rb);
1079 static void destroyBufferObject(
unsigned int buf);
1080 static void destroySync(
void *sync);
1082 static void clearCachedUniformBuffer(
int id);
1085 void destroyVertexArrayObject(
unsigned int vao);
1086 void destroyQuery(
unsigned int query);
1087 void destroyFramebufferObject(
unsigned int fbo);
1093 void unbindPipeline();
1098 void invalidateCachedState();
1109 void enableSubBufferDrawing(
bool enable);
1118 RE_OGLRender(
int do_foreground,
const char *appname = 0);
1122 #define RE_FLAG_STATE(RE_NAME,GL_FLAG) \
1123 void enable##RE_NAME () { if( myState.my##RE_NAME##State != 1 ) { ::glEnable( GL_FLAG ); myState.my##RE_NAME##State = 1; } } \
1124 void disable##RE_NAME () { if( myState.my##RE_NAME##State != 0 ) { ::glDisable( GL_FLAG ); myState.my##RE_NAME##State = 0; } } \
1125 bool get##RE_NAME () { if(myState.my##RE_NAME##State == 3) update##RE_NAME(); return (myState.my##RE_NAME##State ==1); } \
1126 void update##RE_NAME () { myState.my##RE_NAME##State = ::glIsEnabled( GL_FLAG ); } \
1127 void invalidate##RE_NAME() { myState.my##RE_NAME##State = 3; }
1132 #undef RE_FLAG_STATE
1134 #define RE_FLAG_11_STATE(RE_NAME,GL_FLAG) \
1135 void enable##RE_NAME () { if( (myState.my##RE_NAME##State) != 1 && hasGL11() ) {::glEnable( GLenum(GL_FLAG) ); myState.my##RE_NAME##State = 1; } } \
1136 void disable##RE_NAME () { if( myState.my##RE_NAME##State && hasGL11() ) { ::glDisable( GLenum(GL_FLAG) ); myState.my##RE_NAME##State = 0; } } \
1137 bool get##RE_NAME () { if(myState.my##RE_NAME##State == 3) update##RE_NAME(); return (myState.my##RE_NAME##State==1) ; } \
1138 void update##RE_NAME () { if( hasGL11() ) { myState.my##RE_NAME##State = ::glIsEnabled( GLenum(GL_FLAG) ); } else { myState.my##RE_NAME##State = 0; } } \
1139 void invalidate##RE_NAME() { if(hasGL11()) myState.my##RE_NAME##State=3; }
1144 #undef RE_FLAG_11_STATE
1146 void updateOffsetAmount();
1148 static bool initGLVersionInfo();
1149 virtual void initGLExtensions();
1150 virtual void updateGLState();
1151 virtual void updateStacks();
1154 static void determineTwinView();
1155 bool switchContextForRender(
bool ignore_errors);
1161 void updateBlendSmoothState();
1162 int privPushBlendSmoothState(
bool smooth_too);
1163 void privPopBlendSmoothState(
bool smooth_too,
int *idx);
1165 void setupDebugging();
1167 void freePendingObjects();
1171 void assignPushedUniforms();
1177 void updateViewport();
1183 static RE_SOperation oglToREsoperation(
int oglSOperation );
1186 static const char *bufferName(
GLint e);
1187 static const char *faceName(
GLint e);
1188 static const char *hintName(
GLint e);
1189 static const char *cullName(
GLint e);
1351 void suspendTestPatternRender();
1352 bool suspendTestPatternCheck();
1375 void lockContextInternal_(
bool set_current_context);
1376 void unlockContextInternal_(
bool clear_current_context);
1387 if(!myR->isContextLocked())
1389 myR->lockContextForRender();
1390 myLockedFlag =
true;
1398 myR->unlockContextAfterRender();
1414 ((majorGLVersion >= 1) &&
1415 (minorGLVersion >= 1))); };
1418 ((majorGLVersion >= 1) &&
1419 (minorGLVersion >= 2))); };
1422 ((majorGLVersion >= 1) &&
1423 (minorGLVersion >= 3))); };
1426 ((majorGLVersion >= 1) &&
1427 (minorGLVersion >= 4))); };
1430 ((majorGLVersion >= 1) &&
1431 (minorGLVersion >= 5))); };
1434 ((majorGLVersion >= 2) &&
1435 (minorGLVersion >= 0))); };
1438 ((majorGLVersion >= 2) &&
1439 (minorGLVersion >= 1))); };
1443 ((majorGLVersion == 3) &&
1444 (minorGLVersion >= minor))); };
1448 ((majorGLVersion == 4) &&
1449 (minorGLVersion >= minor))); };
1462 return !(theDriverMajor == 0
1463 && theDriverMinor == 0
1464 && theDriverBuildMajor == 0
1465 && theDriverBuildMinor == 0);
1476 return myExt->hasExtension( e );
1483 return SYSrint(theDotsPerInch * uiScale());
1488 if(theUIScale <= 0.0)
1497 return (
float)n / dpi();
1503 return (
int)
SYSrint(i*(
float)dpi());
1515 if (scaled_size < 1.0)
1518 return (
int)scaled_size;
1533 fpreal ui_scale = uiScale();
1534 if (ui_scale == 1.0)
1559 {
return myFrontBufferDirty;}
1563 { myFrontBufferDirty = d; }
1581 enablePointOffset();
1583 disablePointOffset();
1592 disableLineOffset();
1601 disableFillOffset();
1607 *variable = myState._offset_variable;
1608 *constant = myState._offset_constant;
1614 return myState.myBlendSmoothStack[myState.myBlendSmoothLevel].myBlend==1;
1619 return myState.myBlendSmoothLevel;
1627 {
return myViewportFontOffsetX; }
1631 {
return myViewportFontOffsetY; }
1637 return myTransformFeedbackEnabled;
1643 return myTransformFeedbackType;
1649 return myRasterizeEnabled;
1655 return myBuiltInUniforms[builtin_var_type];
1661 return myDebugLabelSupported;
1667 return myDebuggingSupported;
int getMaxDrawBuffers() const
UT_IntArray myPendingDeleteFBOs
RE_OGLExt * getExt() const
static int scaledSize(int size)
static int getDriverMajorVersion()
GLenum GLuint GLenum GLsizei const GLchar * buf
RE_PrimType getFeedbackMode() const
bool isRasterizeEnabled() const
int myDebugGroupStackSize
RV_API RV_VKImagePtr getRandomTextureArray(RV_Render *r, unsigned int seed, bool interp, int num_layers, int size=64)
Returns an 8b RGBA size^2 2D texture array of size 'num_layers'.
bool isInitialized() const
UT_Vector2F myLineWidthRange
bool isFrontBufferDirty() const
void setPointSize(fpreal32 size)
OGLDrawable myPushedDrawable
static int inchesToPixels(float i)
void rasterize(const PointDataTreeOrGridT &points, TransferT &transfer, const FilterT &filter=NullFilter(), InterrupterT *interrupter=nullptr)
Perform potentially complex rasterization from a user defined transfer scheme.
#define RE_FLAG_11_STATE(RE_NAME, GL_FLAG)
int myFragmentDerivativeHint
==========================================================================
int getMaxTexture3DSize() const
static RE_GraphicsDevice theDevice
static int theDriverBuildMinor
GLsizei const GLfloat * value
RE_OGLFramebuffer * mySuspendTestFBO
RE_PrimType myTransformFeedbackType
GLdouble GLdouble GLdouble z
#define GL_POLYGON_OFFSET_POINT
bool myDebugLabelSupported
int64 myBuiltInUniformSerial
RE_WindowDrawable * myWindowDrawable
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
RE_WindowDrawable * myPushedWindowDrawable
static UT_Array< std::pair< RE_Visual *, RE_DisplayMode > > theVisuals
GLenum GLenum GLsizei void * image
static int allowsSmoothLines()
UT_IntArray myPendingDeleteQueries
void pointOffset(bool onoff)
GLdouble GLdouble GLdouble q
UT_IntArray myClipDistance
bool subBufferDrawingEnabled() const
int myMaxTextureAnisotropy
UT_RecursiveSpinLock myOpenGLLock
======================================================================
GLenum GLenum GLenum dppass
int getViewportFontOffsetX() const
static int glMinorVersion()
static RE_GraphicsDevice getGraphicsDevice()
#define GL_POLYGON_OFFSET_FILL
void lineOffset(bool onoff)
static int minorGLVersion
GLenum GLuint GLint GLint layer
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
static RE_WindowList * theWindowList
bool isCurrent() const
======================================================================
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
int myMaxDebugGroupStackSize
RE_OGLTexture * mySuspendTestTexture
void getOffsetAmount(float *variable, float *constant) const
GA_API const UT_StringHolder scale
UT_IntArray myPendingDeleteVertexArrays
int getMaxColorBuffers() const
int getOGLMaxClipPlanes()
RE_Window * currentWindow
GLint GLint GLsizei GLint GLenum GLenum type
RE_Uniform * getUniform(RE_UniformBuiltIn builtin_var_type) const
bool myDebuggingSupported
static int getDriverMinorVersion()
int myMaxTextureGeometryUnits
int getBlendSmoothLevel() const
UT_IntArray & getBoundUniformBlocks()
RE_OcclusionQuery * myActiveQuery
int getMaxShaderTextureUnits() const
int getMaxVertexTextureUnits() const
void bumpBuiltInUniformSerial()
static RE_Window * theMainContextWindow
static int theDriverMajor
RE_Geometry * mySuspendBox
unsigned int RE_TextureID
GLuint GLint GLboolean layered
UT_StopWatch * mySuspendCheckTimer
GLint GLint GLsizei GLint GLenum format
bool contextIsValid() const
GLint GLenum GLboolean GLsizei stride
bool myActiveConditionalRender
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
static RE_Server * theServer
UT_ArrayMap< int, RE_OGLFramebuffer * > myFBOTable
int getViewportFontOffsetY() const
HUSD_API const char * raster()
static RE_Window * getMainContext()
static int getDriverBuildMinorVersion()
png_const_structrp png_const_inforp int * unit
GLfloat GLfloat GLfloat alpha
#define RE_MAX_TEXTURE_STATE_STACK
SIM_API const UT_StringHolder rotation
UT_Array< RE_FeedbackPrimitivesWrittenQuery * > myTransformFeedbackWrittenQuery
int myViewportFontOffsetY
GLuint const GLchar * name
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
static UT_ThreadSpecificValue< RE_OGLRender * > theCurrentRender
void polygonOffset(bool onoff)
int myMaxTextureFragmentUnits
int myMaxTransformFeedbackComponents
static void allowSmoothLines(int yn)
GLboolean GLboolean GLboolean b
RE_OGLFramebuffer * mySuspendResultFBO
bool myContextInitialized
int myMaxTextureVertexUnits
bool myWindowDrawableInitialized
fpreal32 SYSrint(fpreal32 val)
#define RE_FLAG_STATE(RE_NAME, GL_FLAG)
RE_OGLTexture * mySuspendResultTexture
int getMaxTextureSize() const
RE_OGLVertexArrayList * getDefaultVAO()
bool hasGLExtension(RE_Extension e) const
int getMaxFragmentTextureUnits() const
RE_OGLContext getContext() const
static int theDotsPerInch
int myShaderOnlyModeCount
static int theDriverBuildMajor
const RE_Render * getRender() const
static int getDriverBuildMajorVersion()
static bool theSmoothLinesAllowed
GLfloat GLfloat GLfloat GLfloat h
RE_RenderAutoLock(RE_OGLRender *r)
static RE_WindowList * getWindowList()
void pushPointSize(fpreal32 size)
Point options that can change per-point.
bool isTransformFeedbackEnabled() const
SIM_API const UT_StringHolder force
UT_Array< RE_Uniform * > myPushedUniforms
int64 getBuiltInUniformSerial() const
bool myIsAllowingOtherThreads
static int theDriverMinor
const RE_Window * getCurrentWindow() const
static bool hasGL4(int minor)
bool isDebugLabelSupported() const
int myMaxTextureShaderUnits
RE_OGLContext myContext
======================================================================
fpreal myShaderSampleRate
int getTextureAnisotropyLimit() const
ut_thread_id_t myNativeThread
int myMaxTransformFeedbackBuffers
static float pixelsToInches(int n)
static bool hasDriverVersion()
RV_API RV_VKImagePtr getRandomTexture(RV_Render *r, unsigned int seed, bool interp, int size=64)
Returns an 8b RGBA 64x64 texture with 0-1 random values in all comps.
int64 getRenderCount() const
GLubyte GLubyte GLubyte GLubyte w
bool myTransformFeedbackEnabled
int getMaxVertexAttribs() const
static bool theUsingCoreProfile
RE_Window * mySavedMainThreadCurrentWindow
static bool hasGL3(int minor)
RE_OGLVertexArrayList * myCurrentVAO
int getMaxGeometryTextureUnits() const
void popUniformData(RE_UniformBuiltIn bindex)
void setDefaultVAO(RE_OGLVertexArrayList *vao)
static UT_ThreadSpecificValue< RE_OGLRender * > theLastRender
int getMaxTextureRectangleSize()
RE_WindowDrawable * getDrawable()
QOpenGLContext * RE_OGLContext
void setFrontBufferDirty(bool d)
UT_Array< RE_PrimitivesGeneratedQuery * > myTransformFeedbackPrimitiveQuery
UT_Array< re_ConstVertexAttrib > myConstVertexAttribs
RE_Shader * myShaderOnlyActiveShader
png_structrp int png_fixed_point red
RV_API RV_VKImagePtr getRandomTexture3D(RV_Render *r, unsigned int seed, bool interp, int size=32)
Returns an 8b RGBA size^3 3D texture with 0-1 random values.
#define RE_BUFFER_STACK_SIZE
RE_OGLVertexArrayList * myDefaultVAO
RE_OGLContext pushedGraphicsContext
bool myMultisampleAlphaToCoverage
int myOpenGLContextLockCount
static int majorGLVersion
#define GL_POLYGON_OFFSET_LINE
GA_API const UT_StringHolder area
static RE_OGLRender * getCurrentRender()
Simple interface to building a shader from a .prog file.
static int glMajorVersion()