Hi all,
I've an issue with chaning of Antialiasing and Materials which uses phong shader.
User can change Antialiasing level during program use to better meets his needs.
If in the scene there are mesh with a material library using a shader, in my case
the Phong shader just after antialiasing change in the render part I've got the
error 1282.
I've tried to place Phong shaders Enabled := False but issue continue.
The only way to work aroud was to Remove all phong shaders from materials
off all objects, destroy object, change antialiasing, recreate phong object and
set it in materials.
I'm a newbie in this matter but is very complicate to do because I've a lot of
classes which implements scene objects inherited from TGLFreeForm....
I guess I've mistake something in use of Antialiasing and shaders.
Thank you for any suggestion !!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry in advance if I said something wrong, but I don't know opengl engine...
Seem that when I change AntiAliasing value the shaders (in this case Phong) need to be remade to follow some internal rendering structur...
By newbie I've tried many workarounds and this is one that works, but seems an odd solution.
Antialiasing is an option witch is attached to the context, so when you change it the context is recreated.
When you use a Shader, is bind thrue a handle wich is depend on the context. So it is normal that we need reinitialize the scene.
It's like if you change a pointer's address and you don't re-bind your accessed variables.
In this case you have no choice.
Perhaps i'm wrong. I'll take a look to the OpenGL specification about antialiasing options.
Normally you set this options at the beginning and you don't change it after.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for info !
I will improve structure of objects witch interact with GLScene to avoid future similar issues.
I'm adding freature after feature trying to get the best from OpenGL->GLScene environment.
The AntiAliasing is one of graphical parameters of program that user can change few times, but can change if something look ugly.
TVManager is a class which interact with the TGLScene to manages CNC Virtual Machines (VM).
It permit me to dynamically add geometries (mesh) representing CNC parts and so describe kinematics of machine.
TVMManager has a TVMSetupFrame which implements user possibile actions as:
add/remove/delete geometries
move geometris to another tree leaf
change graphical properties like color, texture, transparency, etc
apply transformations (rotations, offsets, etc).
enable and set contour angles, etc.
I'm just now working in materials library to better represent mechanincal parts as Aluminium, Plastic, Rubber, etc.
This is only the UI part of a full CNC control, however "even the eye must have its share".
Hi all,
I've an issue with chaning of Antialiasing and Materials which uses phong shader.
User can change Antialiasing level during program use to better meets his needs.
If in the scene there are mesh with a material library using a shader, in my case
the Phong shader just after antialiasing change in the render part I've got the
error 1282.
I've tried to place Phong shaders Enabled := False but issue continue.
The only way to work aroud was to Remove all phong shaders from materials
off all objects, destroy object, change antialiasing, recreate phong object and
set it in materials.
I'm a newbie in this matter but is very complicate to do because I've a lot of
classes which implements scene objects inherited from TGLFreeForm....
I guess I've mistake something in use of Antialiasing and shaders.
Thank you for any suggestion !!!
Sorry in advance if I said something wrong, but I don't know opengl engine...
Seem that when I change AntiAliasing value the shaders (in this case Phong) need to be remade to follow some internal rendering structur...
By newbie I've tried many workarounds and this is one that works, but seems an odd solution.
Have you some ideas about ?
Hi Shine what is the TVMManager ?
Antialiasing is an option witch is attached to the context, so when you change it the context is recreated.
When you use a Shader, is bind thrue a handle wich is depend on the context. So it is normal that we need reinitialize the scene.
It's like if you change a pointer's address and you don't re-bind your accessed variables.
In this case you have no choice.
Perhaps i'm wrong. I'll take a look to the OpenGL specification about antialiasing options.
Normally you set this options at the beginning and you don't change it after.
Hi Jerome,
Thank you very much for info !
I will improve structure of objects witch interact with GLScene to avoid future similar issues.
I'm adding freature after feature trying to get the best from OpenGL->GLScene environment.
The AntiAliasing is one of graphical parameters of program that user can change few times, but can change if something look ugly.
TVManager is a class which interact with the TGLScene to manages CNC Virtual Machines (VM).
It permit me to dynamically add geometries (mesh) representing CNC parts and so describe kinematics of machine.
TVMManager has a TVMSetupFrame which implements user possibile actions as:
add/remove/delete geometries
move geometris to another tree leaf
change graphical properties like color, texture, transparency, etc
apply transformations (rotations, offsets, etc).
enable and set contour angles, etc.
I'm just now working in materials library to better represent mechanincal parts as Aluminium, Plastic, Rubber, etc.
This is only the UI part of a full CNC control, however "even the eye must have its share".