-
Notifications
You must be signed in to change notification settings - Fork 48
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
API & Framework changes #74
Conversation
In Progress: * Chart class porting Finished: * GLSL shader to std::string headers * Ported Image class to new framework, image examples working fine
Debugging following issues: * histogram rendering seems to be buggy * 3d line plot and surface are not rendering anything, though the 3d charts by themselves are rendering fine. Finished: * GLSL shader to std::string headers * Ported Image class to new framework, image examples working fine * 2d line and scatter plots working fine, multiple plots per chart also working fine. * Ported histogram, 3d line plot and histogram to new framework.
Debugging following issues: * 3d line plot and surface are not rendering anything, though the 3d charts by themselves are rendering fine. Finished: * GLSL shader to std::string headers * Ported Image class to new framework, image examples working fine * 2d line and scatter plots working fine, multiple plots per chart also working fine. * Ported histogram, and corresponding example works fine * 3d line plot and surface to new framework, 3d scatter plot is working fine.
To do: * Enable alpha blending in all renerables, shader code and required code is mostly already in place, have to add blending behavior * Add legends to the renderings * Add interactivity controls for renderables * Add event handling to control flow Finished: * Automated conversion of GLSL shader files to std::string headers * Ported all renderable objects to new framework that supports multiple renderings per Chart. * Moified examples to use modified API
Also, updated documentation for other classes
* Translate - Left mouse click + drag * Zoom - Left mouse click + drag with ALT (either left or right) modifier * Rotate - RIght mouse click + drag Both glfw3 and SDL2 windowing toolkits support the above three interactions. TODO: * Limit transformations to the view in which the cursor is present for multiview rendering mode. * Make rotations more robust, probably quaternion based, probably virtual track ball rotation is good for plots/graphs
Modified histogram cpu, cuda & OpenCL to show case per vertex/primitive colors feature Similar examples to show case alpha blending for plots will be added soon.
Also, moved Y axis label to the right side to have consistent position for the label irrespective of the tick labels displayed.
X axis tick labels are centered around the decimal point now.
Also modified COPY helper headers to be more generic where the copy functions directly take OpenGL buffer object identifiers and the corresponding buffer size in bytes instead of Forge objects.
* Fixes in fragment shaders * Disabled depth test for alpha blending
this example also demonstrates transparency and multiple plot rendering
* Removed font size parameter from loadFont functions * Font class loads a range of font sizes a prior * Characters have an outline to enable easy reading * Updated examples to reflect the change related to loadFont functions * Added a new FontAtlas class that creates the single texture that has all the glphs for all font sizes and characters Commented out outline strokes currently, will enable them after further testing.
Since we are adding freeimage, any thoughts on having a function that loads and displays the image in a single call? |
I notice that the C++ classes do not have constructors that accept the c-style handles. I think this should be available. |
I think font management should be a manager. There should be a map between the fonts loaded and the handle. If there is a constant loading of different fonts, that can be a big issue. |
General concerns/clarifications:
Edited by Pradeep in response to above queries:
|
Replying here since original comment is cluttered with others above. Regarding the following comments by @shehzan10
Sure we can add them, makes the code in api files more terse.
Forge so far has been object centric, you need a window to render something. Have a function such as below
would require us to keep state (internally maintain a Window) to display any image that gets passed into the above function. |
I'm not onboard with implementing classes in the backend/*.hpp files in the header, especially the constructors. |
@shehzan10 Regarding using inheritance at the |
I haven't thought of a specific design. But you can essentially put all the common stuff in the interface and then derive that. I guess ArrayInfo or MemoryManager classes in ArrayFire are a good place to look. |
Proper perlin noise is being displayed and the corresponding gaussian distribution of the noise on the right.
@pavanky @shehzan10 Okay, i fixed the cuda and opencl examples. Please run them on your machines and let me know if any issues are there. I will move to trying |
typedef unsigned short ushort; | ||
typedef unsigned char uchar; | ||
|
||
typedef enum { | ||
FG_SUCCESS = 0, ///< Fuction returned successfully. |
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.
I like the idea of having FG_ERR_NONE
as opposed to FG_SUCCESS
(or at least have both) for consistency reasons.
@pavanky Finished types enum changes we have discussed, PR is ready now. |
Includes the following: