36 #ifndef __RE_OGLRender__
37 #define __RE_OGLRender__
105 #define RE_DRIVER_INFO_VENDOR "OpenGL Vendor"
106 #define RE_DRIVER_INFO_RENDERER "OpenGL Renderer"
107 #define RE_DRIVER_INFO_VERSION "OpenGL Version"
108 #define RE_DRIVER_INFO_SHADING_LANGUAGE "OpenGL Shading Language"
109 #define RE_DRIVER_INFO_DETECTED "Detected GPU"
118 const char *className()
const;
136 {
return reinterpret_cast<RE_Render*
>(
this); }
138 {
return reinterpret_cast<const RE_Render*
>(
this); }
149 static bool hasGL11();
150 static bool hasGL12();
151 static bool hasGL13();
152 static bool hasGL14();
153 static bool hasGL15();
154 static bool hasGL20();
155 static bool hasGL21();
157 static bool hasGL3(
int minor);
158 static bool hasGL4(
int minor);
160 static int glMajorVersion();
161 static int glMinorVersion();
164 int glslMajorVersion();
165 int glslMinorVersion();
187 static void setPerformBadDriverCheck(
bool onoff);
190 static bool hasDriverVersion();
191 static int getDriverMajorVersion();
192 static int getDriverMinorVersion();
193 static int getDriverBuildMajorVersion();
194 static int getDriverBuildMinorVersion();
197 static bool getUsingCoreProfile();
198 static void setUsingCoreProfile(
bool using_core_profile);
205 static void clearGraphicsCache();
210 int64 getFreeTextureMemoryKB(
int64 *largest_chunk =
nullptr);
211 int64 getFreeBufferMemoryKB(
int64 *largest_chunk =
nullptr);
212 int64 getFreeFramebufferMemoryKB(
int64 *largest_chunk =
nullptr);
215 static int64 getInitialFreeMemoryKB();
219 static void exitWithBadDriver();
226 static void updateScreenSize();
231 static bool areScreensUniform();
249 static float pixelsToInches(
int n);
250 static int inchesToPixels(
float i);
251 static int scaledSize(
int size);
257 void checkForSuspendResume();
258 static void addSuspendResumeCB(
void (*cb)(
void*),
void *
data);
259 static void removeSuspendResumeCB(
void (*cb)(
void*),
void *
data);
266 void enableMultisample(
bool enable);
267 bool isMultisampleEnabled()
const;
269 void enableAlphaToCoverage(
bool enable);
270 bool isAlphaToCoverage()
const;
272 void getMaxViewportSize(
int &
w,
int &
h)
const;
273 int getMaxColorSamples()
const;
274 int getMaxDepthSamples()
const;
280 void setWindow(
RE_Window *,
bool attach =
true);
282 bool makeCurrent(
bool ignore_errors =
false);
283 static void resetCurrent();
287 bool isCurrentRender()
const;
288 bool isDrawableContextValid()
const;
295 {
return theCurrentRender.get() ==
this; }
305 void popOffscreenBufferFromDrawable();
306 bool pushOffscreenBufferToGLDrawable(
308 void popOffscreenBufferFromGLDrawable();
317 void popOffscreenBuffer();
326 const RE_Window *getCurrentWindow()
const;
348 void lockContextForRender();
349 void unlockContextAfterRender();
350 bool tryLockContextForRender();
351 bool isContextLocked()
const;
360 void unlockContext();
370 int getNextGLError();
371 void clearGLErrors();
372 const char *getGLErrorString(
int error );
373 void printGLError(
const char *header,
374 bool assert =
false );
375 void printAllGLErrors(
const char *header,
376 bool assert =
false );
378 void dumpNewState(
bool show_all =
false,
379 bool show_shader_blocks =
true);
380 void dumpViewportState(
bool show_all =
false);
381 void dumpTextureState()
const;
382 void dumpVertexAttributes()
const;
383 void dumpFragmentTests(
bool show_all =
false)
const;
384 void dumpRasterizeState(
bool show_all =
false)
const;
385 void dumpTextureCacheState(
int stack_level =-1)
const;
390 bool isDebugLabelSupported()
const;
393 bool isDebugging()
const;
395 int pushDebug(
bool enable);
396 void popDebug(
int *nest =
nullptr);
398 int pushDebugGroup(
const char *
name,
int id=1987);
399 void popDebugGroup(
int *nest =
nullptr);
401 void addComment(
const char *
name,
410 int pushDrawFramebuffer();
414 void popDrawFramebuffer(
int *nest =
nullptr);
416 int pushReadFramebuffer();
420 void popReadFramebuffer(
int *nest =
nullptr);
422 void updateFramebuffer();
428 void unregisterFBO(
int id);
432 void useSampleMask(
bool use);
433 bool usingSampleMask()
const;
434 int getMaxIntegerSamples()
const;
435 int getSampleMask(
int mask_number);
436 void setSampleMask(
int mask_number,
int mask);
437 static int getMatteMaskForSampleCount(
int samples);
443 void clearC(
float *
color =
nullptr);
444 void clearZ(
float z = 1.0);
445 void clearCZ(
float z = 1.0);
454 void enableColorBufferWriting();
455 void disableColorBufferWriting();
456 bool getColorBufferWriting();
457 void updateColorBufferWriting();
466 void popDrawBuffer(
int *nest = 0);
469 bool getDrawBufferIsBlendable();
472 void popReadBuffer(
int *nest = 0);
479 bool isFrontBufferDirty()
const;
480 void setFrontBufferDirty(
bool d);
482 void flush(
int wait=0);
500 void screenMask2DI(
const UT_DimRect &rect, CacheOnlyTag);
505 void disableScreenMask();
506 void intersectMask2DI(
510 void intersectMask2DI(
512 void intersectMask2DI(
524 bool getScreenMask();
525 void dirtyViewportAndScreenMask();
528 int getOGLMaxClipPlanes();
529 void enableClipDistance(
int clip_plane,
bool enable);
530 bool clipDistanceEnabled(
int clip_plane)
const;
537 int pushBackfaceCulling();
538 int pushBackfaceCulling(
bool backface);
539 void popBackfaceCulling(
int *nested = 0);
541 bool isBackface()
const;
542 void setBackface(
bool removeBackface);
543 bool getReverseWinding();
544 void setReverseWinding(
bool reverse_winding);
549 bool isPointOffset();
551 bool isPolygonOffset();
552 void pointOffset(
bool onoff );
553 void lineOffset(
bool onoff );
554 void polygonOffset(
bool onoff );
555 void setOffsetAmount(
float variable,
float constant );
556 void getOffsetAmount(
float *variable,
float *constant)
const;
570 int stream_bitfield = 0x1);
573 void endTransformFeedback();
577 int getNumFeedbackPrimitives(
int stream = 0);
581 bool hasFeedbackBufferOverflow(
int stream = 0);
584 bool isTransformFeedbackEnabled()
const;
586 bool isRasterizeEnabled()
const;
591 float getLineWidth()
const;
592 float getMaxSmoothLineWidth();
600 void setProgramPointSize(
bool enable);
601 bool getProgramPointSize()
const;
609 int pushDepthState();
610 void popDepthState(
int *nest =
nullptr);
614 void enableDepthBufferWriting();
615 void disableDepthBufferWriting();
616 bool getDepthBufferWriting();
617 void updateDepthBufferWriting();
620 void enableDepthTest();
621 void disableDepthTest();
623 void updateDepthTest();
628 void updateZFunction()
const;
632 void enableDepthClamp(
bool b);
633 bool getDepthClamp();
634 void updateDepthClamp();
636 void setDepthRange(
double nr,
double fr);
637 void getDepthRange(
double &nr,
double &fr)
const;
640 int pushStencilState();
641 void popStencilState(
int *nest =
nullptr);
643 void setStencil(
bool enable);
644 void setSClearValue(
int clearValue);
645 int getSClearValue()
const;
646 void setSWriteMask(
int writeMask);
647 int getSWriteMask()
const;
656 void updateStencilState();
657 void resetSFunction();
658 void resetSWriteMask();
659 void resetSClearValue();
660 void resetSOperation();
663 void enableLogicOp();
664 void disableLogicOp();
670 int pushBlendState();
671 void popBlendState(
int *nesting = 0);
673 bool isBlending()
const;
674 void blend(
int onoff);
689 void blendAlpha(
int onoff = 1);
690 void blendAlphaPremult(
bool onoff =
true);
692 int pushSmoothLines();
693 void popSmoothLines(
int *nesting = 0);
696 void smoothBlendLinesNoFlagChange(
bool by_smooth);
699 int getBlendSmoothLevel()
const;
701 static void allowSmoothLines(
int yn);
702 static int allowsSmoothLines();
715 RE_Shader *override_mat_shader =
nullptr,
716 bool allow_partial_render =
false);
720 RE_Shader *override_mat_shader =
nullptr,
721 bool allow_partial_render =
false);
723 void popMaterial(
int *nest =
nullptr);
739 void popShader(
int *nest =
nullptr);
743 int pushShaderTransformFeedback(
RE_Shader *sh,
746 int stream_bitfield = 0x1);
750 int stream_bitfield = 0x1);
751 void popShaderTransformFeedback(
int *nest =
nullptr);
757 void setShaderOnlyMode(
bool enable);
758 void requestFixedFunction();
770 void setPatchVertices(
int num_verts);
779 bool setShaderSampleRate(
fpreal rate);
780 fpreal getShaderSampleRate()
const;
782 bool isSampleShading()
const;
810 { popUniform(bindex); }
816 void printBuiltInUniforms(
bool bound_only);
830 {
return myBuiltInUniformSerial; }
846 bool inverse_too =
false);
847 void popObjectMatrix();
852 void setFragmentDerivativeHint(
bool nicest);
853 bool getFragmentDerivativeHint();
860 void setConstAttribF32(
int loc,
int vsize,
const fpreal32 *
data);
863 void setConstAttribF32(
int loc,
int vsize,
const fpreal64 *
data);
866 void setConstAttribF64(
int loc,
int vsize,
const fpreal64 *
data);
869 void setConstAttribI32(
int loc,
int vsize,
const int32 *
data);
872 void setConstAttribU32(
int loc,
int vsize,
const uint32 *
data);
875 void dirtyConstAttribs();
912 int bindTextureRaw(
int id,
int unit);
923 void setActiveTexture(
int textureunit);
924 int getActiveTexture()
const;
932 void popTextureState(
int *nest =
nullptr);
941 int findFirstFreeTextureUnit(
int starting_unit = 0)
const;
944 void updateTextureState()
const;
948 {
return myMaxTextureShaderUnits; }
950 {
return myMaxTextureVertexUnits; }
952 {
return myMaxTextureGeometryUnits; }
954 {
return myMaxTextureFragmentUnits; }
956 {
return myMaxTextureAnisotropy; }
961 {
return myMaxTextureSize; }
963 {
return myMaxTexture3DSize; }
965 {
return myMaxTextureRectSize; }
969 {
return myMaxColorBuffers; }
972 {
return myMaxDrawBuffers; }
975 void disableAllTextures();
979 bool bindImageTexture(
int image_unit,
984 void unbindImageTexture(
int image_unit);
990 int pushReadAlignment(
const void *
data,
int scansize);
991 void popReadAlignment(
int *nest =
nullptr);
992 int getReadAlignment()
const;
994 int pushWriteAlignment(
const void *
data,
int scansize);
995 void popWriteAlignment(
int *nest =
nullptr);
996 int getWriteAlignment()
const;
999 void useSeamlessMaps(
bool enable);
1000 bool usingSeamlessMaps();
1011 int num_layers,
int size = 64 );
1017 RE_OGLTexture *getRandomSampleMaskTexture(
unsigned int seed,
int nsamples,
1024 int convert16bit = 0,
1025 bool isinteger =
false);
1026 #ifdef KARMA_OUTPUT_GPU_BUFFERS
1029 void convertLUTToTexture(
PXL_Lookup *lookup);
1034 bool is3DLUTSupported()
const;
1036 void buildRasterTextureGeometry(
1043 void displayRasterTexture(
float x,
float y,
float z,
1046 void displayRasterTexture(
float x,
float y,
float z,
1050 void displayRasterTexture(
float x,
float y,
float z,
1056 float alpha_mult=1.0
f);
1062 void saveRaster(
int x,
int y,
int w,
int h,
1066 bool use_backbuf =
true);
1075 void setViewportFontOffset(
int x,
int y);
1076 int getViewportFontOffsetX()
const;
1077 int getViewportFontOffsetY()
const;
1100 bool region_support);
1101 void endConditionalRender();
1105 void enablePrimitiveRestart(
bool enable);
1106 void setPrimitiveRestartIndex(
unsigned int index);
1110 void drawViewportPoint(
const fpreal32 p[3],
1115 void drawViewportString(
const fpreal32 p[3],
1121 void postDrawViewportString();
1124 static void destroyShaderObject(
unsigned int progid,
bool unreg,
1126 static void destroyTextureObject(
unsigned int texid,
RE_OGLTexture *tex);
1127 static void destroyRenderbufferObject(
unsigned int rb);
1128 static void destroyBufferObject(
unsigned int buf);
1129 static void destroySync(
void *sync);
1131 static void clearCachedUniformBuffer(
int id);
1134 void destroyVertexArrayObject(
unsigned int vao);
1135 void destroyQuery(
unsigned int query);
1136 void destroyFramebufferObject(
unsigned int fbo);
1139 void fetchDriverPlatformInfo(
UT_WorkBuffer &info,
bool for_gl);
1143 void unbindPipeline();
1148 void invalidateCachedState();
1159 void enableSubBufferDrawing(
bool enable);
1166 static RE_SOperation oglToREsoperation(
int oglSOperation );
1171 #define RE_FLAG_STATE(RE_NAME,GL_FLAG) \
1172 void enable##RE_NAME () { REcheckIsOpenGLPainting(); if( myState.my##RE_NAME##State != 1 ) { ::glEnable( GL_FLAG ); myState.my##RE_NAME##State = 1; } } \
1173 void disable##RE_NAME () { REcheckIsOpenGLPainting(); if( myState.my##RE_NAME##State != 0 ) { ::glDisable( GL_FLAG ); myState.my##RE_NAME##State = 0; } } \
1174 bool get##RE_NAME () { if(myState.my##RE_NAME##State == 3) update##RE_NAME(); return (myState.my##RE_NAME##State ==1); } \
1175 void update##RE_NAME () { myState.my##RE_NAME##State = ::glIsEnabled( GL_FLAG ); } \
1176 void invalidate##RE_NAME() { myState.my##RE_NAME##State = 3; }
1186 RE_OGLRender(
int do_foreground,
const char *appname = 0);
1190 #undef RE_FLAG_STATE
1192 #define RE_FLAG_11_STATE(RE_NAME,GL_FLAG) \
1193 void enable##RE_NAME () { if( (myState.my##RE_NAME##State) != 1 && hasGL11() ) {::glEnable( GLenum(GL_FLAG) ); myState.my##RE_NAME##State = 1; } } \
1194 void disable##RE_NAME () { if( myState.my##RE_NAME##State && hasGL11() ) { ::glDisable( GLenum(GL_FLAG) ); myState.my##RE_NAME##State = 0; } } \
1195 bool get##RE_NAME () { if(myState.my##RE_NAME##State == 3) update##RE_NAME(); return (myState.my##RE_NAME##State==1) ; } \
1196 void update##RE_NAME () { if( hasGL11() ) { myState.my##RE_NAME##State = ::glIsEnabled( GLenum(GL_FLAG) ); } else { myState.my##RE_NAME##State = 0; } } \
1197 void invalidate##RE_NAME() { if(hasGL11()) myState.my##RE_NAME##State=3; }
1202 #undef RE_FLAG_11_STATE
1204 void updateOffsetAmount();
1206 static bool initGLVersionInfo();
1207 virtual void initGLExtensions();
1208 virtual void updateGLState();
1209 virtual void updateStacks();
1212 static void determineTwinView();
1213 bool switchContextForRender(
bool ignore_errors);
1219 void updateBlendSmoothState();
1220 int privPushBlendSmoothState(
bool smooth_too);
1221 void privPopBlendSmoothState(
bool smooth_too,
int *idx);
1223 void setupDebugging();
1225 void freePendingObjects();
1232 void assignPushedUniforms();
1238 void updateViewport();
1240 static const char *bufferName(
GLint e);
1241 static const char *faceName(
GLint e);
1242 static const char *hintName(
GLint e);
1243 static const char *cullName(
GLint e);
1407 void suspendTestPatternRender();
1408 bool suspendTestPatternCheck();
1431 void lockContextInternal_(
bool set_current_context);
1432 void unlockContextInternal_(
bool clear_current_context);
1435 void convertToViewportLogicalSpace_(
UT_DimRect &
r);
1446 if(!myR->isContextLocked())
1448 myR->lockContextForRender();
1449 myLockedFlag =
true;
1457 myR->unlockContextAfterRender();
1473 ((majorGLVersion >= 1) &&
1474 (minorGLVersion >= 1))); };
1477 ((majorGLVersion >= 1) &&
1478 (minorGLVersion >= 2))); };
1481 ((majorGLVersion >= 1) &&
1482 (minorGLVersion >= 3))); };
1485 ((majorGLVersion >= 1) &&
1486 (minorGLVersion >= 4))); };
1489 ((majorGLVersion >= 1) &&
1490 (minorGLVersion >= 5))); };
1493 ((majorGLVersion >= 2) &&
1494 (minorGLVersion >= 0))); };
1497 ((majorGLVersion >= 2) &&
1498 (minorGLVersion >= 1))); };
1502 ((majorGLVersion == 3) &&
1503 (minorGLVersion >= minor))); };
1507 ((majorGLVersion == 4) &&
1508 (minorGLVersion >= minor))); };
1521 return !(theDriverMajor == 0
1522 && theDriverMinor == 0
1523 && theDriverBuildMajor == 0
1524 && theDriverBuildMinor == 0);
1535 return myExt->hasExtension( e );
1542 return SYSrint(theDotsPerInch * uiScale());
1547 if(theUIScale <= 0.0)
1556 return (
float)n / dpi();
1562 return (
int)
SYSrint(i*(
float)dpi());
1574 if (scaled_size < 1.0)
1577 return (
int)scaled_size;
1592 fpreal ui_scale = uiScale();
1593 if (ui_scale == 1.0)
1618 {
return myFrontBufferDirty;}
1622 { myFrontBufferDirty = d; }
1640 enablePointOffset();
1642 disablePointOffset();
1651 disableLineOffset();
1660 disableFillOffset();
1666 *variable = myState._offset_variable;
1667 *constant = myState._offset_constant;
1673 return myState.myBlendSmoothStack[myState.myBlendSmoothLevel].myBlend==1;
1678 return myState.myBlendSmoothLevel;
1686 {
return myViewportFontOffsetX; }
1690 {
return myViewportFontOffsetY; }
1696 return myTransformFeedbackEnabled;
1702 return myTransformFeedbackType;
1708 return myRasterizeEnabled;
1714 return myBuiltInUniforms[builtin_var_type];
1720 return myDebugLabelSupported;
1726 return myDebuggingSupported;
void rasterize(const PointDataTreeOrGridT &points, TransferT &transfer)
Perform potentially complex rasterization from a user defined transfer scheme. See below comments for...
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 myIsGLStateInitialized
bool isFrontBufferDirty() const
void setPointSize(fpreal32 size)
OGLDrawable myPushedDrawable
static int inchesToPixels(float i)
bool isGLStateInitialized() const
#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
RE_OpenGLDrawable * myPushedOpenGLDrawable
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.
RE_OpenGLDrawable * getOpenGLDrawable()
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
#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()
fpreal32 SYSrint(const fpreal32 val)
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
RE_OpenGLDrawable * myOpenGLDrawable
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()