Add an AddressOf() inline method, beside OffsetOf().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,10 +27,11 @@ class BGLDispatcher
|
||||
status_t SetTable(struct _glapi_table *dispatch);
|
||||
uint32 TableSize();
|
||||
|
||||
const _glapi_proc operator[](const char *function_name);
|
||||
const _glapi_proc operator[](const char *functionName);
|
||||
const char * operator[](uint32 offset);
|
||||
|
||||
uint32 OffsetOf(const char *function_name);
|
||||
const _glapi_proc AddressOf(const char *functionName);
|
||||
uint32 OffsetOf(const char *functionName);
|
||||
};
|
||||
|
||||
// Inlines methods
|
||||
@@ -58,9 +59,9 @@ inline uint32 BGLDispatcher::TableSize()
|
||||
}
|
||||
|
||||
|
||||
inline const _glapi_proc BGLDispatcher::operator[](const char *function_name)
|
||||
inline const _glapi_proc BGLDispatcher::operator[](const char *functionName)
|
||||
{
|
||||
return _glapi_get_proc_address(function_name);
|
||||
return _glapi_get_proc_address(functionName);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,9 +71,15 @@ inline const char * BGLDispatcher::operator[](uint32 offset)
|
||||
}
|
||||
|
||||
|
||||
inline uint32 BGLDispatcher::OffsetOf(const char *function_name)
|
||||
inline const _glapi_proc BGLDispatcher::AddressOf(const char *functionName)
|
||||
{
|
||||
return (uint32) _glapi_get_proc_offset(function_name);
|
||||
return _glapi_get_proc_address(functionName);
|
||||
}
|
||||
|
||||
|
||||
inline uint32 BGLDispatcher::OffsetOf(const char *functionName)
|
||||
{
|
||||
return (uint32) _glapi_get_proc_offset(functionName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user