-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod bufferobject #2981
Mod bufferobject #2981
Changes from 4 commits
be85048
490dc5b
a0860ba
132b80f
3c7cfaf
1c49678
0b20ade
e0c02f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ export interface vtkSelectionNode extends vtkObject { | |
/** | ||
* This functions is called internally by VTK.js and is not intended for public use. | ||
*/ | ||
setProperties(properties: ISelectionNodeProperties); | ||
setProperties(properties: ISelectionNodeProperties):any; | ||
|
||
/** | ||
* Get the list of the underlying selected attribute IDs. | ||
|
@@ -64,7 +64,7 @@ export interface vtkSelectionNode extends vtkObject { | |
/** | ||
* This functions is called internally by VTK.js and is not intended for public use. | ||
*/ | ||
setSelectionList(selectionAttributeIDs: ISelectionNodeProperties); | ||
setSelectionList(selectionAttributeIDs: ISelectionNodeProperties):any; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here: should be |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export declare enum ObjectType { | ||
ARRAY_BUFFER = 0, | ||
ELEMENT_ARRAY_BUFFER = 1, | ||
TEXTURE_BUFFER = 2, | ||
} | ||
|
||
declare const _default: { | ||
ObjectType: typeof ObjectType; | ||
}; | ||
|
||
export default _default; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import { ObjectType } from './Constants'; | ||
import { vtkAlgorithm, vtkObject } from '../../../interfaces'; | ||
|
||
/** | ||
* Interface for initial values of BufferObject | ||
*/ | ||
export interface IBufferObjectInitialValues { | ||
objectType: ObjectType; | ||
context?: WebGLRenderingContext | WebGL2RenderingContext; | ||
allocatedGPUMemoryInBytes: number; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
/** | ||
* Base type for vtkOpenGLBufferObject excluding the 'set' method from vtkObject | ||
*/ | ||
type vtkOpenGLBufferObjectBase = Omit<vtkObject, 'set'> & vtkAlgorithm; | ||
|
||
/** | ||
* Interface for OpenGL Buffer Object | ||
*/ | ||
export interface vtkOpenGLBufferObject extends vtkOpenGLBufferObjectBase { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks to me that |
||
/** | ||
* Uploads data to the buffer object. | ||
* @param data The data to be uploaded. | ||
* @param type The type of the data. | ||
* @returns {boolean} Whether the upload was successful. | ||
*/ | ||
upload(data: any, type: any): boolean; | ||
|
||
/** | ||
* Binds the buffer object. | ||
* @returns {boolean} Whether the binding was successful. | ||
*/ | ||
bind(): boolean; | ||
|
||
/** | ||
* Releases the buffer object. | ||
* @returns {boolean} Whether the release was successful. | ||
*/ | ||
release(): boolean; | ||
|
||
/** | ||
* Releases graphics resources associated with the buffer object. | ||
*/ | ||
releaseGraphicsResources(): void; | ||
|
||
/** | ||
* Sets the OpenGL render window. | ||
* @param renWin The render window to set. | ||
*/ | ||
setOpenGLRenderWindow(renWin: any): void; | ||
|
||
/** | ||
* Retrieves the error message, if any. | ||
* @returns {string} The error message. | ||
*/ | ||
getError(): string; | ||
|
||
} | ||
|
||
/** | ||
* Extends the given object with the properties and methods of vtkOpenGLBufferObject. | ||
* @param publicAPI The public API to extend. | ||
* @param model The model to extend. | ||
* @param initialValues The initial values to apply. | ||
*/ | ||
export function extend( | ||
publicAPI: object, | ||
model: object, | ||
initialValues?: IBufferObjectInitialValues | ||
): void; | ||
|
||
/** | ||
* Creates a new instance of vtkOpenGLBufferObject with the given initial values. | ||
* @param initialValues The initial values to use. | ||
* @returns {vtkOpenGLBufferObject} The new instance. | ||
*/ | ||
export function newInstance(initialValues?: IBufferObjectInitialValues): vtkOpenGLBufferObject; | ||
|
||
/** | ||
* Object containing the newInstance and extend functions for vtkOpenGLBufferObject. | ||
*/ | ||
export declare const vtkOpenGLBufferObject: { | ||
newInstance: typeof newInstance; | ||
extend: typeof extend; | ||
}; | ||
export default vtkOpenGLBufferObject; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export declare enum Wrap { | ||
CLAMP_TO_EDGE = 0, | ||
REPEAT = 1, | ||
MIRRORED_REPEAT = 2, | ||
} | ||
|
||
export declare enum Filter { | ||
NEAREST = 0, | ||
LINEAR = 1, | ||
NEAREST_MIPMAP_NEAREST = 2, | ||
NEAREST_MIPMAP_LINEAR = 3, | ||
LINEAR_MIPMAP_NEAREST = 4, | ||
LINEAR_MIPMAP_LINEAR = 5, | ||
} | ||
|
||
declare const _default: { | ||
Wrap: typeof Wrap; | ||
Filter: typeof Filter; | ||
}; | ||
|
||
export default _default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an auto-generated setter, so it returns boolean. (Returns true if the underlying value is actually changed).